2017-02-20 08:47:35 +01:00
|
|
|
# monolith
|
2017-02-20 08:51:24 +01:00
|
|
|
A data hoarder's dream come true:
|
|
|
|
bundle any web page into a stand-alone HTML file.
|
|
|
|
|
|
|
|
Unlike conventional "Save page as …", `monolith` saves the target
|
|
|
|
document **and** embeds JavaScript, CSS and image assets **all at once**,
|
|
|
|
resulting in a single HTML5 document that is easy to store and share.
|
|
|
|
|
|
|
|
Works both on remote and local targets.
|
|
|
|
|
2017-02-20 08:53:05 +01:00
|
|
|
If compared to saving websites with `wget -mpk`,
|
2017-02-20 08:51:24 +01:00
|
|
|
`monolith` embeds all assets as data-URIs and therefore would display the page
|
|
|
|
exactly the same at any time, not depending on the Internet connection.
|
|
|
|
|
|
|
|
However, keep in mind that `monolith` is not aware of your browser's session.
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
$ sudo npm install -g git@github.com:Y2Z/monolith.git
|
|
|
|
|
|
|
|
### Usage
|
2017-02-20 08:55:52 +01:00
|
|
|
$ monolith https://github.com > github.html
|
2017-02-20 08:54:32 +01:00
|
|
|
or
|
|
|
|
|
2017-02-20 08:55:52 +01:00
|
|
|
$ monolith -q [local path]/index.html > mysite.html
|
2017-02-20 08:53:46 +01:00
|
|
|
|
2017-02-20 08:51:24 +01:00
|
|
|
<!-- or -->
|
|
|
|
<!-- cat local.html | monolith - > local.html -->
|
|
|
|
|
|
|
|
### Options
|
|
|
|
- `-u`: output the result document as one big data-URI
|
2017-02-20 08:55:52 +01:00
|
|
|
- `-q`: be quiet
|
2017-02-20 08:51:24 +01:00
|
|
|
<!-- - `-a`: fix anchor href="" attributes for remote documents -->
|
|
|
|
|
|
|
|
### License
|
|
|
|
GPLv3
|