Skip to content

**ZIM Site Creator** – Automates website archiving into **ZIM files** for offline browsing with https://kiwix.org. Ideal for personal, educational, or portable offline libraries. Downloads websites, converts them to ZIM, and cleans up temporary files automatically.

Notifications You must be signed in to change notification settings

MaxHuiskes/Create-Zim-Files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZIM Site Creator

A lightweight tool to archive websites as ZIM files for offline browsing with Kiwix.

Overview

ZIM Site Creator automates:

  • Downloading a website with all pages and assets.
  • Converting it into a ZIM file with zimwriterfs.
  • Cleaning up temporary files.

Prerequisites

  • Raspberry Pi OS / Debian / Ubuntu
  • wget
  • zimwriterfs (included in zim-tools)

Install dependencies on Raspberry Pi:

sudo apt update
sudo apt install wget zim-tools

zimwriterfs becomes available after installing zim-tools.

Installation

Clone the repository:

git clone https://github.com/MaxHuiskes/Create-Zim-Files.git
cd Create-Zim-Files
chmod +x make_zim.sh

Usage

sudo ./make_zim.sh <site_url> <output_folder> <zim_title> <zim_description> <creator>

Example

sudo ./make_zim.sh http://textfiles.com /media/disk2t/data/selfmade \
"Textfiles.com Archive" \
"Archived text files from textfiles.com" \
"textfiles.com"

Arguments:

  • site_url → website to download
  • output_folder → location where the .zim will be stored
  • zim_title → title inside ZIM metadata
  • zim_description → description metadata
  • creator → creator metadata

The script deletes the temporary download directory and leaves only the final .zim.

Docker Stack Integration (Optional)

Serve the ZIM files with kiwix-serve:

version: "3.8"
services:
  kiwix:
    image: ghcr.io/kiwix/kiwix-serve
    container_name: kiwix
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - /media/disk2t/data:/data
    command: ["--library", "/data/library.xml"]

Steps:

  1. Place .zim files in /media/disk2t/data/.
  2. Update library.xml:
kiwix-manage /media/disk2t/data/library.xml add /media/disk2t/data/*.zim

or to also include subfolders

sudo kiwix-manage /media/kiwix/data/library.xml add $(find /media/kiwix/data -type f -name "*.zim") --zimPathToSave=/data
  1. Start:
docker compose up -d
  1. Access via:
http://<server-ip>:8080

Optional PDF Documentation

Requires pandoc + texlive:

sudo apt install pandoc texlive-xetex
pandoc docs/explanation.md -o docs/explanation.pdf

Contributing

Fork → Change → Pull Request.

License

MIT License

About

**ZIM Site Creator** – Automates website archiving into **ZIM files** for offline browsing with https://kiwix.org. Ideal for personal, educational, or portable offline libraries. Downloads websites, converts them to ZIM, and cleans up temporary files automatically.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages