README.md
1[![Monolith Build Status for GNU/Linux](https://github.com/Y2Z/monolith/workflows/GNU%2FLinux/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3AGNU%2FLinux)
2[![Monolith Build Status for macOS](https://github.com/Y2Z/monolith/workflows/macOS/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3AmacOS)
3[![Monolith Build Status for Windows](https://github.com/Y2Z/monolith/workflows/Windows/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3AWindows)
4
5```
6 _____ ______________ __________ ___________________ ___
7| \ / \ | | | | | |
8| \_/ __ \_| __ | | ___ ___ |__| |
9| | | | | | | | | | | |
10| |\ /| |__| _ |__| |____| | | | | __ |
11| | \___/ | | \ | | | | | | |
12|___| |__________| \_____________________| |___| |___| |___|
13```
14
15A 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.
16
17Unlike 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.
18
19If 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.
20
21---------------------------------------------------
22
23## Installation
24
25#### Using [Cargo](https://crates.io/crates/monolith)
26 $ cargo install monolith
27
28#### Via [Homebrew](https://formulae.brew.sh/formula/monolith) (macOS and GNU/Linux)
29 $ brew install monolith
30
31#### Using [Snapcraft](https://snapcraft.io/monolith) (GNU/Linux)
32 $ snap install monolith
33
34#### Using [FreeBSD packages](https://svnweb.freebsd.org/ports/head/www/monolith/) (FreeBSD)
35 $ pkg install monolith
36
37#### Using [FreeBSD ports](https://www.freshports.org/www/monolith/) (FreeBSD)
38 $ cd /usr/ports/www/monolith/
39 $ make install clean
40
41#### Using [pkgsrc](https://pkgsrc.se/www/monolith) (NetBSD, OpenBSD, Haiku, etc)
42 $ cd /usr/pkgsrc/www/monolith
43 $ make install clean
44
45#### Using [pre-built binaries](https://github.com/Y2Z/monolith/releases) (Windows, ARM-based devices, etc)
46Every release contains pre-built binaries for Windows, GNU/Linux, as well as platforms with non-standart CPU architecture.
47
48#### Using [containers](https://www.docker.com/)
49 $ docker build -t Y2Z/monolith .
50 $ sudo install -b utils/run-in-container.sh /usr/local/bin/monolith
51
52#### From source
53
54Dependency: `libssl-dev`
55
56 $ git clone https://github.com/Y2Z/monolith.git
57 $ cd monolith
58 $ make install
59
60---------------------------------------------------
61
62## Usage
63 $ monolith https://lyrics.github.io/db/P/Portishead/Dummy/Roads/ -o portishead-roads-lyrics.html
64or
65
66 $ cat index.html | monolith -aIiFfcMv -b https://original.site/ - > result.html
67
68---------------------------------------------------
69
70## Options
71 - `-a`: Exclude audio sources
72 - `-b`: Use custom `base URL`
73 - `-c`: Exclude CSS
74 - `-C`: Save document using custom `charset`
75 - `-e`: Ignore network errors
76 - `-f`: Omit frames
77 - `-F`: Exclude web fonts
78 - `-i`: Remove images
79 - `-I`: Isolate the document
80 - `-j`: Exclude JavaScript
81 - `-k`: Accept invalid X.509 (TLS) certificates
82 - `-M`: Don't add timestamp and URL information
83 - `-n`: Extract contents of NOSCRIPT elements
84 - `-o`: Write output to `file`, use “-” for STDOUT
85 - `-s`: Be quiet
86 - `-t`: Adjust `network request timeout`
87 - `-u`: Provide custom `User-Agent`
88 - `-v`: Exclude videos
89
90---------------------------------------------------
91
92## Proxies
93Please set `https_proxy`, `http_proxy`, and `no_proxy` environment variables.
94
95---------------------------------------------------
96
97## Contributing
98Please open an issue if something is wrong, that helps make this project better.
99
100---------------------------------------------------
101
102## Related projects
103 - Monolith Chrome Extension: https://github.com/rhysd/monolith-of-web
104 - Pagesaver: https://github.com/distributed-mind/pagesaver
105 - Personal WayBack Machine: https://github.com/popey/pwbm
106 - Hako: https://github.com/dmpop/hako
107 - Monk: https://gitlab.com/fisherdarling/monk
108
109---------------------------------------------------
110
111## License
112
113To the extent possible under law, the author(s) have dedicated all copyright related and neighboring rights to this software to the public domain worldwide.
114This software is distributed without any warranty.
115
116---------------------------------------------------
117
118<!-- Microtext -->
119<sub>Keep in mind that `monolith` is not aware of your browser’s session</sub>
120