From 15dd82e300282f8112e9f43ddf272e261ad2ae3d Mon Sep 17 00:00:00 2001 From: Sunshine Date: Wed, 20 Oct 2021 15:31:54 -1000 Subject: [PATCH] update README files, set CI to ignore irrelevant paths --- .github/workflows/build_gnu_linux.yml | 13 +++++++++++++ .github/workflows/build_macos.yml | 13 +++++++++++++ .github/workflows/build_windows.yml | 13 +++++++++++++ .github/workflows/cd.yml | 11 +++++++++++ .github/workflows/ci.yml | 15 +++++++++++++++ README.md | 23 +++++++++++++++++++---- {utils => dist}/run-in-container.sh | 0 docs/web-apps.md | 21 ++++++++++++++------- 8 files changed, 98 insertions(+), 11 deletions(-) rename {utils => dist}/run-in-container.sh (100%) diff --git a/.github/workflows/build_gnu_linux.yml b/.github/workflows/build_gnu_linux.yml index 932816a..dc9d05f 100644 --- a/.github/workflows/build_gnu_linux.yml +++ b/.github/workflows/build_gnu_linux.yml @@ -3,6 +3,17 @@ name: GNU/Linux on: push: branches: [ master ] + paths-ignore: + - 'assets/' + - 'dist/' + - 'docs/' + - 'snap/' + - '.adr-dir' + - 'Dockerfile' + - 'LICENSE' + - 'Makefile' + - 'monolith.nuspec' + - 'README.md' jobs: build: @@ -17,6 +28,8 @@ jobs: steps: - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Build run: cargo build --all --locked --verbose diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml index aebd501..9309dee 100644 --- a/.github/workflows/build_macos.yml +++ b/.github/workflows/build_macos.yml @@ -3,6 +3,17 @@ name: macOS on: push: branches: [ master ] + paths-ignore: + - 'assets/' + - 'dist/' + - 'docs/' + - 'snap/' + - '.adr-dir' + - 'Dockerfile' + - 'LICENSE' + - 'Makefile' + - 'monolith.nuspec' + - 'README.md' jobs: build: @@ -17,6 +28,8 @@ jobs: steps: - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Build run: cargo build --all --locked --verbose diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 3515af6..4c837c1 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -3,6 +3,17 @@ name: Windows on: push: branches: [ master ] + paths-ignore: + - 'assets/' + - 'dist/' + - 'docs/' + - 'snap/' + - '.adr-dir' + - 'Dockerfile' + - 'LICENSE' + - 'Makefile' + - 'monolith.nuspec' + - 'README.md' jobs: build: @@ -17,6 +28,8 @@ jobs: steps: - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Build run: cargo build --all --locked --verbose diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 23ffb8a..9678da1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -13,10 +13,13 @@ jobs: runs-on: windows-2019 steps: - run: git config --global core.autocrlf false + - name: Checkout the repository uses: actions/checkout@v2 + - name: Build the executable run: cargo build --release + - uses: Shopify/upload-to-release@1.0.0 with: name: monolith.exe @@ -28,6 +31,7 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v2 + - name: Prepare cross-platform environment run: | sudo mkdir /cross-build @@ -44,8 +48,10 @@ jobs: echo "OPENSSL_LIB_DIR=/cross-build/usr/lib/arm-linux-gnueabihf" >> $GITHUB_ENV echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV echo "RUSTFLAGS=-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L/cross-build/usr/lib/arm-linux-gnueabihf -L/cross-build/lib/arm-linux-gnueabihf" >> $GITHUB_ENV + - name: Build the executable run: cargo build --release --target=arm-unknown-linux-gnueabihf + - name: Attach artifact to the release uses: Shopify/upload-to-release@1.0.0 with: @@ -58,6 +64,7 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v2 + - name: Prepare cross-platform environment run: | sudo mkdir /cross-build @@ -74,8 +81,10 @@ jobs: echo "OPENSSL_LIB_DIR=/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV echo "RUSTFLAGS=-C linker=aarch64-linux-gnu-gcc -L/usr/aarch64-linux-gnu/lib -L/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV + - name: Build the executable run: cargo build --release --target=aarch64-unknown-linux-gnu + - name: Attach artifact to the release uses: Shopify/upload-to-release@1.0.0 with: @@ -88,8 +97,10 @@ jobs: steps: - name: Checkout the repository uses: actions/checkout@v2 + - name: Build the executable run: cargo build --release + - uses: Shopify/upload-to-release@1.0.0 with: name: monolith-gnu-linux-x86_64 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4309d33..97629c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,17 @@ name: CI on: pull_request: branches: [ master ] + paths-ignore: + - 'assets/' + - 'dist/' + - 'docs/' + - 'snap/' + - '.adr-dir' + - 'Dockerfile' + - 'LICENSE' + - 'Makefile' + - 'monolith.nuspec' + - 'README.md' jobs: build_and_test: @@ -23,11 +34,15 @@ jobs: steps: - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Build run: cargo build --all --locked --verbose + - name: Run tests run: cargo test --all --locked --verbose + - name: Check code formatting run: | rustup component add rustfmt diff --git a/README.md b/README.md index cfdd5f0..9c2e8a3 100644 --- a/README.md +++ b/README.md @@ -25,54 +25,60 @@ If compared to saving websites with `wget -mpk`, this tool embeds all assets as ## Installation #### Using [Cargo](https://crates.io/crates/monolith) + ```console cargo install monolith ``` #### Via [Homebrew](https://formulae.brew.sh/formula/monolith) (macOS and GNU/Linux) + ```console brew install monolith ``` #### Via [MacPorts](https://ports.macports.org/port/monolith/summary) (macOS) + ```console sudo port install monolith ``` #### Via [MacPorts](https://ports.macports.org/port/monolith/summary) (macOS) + ```console sudo port install monolith ``` #### Using [Snapcraft](https://snapcraft.io/monolith) (GNU/Linux) + ```console snap install monolith ``` #### Using [FreeBSD packages](https://svnweb.freebsd.org/ports/head/www/monolith/) (FreeBSD) + ```console pkg install monolith ``` #### Using [FreeBSD ports](https://www.freshports.org/www/monolith/) (FreeBSD) + ```console cd /usr/ports/www/monolith/ make install clean ``` #### Using [pkgsrc](https://pkgsrc.se/www/monolith) (NetBSD, OpenBSD, Haiku, etc) + ```console cd /usr/pkgsrc/www/monolith make install clean ``` -#### Using [pre-built binaries](https://github.com/Y2Z/monolith/releases) (Windows, ARM-based devices, etc) -Every release contains pre-built binaries for Windows, GNU/Linux, as well as platforms with non-standart CPU architecture. - #### Using [containers](https://www.docker.com/) + ```console docker build -t Y2Z/monolith . -sudo install -b utils/run-in-container.sh /usr/local/bin/monolith +sudo install -b dist/run-in-container.sh /usr/local/bin/monolith ``` #### From source @@ -85,11 +91,16 @@ cd monolith make install ``` +#### Using [pre-built binaries](https://github.com/Y2Z/monolith/releases) (Windows, ARM-based devices, etc) + +Every release contains pre-built binaries for Windows, GNU/Linux, as well as platforms with non-standart CPU architecture. + --------------------------------------------------- ## Usage + ```console monolith https://lyrics.github.io/db/P/Portishead/Dummy/Roads/ -o portishead-roads-lyrics.html ``` @@ -103,6 +114,7 @@ cat index.html | monolith -aIiFfcMv -b https://original.site/ - > result.html ## Options + - `-a`: Exclude audio sources - `-b`: Use custom `base URL` - `-c`: Exclude CSS @@ -127,6 +139,7 @@ cat index.html | monolith -aIiFfcMv -b https://original.site/ - > result.html ## Proxies + Please set `https_proxy`, `http_proxy`, and `no_proxy` environment variables. @@ -134,6 +147,7 @@ Please set `https_proxy`, `http_proxy`, and `no_proxy` environment variables. ## Contributing + Please open an issue if something is wrong, that helps make this project better. @@ -141,6 +155,7 @@ Please open an issue if something is wrong, that helps make this project better. ## Related projects + - Monolith Chrome Extension: https://github.com/rhysd/monolith-of-web - Pagesaver: https://github.com/distributed-mind/pagesaver - Personal WayBack Machine: https://github.com/popey/pwbm diff --git a/utils/run-in-container.sh b/dist/run-in-container.sh similarity index 100% rename from utils/run-in-container.sh rename to dist/run-in-container.sh diff --git a/docs/web-apps.md b/docs/web-apps.md index 3b19944..fafda87 100644 --- a/docs/web-apps.md +++ b/docs/web-apps.md @@ -1,10 +1,17 @@ # Web apps that can be saved with Monolith -These apps retain most or all of their functionality when saved with Monolith +These apps retain all or most of their functionality when saved with Monolith: -|Converse|https://conversejs.org| -|:--|:--| -|Description|An XMPP client built using web technologies| -|Functionality retained|**full**| -|Command to use|`monolith https://conversejs.org/fullscreen.html > conversejs.html`| -|Monolith version used|2.2.7| +| Converse | https://conversejs.org | +|:-----------------------|:--------------------------------------------------------------------| +| Description | An XMPP client built using web technologies | +| Functionality retained | **full** | +| Command to use | `monolith https://conversejs.org/fullscreen.html > conversejs.html` | +| Monolith version used | 2.2.7 | + +| Markdown Tables generator | https://www.tablesgenerator.com | +|:--------------------------|:-----------------------------------------------------------------------------------------------| +| Description | Tool for creating tables in extended Markdown format | +| Functionality retained | **full** | +| Command to use | `monolith -I https://www.tablesgenerator.com/markdown_tables -o markdown-table-generator.html` | +| Monolith version used | 2.6.1 |