3.6 KiB
obj | repo | rev |
---|---|---|
application | https://github.com/y2z/monolith | 2024-04-17 |
monolith
A data hoarder’s dream come true: bundle any web page into a single HTML file. You can finally replace that gazillion of open tabs with a gazillion of .html files stored somewhere on your precious little drive.
Unlike the conventional “Save page as”, monolith not only saves the target document, it embeds CSS, image, and JavaScript assets all at once, producing a single HTML5 document that is a joy to store and share.
If compared to saving websites with wget -mpk, this tool embeds all assets as data URLs and therefore lets browsers render the saved page exactly the way it was on the Internet, even when no network connection is available.
Usage
Usage: monolith url -o out.html
Options
Option | Description |
---|---|
-a, --no-audio |
Remove audio sources |
-b, --base-url <http://localhost/> |
Set custom base URL |
-B, --blacklist-domains |
Treat list of specified domains as blacklist |
-c, --no-css |
Remove CSS |
-C, --cookies <cookies.txt> |
Specify cookie file |
-d, --domain <example.com> |
Specify domains to use for white/black-listing |
-e, --ignore-errors |
Ignore network errors |
-E, --encoding <UTF-8> |
Enforce custom charset |
-f, --no-frames |
Remove frames and iframes |
-F, --no-fonts |
Remove fonts |
-i, --no-images |
Remove images |
-I, --isolate |
Cut off document from the Internet |
-j, --no-js |
Remove JavaScript |
-k, --insecure |
Allow invalid X.509 (TLS) certificates |
-M, --no-metadata |
Exclude timestamp and source information |
-n, --unwrap-noscript |
Replace NOSCRIPT elements with their contents |
-o, --output <document.html> |
Write output to , use - for STDOUT |
-s, --silent |
Suppress verbosity |
-t, --timeout <60> |
Adjust network request timeout |
-u, --user-agent <Firefox> |
Set custom User-Agent string |
-v, --no-video |
Remove video sources |
-V, --version |
Print version information |
Dynamic content
Monolith doesn't feature a JavaScript engine, hence websites that retrieve and display data after initial load may require usage of additional tools.
For example, Chromium (Chrome) can be used to act as a pre-processor for such pages:
chromium --headless --incognito --dump-dom https://github.com | monolith - -I -b https://github.com -o github.html
Proxies
Please set $https_proxy
, $http_proxy
, and $no_proxy
environment variables.