Write some more bits in the README
- ID
7bdf472- date
2024-05-17 06:28:02+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
f0e4f56- message
Write some more bits in the README- changed files
2 files, 21 additions, 2 deletions
Changed files
README.md (342) → README.md (878)
diff --git a/README.md b/README.md
index 3e73fbf..d930aae 100644
--- a/README.md
+++ b/README.md
@@ -4,5 +4,21 @@ This tool creates [Safari webachive files](https://en.wikipedia.org/wiki/Webarch
This gives you an offline archive of web pages, which can be stored and backed up independently of any cloud services.
```console
-$ swift save_safari_webarchive.swift "https://example.com" "example.webarchive"
-```
\ No newline at end of file
+$ ./save_safari_webarchive.swift "https://example.com" "example.webarchive"
+```
+
+## Installation
+
+1. Install the Xcode Command Line Tools
+2. Download the `save_safari_webarchive.swift` script from this repo
+3. Add the script somewhere in your PATH
+
+## Usage
+
+Run the script passing two arguments: the URL you want to archive, and the path where you want to save the webarchive file.
+
+For example, this command will save the URL to this GitHub repo to `safari-webarchiver.webarchive`:
+
+```console
+$ ./save_safari_webarchive.swift "https://github.com/alexwlchan/safari-webarchiver" "safari-webarchiver.webarchive"
+```
save_safari_webarchive.swift (3374) → save_safari_webarchive.swift (3490)
diff --git a/save_safari_webarchive.swift b/save_safari_webarchive.swift
index 04e46be..a0dff0a 100755
--- a/save_safari_webarchive.swift
+++ b/save_safari_webarchive.swift
@@ -13,6 +13,9 @@
///
/// For a detailed explanation of the code in this script, see
/// https://alexwlchan.net/2024/creating-a-safari-webarchive/
+///
+/// The canonical copy of this script lives in GitHub, see
+/// https://github.com/alexwlchan/safari-webarchiver
import WebKit