bendun.cc

OFFLFIRSOCH 2024: offline docs

Written

OFFLine-FIRst SOftware CHallenge, or OFFLFIRSOCH is solderpunk (web link) initiative "to write and share a piece of software which works as well offline as it does online". While I'm not part of their community and this is clearly not a Gemini document and there is at least 4 months after the deadline the idea was so cool that I had to participate.

Offline documentation

I hate SEO and what it done to the documentation results. If I type Python decorators I want to see Python documentation, not some weird tutorial sites written by bots. As it turns out, my distro of choice, Arch Linux, puts a lot of documentation under /usr/share/doc/, including Python one! Now I need only nice way to see it.

I put some quick Ruby templates to generate nginx configuration that would serve each documentation that I find useful. For example I have python.localhost which serves /usr/share/doc/python/html/ and rust.localhost which serves result of rustup doc --path.

One problem that this setup has is lack of search engine that would connect all of this documentation into one browsable form. Still looking for one that is easy to setup and wouldn't drain my resources since it is hosted locally on my machine. Most packages are easily browsable with the exceptions of Arch Wiki which really needs a search engine - by the default it is just a flat list of html files in directory.

You can find source code on Github. In the repo there is also a script that gives rough idea of what Arch Linux packages you must install to get documentation for packages you already have installed.