This article will show you an easy way of quickly uncovering a lot of documentation that is sitting right on your system that I will bet you don’t even know that you have. Recently after installing a library and accompanying documentation, I had to dig into /usr/share/doc/lib-so and so only to find the docs were in HTML and had an INDEX.HTML launched. It was a Sunday and I had some time to burn so I surfed around a few more of the folders in doc and there were a number of applications and libraries that distributed their docs that way. It did seem rather random which ones fit this pattern and which ones did not so I wanted a cleaner way to view this documentation all in one place.
As an experiment I wrote a little Python script called Idxer (1.0 has been put under the GPL here) which does two simple things: it walked the /usr/share/doc looking for any sets of documentation with an INDEX.HTML file and it would output a simple HTML document with links to all of your documentation.
Installation:
This is my kind of installation:
1. Down load the latest source here: idxer1.0.tar.gz
2. Untar the source: tar -zxf ./idxer1.0.tar.gz
3. Done.
Use is equally simple:
1. Change to the idxer folder.
2. Run idxer.py, passing to it the name of the target output file. In my case I am doing mydocs.html
When done I had a file called mydocs.html. When opened in FireFox it looked like this:
I was surprised to learn that I had over 120 documentation packages installed. There were game docs, lots of linux, unix and best of all, programmer docs just waiting to be devoured. Here are just a few I found on my box:
- Dive into Python
- Debian Reference
- Bazarre docs
- Monotone docs
- TV Time
- GDB
- GCC
- wxGlade
- Twisted lib
- LAME docs
- Image Magick
- libcurses, SDL, OGG, Glib, WWW, XML, Vorbis, TIFF and more
- espeak
- Valgrind
- XSane
I know, what this does it neither sexy (code and output are very plain for a reason) nor is it complex; it simply does something handy for me and I hope it does for you. If you want to add additional paths to the scan it should be a simple affair to code them into indexDocs(). If you have other mime-types installed for your browser you could modify the find call in indexDocs() to search for additional documentation types.
In any event, you can set up a cron job to run this periodically and drop a bookmark to it in Firefox or your favorite browser and always have your latest (HTML) docs at your fingertips.
Enjoy.
JeffC



Related Articles
3 users responded in this post
apt-get install dhelp?
Or, for those not in the know, maybe
apt-cache show dhelp
first?
(Ubuntu, Debian, …)
Sorry to be such a spoiler
OTOH, since global system documentation doesn’t seem to be readily available everywhere, maybe the Linux distros should focus much more on having this offered prominently?
No worries and I figured that there had to be a better way…I think I did look at dhelp in the apt-cache but for some reason mentally confused it with the gnome-specific devbooks system (mostly shows up when you install the full-boat version of Anjuta)..while useful, not quite the same.
Thanks for the tip! dhelp is now installed…
JeffC
[...] Unlock a goldmine of knowledge on your Linux desktop….. [...]
Leave A Reply