archive-fandom-wiki/README.org

37 lines
1.4 KiB
Org Mode
Raw Normal View History

2023-09-15 03:36:56 +02:00
#+title: archive-fandom-wiki
2023-10-02 17:19:59 +02:00
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.
2023-09-15 03:36:56 +02:00
2023-09-17 05:21:05 +02:00
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.
2023-09-15 03:36:56 +02:00
2023-09-17 05:21:05 +02:00
** Installation
2023-09-15 03:36:56 +02:00
2023-09-17 05:21:05 +02:00
Make sure Python and Pip are installed. Then run:
#+begin_src bash
git clone https://codeberg.org/hyperreal/archive-fandom-wiki.git
2023-09-17 05:21:05 +02:00
cd archive-fandom-wiki
2023-09-17 05:27:55 +02:00
python -m venv venv
source venv/bin/activate
2023-09-17 05:21:05 +02:00
pip install -r requirements.txt
#+end_src
2023-09-15 03:36:56 +02:00
2023-09-17 05:21:05 +02:00
** Usage
One may specify the BreezeWiki instance URL, or the default value (my BreezeWiki instance URL) will be used.
2023-09-17 05:21:05 +02:00
#+begin_src bash
afw dishonored https://breezewiki.instance.url
afw dishonored
2023-09-17 05:21:05 +02:00
#+end_src
2023-09-15 03:36:56 +02:00
2023-09-17 05:21:05 +02:00
** Podman/Docker
There is also a Containerfile, also known as a Dockerfile.
2023-09-15 03:36:56 +02:00
#+begin_src bash
git clone https://codeberg.org/hyperreal/archive-fandom-wiki
2023-09-17 05:21:05 +02:00
cd archive-fandom-wiki
podman build -t localhost/archive-fandom-wiki:latest .
2023-09-15 03:36:56 +02:00
#+end_src
2023-09-17 05:21:05 +02:00
To run the container image:
2023-09-15 03:36:56 +02:00
#+begin_src bash
2023-09-17 05:21:05 +02:00
podman run --name archive-fandom-wiki --rm -v "${HOME}/archives:/output:Z" localhost/archive-fandom-wiki dishonored
2023-09-15 03:36:56 +02:00
#+end_src