Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.64 KB

README.md

File metadata and controls

53 lines (39 loc) · 2.64 KB

HeadsInTheCloud 2

Python 3.6+ | Fast | Any SDK

Prelude

Limneos' provides a wonderful service which basically lets you browse headers online from various SDKs.The only gripe I take with his site is the slight drawbacks with speed, that's how I came to make HeadsInTheCloud - short HITC.

If you've seen V1 (Repository, Announcement tweet), this is the official successor to it and a complete rewrite!

This takes a radically different approach to how headers are "generated", see below.

Internals

HITC v1 was based on Flask and rendered each header dynamically.

HITC v2 is based on sanic and takes a different approach to rendering headers: It doesn't.

The headers are pre-generated with -in this case- the included converter.py which has HTML wraps specific to my personal setting (you can change that though) and uses pygments to generate HTML from a header file.

sidenotes:

  • the generated html from the header gets "pasted" between the html wraps to build a full page
  • stylization is handled through the explicit header_view.css, you can mix&match values there to generate your own individual style!
  • the header files are (in best case) served through nginx to spare the backend of doing the lengthy work of sending the rendered header. This is the secret to the speediness!

Requirements + Setup

If you wish to deploy your own instance, here's the steps to deploy it with sanic serving the files instead of Nginx:

  • Linux VPS
    • Python 3.6+, python3-venv
  • yup, that's it.

The static directory is /static, place your generated headers' in their respective SDK there. The layout for an SDK has changed since HITC v1 since we no longer need the actual files but prerendered HTMLs, here's an overview for these:

  • SDK <Version>
    • Frameworks
      • all .framework folder (private and public)
        • <header_name>.html
      • all .dylib folder (if any at all)
        • <header_name>.html
    • protocols
      • <header_name>.html

Since sanic provides it's own webserver which is solid enough, you can of course opt to use somethin like gunicorn et al.

If everything is setup, just fire sanic up!

If you'd like to have this managed by PM2, here's a quick recap on how to make it use the appropriate venv:

  • pm2 <location/to/server.py> --interpreter <location/to/its/venv/bin/python>

Credits

  • Limneos for the original idea
  • SparkDev for the iOS 14.0 SDK dump
  • EzioChiu for the iOS 12.1.2 SDK dump
  • Local Pigeons for supporting me by just being fluffy companions lmao

License

This Project is licensed under the AGPL v3.