Skip to content

Instantly share code, notes, and snippets.

@chenyukang
Last active June 14, 2023 14:14

Revisions

  1. chenyukang renamed this gist May 17, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. chenyukang created this gist May 17, 2023.
    18 changes: 18 additions & 0 deletions Backup website with mirror
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    ## use wget to download website

    ```bash
    wget --reject-regex "(.*)\?(.*)" --mirror --no-parent --convert-links -p -U Mozilla https://program-think.blogspot.com/
    ```


    ## replace abs path to relative path
    ```bash
    find . -type f -name '*.html' -exec sed -i '' 's|https://program-think.blogspot.com/|/|g' {} +
    ```


    ## run local server to read it

    ```bash
    python3 -m http.server
    ```