diff --git a/README.md b/README.md new file mode 100644 index 0000000..c564a86 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# archive-fandom-wiki + +This program archives the content of fandom wikis. It doesn't scrape from the fandom.com wiki sites directly; rather, it uses my [BreezeWiki](https://breezewiki.hyperreal.coffee) instance to avoid downloading unnecessary ads, images, and other junk. + +Each resulting archive is self-contained, meaning one can extract the contents and browse the wiki snapshot locally (offline). The URLs for CSS, images, and links in each page are replaced by the relative `file:///` URLs for their corresponding pages on the local filesystem. + +## Installation + +Make sure Python and Pip are installed. Then run: + +``` bash +git clone https://git.sr.ht/~hyperreal/archive-fandom-wiki +cd archive-fandom-wiki +python -m venv venv +source venv/bin/activate +pip install -r requirements.txt +``` + +## Usage + +``` bash +archive-fandom-wiki dishonored +``` + +## Podman/Docker + +There is also a Containerfile, also known as a Dockerfile. + +``` bash +git clone https://git.sr.ht/~hyperreal/archive-fandom-wiki +cd archive-fandom-wiki +podman build -t localhost/archive-fandom-wiki:latest . + +``` + +To run the container image: + +``` bash +podman run --name archive-fandom-wiki --rm -v "${HOME}/archives:/output:Z" localhost/archive-fandom-wiki dishonored +``` diff --git a/README.org b/README.org index 6424015..d8b206a 100644 --- a/README.org +++ b/README.org @@ -1,6 +1,6 @@ #+title: archive-fandom-wiki -This program archives the content of fandom wikis. It doesn't scrape from the fandom.com wiki sites directly; rather, it uses my [[https://wiki.hyperreal.coffee][BreezeWiki]] instance to avoid downloading unnecessary ads, images, and other junk. +This program archives the content of fandom wikis. It doesn't scrape from the fandom.com wiki sites directly; rather, it uses my [[https://breezewiki.hyperreal.coffee][BreezeWiki]] instance to avoid downloading unnecessary ads, images, and other junk. Each resulting archive is self-contained, meaning one can extract the contents and browse the wiki snapshot locally (offline). The URLs for CSS, images, and links in each page are replaced by the relative ~file:///~ URLs for their corresponding pages on the local filesystem. @@ -8,7 +8,7 @@ Each resulting archive is self-contained, meaning one can extract the contents a Make sure Python and Pip are installed. Then run: #+begin_src bash -git clone https://git.hyperreal.coffee/hyperreal/archive-fandom-wiki.git +git clone https://git.sr.ht/~hyperreal/archive-fandom-wiki.git cd archive-fandom-wiki python -m venv venv source venv/bin/activate @@ -23,7 +23,7 @@ archive-fandom-wiki dishonored ** Podman/Docker There is also a Containerfile, also known as a Dockerfile. #+begin_src bash -git clone https://git.hyperreal.coffee/hyperreal/archive-fandom-wiki +git clone https://git.sr.ht/~hyperreal/archive-fandom-wiki cd archive-fandom-wiki podman build -t localhost/archive-fandom-wiki:latest . #+end_src diff --git a/archive-fandom-wiki b/archive-fandom-wiki index 774718d..5dccd51 100755 --- a/archive-fandom-wiki +++ b/archive-fandom-wiki @@ -24,7 +24,7 @@ class FandomWiki: def __init__(self, name: str): self.name = name self.canonical_url = f"https://{name}.fandom.com" - self.breezewiki_url = f"https://wiki.hyperreal.coffee/{name}" + self.breezewiki_url = f"https://breezewiki.hyperreal.coffee/{name}" self.site_dir = Path.cwd().joinpath(f"{name}.fandom.com") self.images_dir = self.site_dir.joinpath("images")