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

OptionDescription
-a, --no-audioRemove audio sources
-b, --base-url <http://localhost/>Set custom base URL
-B, --blacklist-domainsTreat list of specified domains as blacklist
-c, --no-cssRemove CSS
-C, --cookies <cookies.txt>Specify cookie file
-d, --domain <example.com>Specify domains to use for white/black-listing
-e, --ignore-errorsIgnore network errors
-E, --encoding <UTF-8>Enforce custom charset
-f, --no-framesRemove frames and iframes
-F, --no-fontsRemove fonts
-i, --no-imagesRemove images
-I, --isolateCut off document from the Internet
-j, --no-jsRemove JavaScript
-k, --insecureAllow invalid X.509 (TLS) certificates
-M, --no-metadataExclude timestamp and source information
-n, --unwrap-noscriptReplace NOSCRIPT elements with their contents
-o, --output <document.html>Write output to , use - for STDOUT
-s, --silentSuppress verbosity
-t, --timeout <60>Adjust network request timeout
-u, --user-agent <Firefox>Set custom User-Agent string
-v, --no-videoRemove video sources
-V, --versionPrint 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.