_ _ _ ____ _ _
/ \ _ __ ___ | |_| |__ ___ _ __ | _ \ _ __ ___ (_) __| |
/ _ \ | '_ \ / _ \| __| '_ \ / _ \ '__| | | | | '__/ _ \| |/ _` |
/ ___ \| | | | (_) | |_| | | | __/ | | |_| | | | (_) | | (_| |
/_/ \_\_| |_|\___/ \__|_| |_|\___|_| |____/|_| \___/|_|\____|
bbs
XQTRs lair...
Home //
Blog //
NULL emag. //
Files //
Docs //
Tutors //
GitHub repo
.ZIM Files - Kiwix
Posted on: 2023-09-28, by xqtr
#blog
On the past i have written a guide on how to use Kiwix to have an offline
version of Wikipedia and other wikis on a BBS, or just your local computer.
You just download a .zim file and use a zim reader like Kiwix and browse the
data, as in your normal browser. Except wikis, someone can have mirror of
other sites.
In the main zim repository of Kiwix, you will find many files to download.
Make sure to download the lowtechmagazine and termux. There are very helpful
to have as an offline resource.
But, wouldn't be great to create our own .zim files? and make mirrors of
sites we use? One of them, i would always like to have as a local resource,
would be the Mystic BBS Wiki page. So lets create it!
We will use the simplest tools, such as wget and some zim tools. So make sure
you have wget (sudo apt-get install wget) and also zim-tools (sudo apt-get
install zim-tools).
To make the mirror site, we use wget, with the following syntax:
wget -mkEpnp --wait=1 http://wiki.mysticbbs.com
Read the man page for details, but make sure to include the --wait option, to
not overload the server and perhaps even ban your ip. Wget will download the
complete site, which is not very large, about 10-15MBs. When it's finished,
you will have a folder with name "wiki.mysticbbs.com" in your current folder.
To create the .zim file, we use the zimwriterfs utility from the package we
installed earlier. The command is a bit big so take attention when copying it.
zimwriterfs -w index.html -I icon.png -c "g00r00" -p "g00r00" -t "Wiki Mystic
BBS" -d "Wiki page of MysticBBS" -l en -i wiki.mysticbbs.com/ mysticbbs.zim
In a few seconds, you will have the zim file ready to use. But first let
explain some details on the command above.
The -w index.html is the main html file of the site and the switch -w is
relative to the folder the files are. So for the command to work, you have to
be inside the wiki.mysticbbs.com folder. Also the -I icon.png refers to an
image file of dimensions 48x48 which must be inside the folder.
When you download the site, you wont find such an image file, so make sure to
create one of your own. The process will not continue if you don't use all
the given parameters. Read the help screen of the utility to understand why.
The rest options of the command are self explanatory. You give the name of
the site, a small description, the owner/creator of the file and site and
last the filename.
Now to use the file and browse the contents of it, you can download kiwix or
use any zim reader you want. I prefer kiwix-serve from the kiwix-tools
package, which is a cli server and lets you use any browser you like, like
firefox. To use it, give the command:
kiwix-serve -p 8080 -i 127.0.0.1 filename.zim
or
kiwix-serve -p 8080 -i 127.0.0.1 *.zim
It's better to use the 127.0.0.1 ip, than localhost or your current IP, cause
at least on my computer i had problems. Also the port, i found that if use
other than 8080 or 80, firefox refuses to connect. So the above command is a
good choice.
I have made my own mirror of the mystic wiki, so if you want, you can
download it from here:
mysticbbs.zim