add Dockerfile
This commit is contained in:
parent
1c1f2c7128
commit
c16e80f507
3 changed files with 52 additions and 16 deletions
11
.travis.yml
11
.travis.yml
|
@ -1,8 +1,6 @@
|
||||||
language: rust
|
language: rust
|
||||||
cache: cargo
|
cache: cargo
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
@ -13,6 +11,9 @@ rust:
|
||||||
- beta
|
- beta
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
|
|
||||||
|
@ -24,6 +25,12 @@ script:
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
after_success: |
|
||||||
|
if [ "${TRAVIS_OS_NAME}" == linux ] && [ "${TRAVIS_RUST_VERSION}" == stable ]; then
|
||||||
|
docker build -t monolith .
|
||||||
|
docker run monolith monolith -V
|
||||||
|
fi
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- rust: nightly
|
- rust: nightly
|
||||||
|
|
18
Dockerfile
Normal file
18
Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
FROM rust
|
||||||
|
|
||||||
|
WORKDIR /usr/local/src/
|
||||||
|
RUN curl -s https://api.github.com/repos/y2z/monolith/releases/latest \
|
||||||
|
| grep "tarball_url.*\"," \
|
||||||
|
| cut -d '"' -f 4 \
|
||||||
|
| wget -qi - -O monolith.tar.gz
|
||||||
|
|
||||||
|
RUN tar xfz monolith.tar.gz \
|
||||||
|
&& mv Y2Z-monolith-* monolith \
|
||||||
|
&& rm monolith.tar.gz
|
||||||
|
|
||||||
|
WORKDIR /usr/local/src/monolith
|
||||||
|
RUN ls -a
|
||||||
|
RUN make install
|
||||||
|
|
||||||
|
WORKDIR /tmp
|
||||||
|
CMD ["/usr/local/cargo/bin/monolith"]
|
11
README.md
11
README.md
|
@ -17,6 +17,7 @@ Unlike the conventional "Save page as", `monolith` not only saves the target doc
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### From source
|
### From source
|
||||||
|
@ -30,9 +31,14 @@ If compared to saving websites with `wget -mpk`, this tool embeds all assets as
|
||||||
### Using Snapcraft (on GNU/Linux)
|
### Using Snapcraft (on GNU/Linux)
|
||||||
$ snap install monolith
|
$ snap install monolith
|
||||||
|
|
||||||
|
### Via Docker
|
||||||
|
The guide can be found [here](https://github.com/Y2Z/monolith/wiki/Using-containers)
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
$ monolith https://lyrics.github.io/db/P/Portishead/Dummy/Roads/ -o portishead-roads-lyrics.html
|
$ monolith https://lyrics.github.io/db/P/Portishead/Dummy/Roads/ -o portishead-roads-lyrics.html
|
||||||
|
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
- `-c`: Ignore styles
|
- `-c`: Ignore styles
|
||||||
- `-f`: Exclude frames and iframes
|
- `-f`: Exclude frames and iframes
|
||||||
|
@ -45,19 +51,24 @@ If compared to saving websites with `wget -mpk`, this tool embeds all assets as
|
||||||
- `-t`: Set custom network request timeout
|
- `-t`: Set custom network request timeout
|
||||||
- `-u`: Provide own User-Agent
|
- `-u`: Provide own User-Agent
|
||||||
|
|
||||||
|
|
||||||
## HTTPS and HTTP proxies
|
## HTTPS and HTTP proxies
|
||||||
Please set `https_proxy`, `http_proxy`, and `no_proxy` environment variables.
|
Please set `https_proxy`, `http_proxy`, and `no_proxy` environment variables.
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
Please open an issue if something is wrong, that helps make this project better.
|
Please open an issue if something is wrong, that helps make this project better.
|
||||||
|
|
||||||
|
|
||||||
## Related projects
|
## Related projects
|
||||||
- `Monolith Chrome Extension`: https://github.com/rhysd/monolith-of-web
|
- `Monolith Chrome Extension`: https://github.com/rhysd/monolith-of-web
|
||||||
- `Pagesaver`: https://github.com/distributed-mind/pagesaver
|
- `Pagesaver`: https://github.com/distributed-mind/pagesaver
|
||||||
- `Personal WayBack Machine`: https://github.com/popey/pwbm
|
- `Personal WayBack Machine`: https://github.com/popey/pwbm
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
The Unlicense
|
The Unlicense
|
||||||
|
|
||||||
|
|
||||||
<!-- Microtext -->
|
<!-- Microtext -->
|
||||||
<sub>Keep in mind that `monolith` is not aware of your browser's session</sub>
|
<sub>Keep in mind that `monolith` is not aware of your browser's session</sub>
|
||||||
|
|
Loading…
Reference in a new issue