Skip to main content

Static Page Inline Decoder of Choice

Project description

stapidoc

v0.1.0
©2023 Jonas Santoso

static page inline decoder of choice

Install

pip install stapidoc

Usage

stapidoc input_file

Resulting document is written to stdout.

Given a static HTML document ('source'), stapidoc creates another HTML document which contains the source as a percent‑and‑base64‑encoded string, along with an inline script that decodes this string and plugs the source's DOM on‑the‑fly upon loading.

The source's <link> elements are plugged into the resulting DOM's <head> separately in order for linked resources to load.

Tacit assumptions:

  • The source document is entirely static. There are no <script> elements in either head or body.
  • The source document uses UTF-8 encoding.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stapidoc-0.1.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

stapidoc-0.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page