https://github.com/octabytes/webarchive
https://github.com/octabytes/webarchive
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/octabytes/webarchive
- Owner: octabytes
- Created: 2024-10-11T07:16:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-15T08:11:36.000Z (over 1 year ago)
- Last Synced: 2025-07-27T23:46:37.753Z (11 months ago)
- Language: HTML
- Size: 17.6 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Web Archive
## Download single page with images
`httrack "http://www.example.com/" -O ./folder-to-save -v -s0 --depth=1 -n`
## Download single page without images
`httrack "http://www.example.com/" -O ./folder-to-save -r1`
## To save in current directory
To save all files in current directory use `.`
## Save/update new site
1. Download site `httrack "http://www.example.com/" -O ./temp -r1`
2. Copy folder www.example.com form temp and rename to site name e.g example
3. Remove temp folder
## Install Httrack on MacOS
`brew install httrack`
## Remove href from links
1. Open your HTML file in VSCode.
2. Press Ctrl + H to bring up the Find and Replace panel.
3. Enable the Regular Expression option by clicking the .\* button (or pressing Alt + R).
4. Use the following regular expression in the Find field:`(]*?)\s+href="[^"]*"`
5. In the Replace field, enter: `$1`
6. Click Replace All.
## Remove src set from images
1. `srcset="[^"]*"`
2. `sizes="[^"]*"`
## Send iframe height
Add this script right after title in head
```js
window.onload = function () {
const height = document.body.scrollHeight;
window.parent.postMessage(height, "*");
};
```