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
Release history Release notifications | RSS feed
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)