kiwix / kiwix-tools

Command line Kiwix tools: kiwix-serve, kiwix-manage, ...
https://download.kiwix.org/release/kiwix-tools/
GNU General Public License v3.0
433 stars 85 forks source link

Add additional ZIM files with no XML file? #493

Closed mad2moons closed 2 years ago

mad2moons commented 2 years ago

Downloaded 'kiwix tools' and extracted to:

/usr/local/bin

Moved main wikipedia ZIM file to /media/mynewdrive/

Created a kiwix.service file nano /etc/systemd/system/kiwix.service

[Unit] Description=Kiwix Service After=network.target

[Service] Type=simple User=root Group=root ExecStart=/usr/local/bin/kiwix-serve /media/mynewdrive/wikipedia_en_all_maxi_2020-11.zim -p 8080 Restart=always RestartSec=3

[Install] WantedBy=multi-user.target


sudo systemctl enable kiwix sudo systemctl start kiwix

http://localhost:8080/

and wikipedia works fine. I wish to be able to add other ZIM files so that i have a choice on main served webpage. I have tried various solutions to add other ZIM files but there is no .xml file. The service file will not let me add any other ZIM files, it just ignore them.

I've looked through the documentation and cannot find anything on how to have multiple ZIMs running at once.

mgautierfr commented 2 years ago

You can specify several zim file from the command line kiwix-serve foo.zim bar.zim -p 8080. Or you can generate a xml using kiwix-manage (kiwix-manage mylib.xml add foo.zim) and pass the library to kiwix-serve (kiwix-serve -l mylib.xml -p 8080)