HelpView

Documentation in Current GNU/Linux Systems

On today's GNU/Linux systems, one of the most important and unresolved issues is the documentation. There is no standard way to store (everybody wants to store their documentation in a different place), query (currently, only man and info pages can be searched) or display (some display html, some display text, some store DocBook and display html) documentation.

Before making our proposal let's have a look at various help systems on the GNU/Linux platform and discuss what's wrong with them. There is something wrong with each; this is the reason there are so many.

What Should a Good Help Viewer Include

A good help viewer should: The following items also could be implemented:

Proposal

File Format and the Viewer

HTML satisfies all of the above conditions that apply to the document format. Most document writers are aware of the above necessities so there is a lot of documentation in HTML format. Therefore we should use HTML. There really is not much motivation to support more than one output format unless you are a book publishing company. That can also be supported: a publisher may do its updates on the sources used to generate the HTML and provide the HTML to its users.

When you want to view HTML on a GNU/Linux system, you really have only two choices: mozilla or links. Mozilla is a much capable browser but it suffers from the many bugs, very slow startup time and complexity of embedding. However, links is a very light-weight, simple implementation which also works much faster than mozilla. So, I will use links as the 'host'. As a matter of fact, I already have a learned how to use links for the job in about 2 hours thanks to the modular structure links was written in.

For ease of transporting and installing documents, a document should just be a single file. With multiple files and nested directories, there are some issues:

Because of these reasons, I will implement a document as a zip archive. zip archives have the advantages of being created easily, providing most of the content if there is no help viewer on a system and of course, compression. See openoffice.org documentation for good reasons to choose .zip format as a document format.

Search System

Each subdocument in a document should contain keyword information. These keyword-subdocument pairs are collected into a file inside the zip archive. This index is added to the system index when the document is installed.

Each keyword should also have a 'type'. For example, the keyword printf can exist in two documents, one inside the manual for the printf function of libc with type cfunc and another inside the manual for the printf program with type prg.

It should also be possible to search for words in the bodies of the documents for very hopeless situations (i.e. user has no clue where to start).

Browsing

A unique identifier should be supported for each document independent of its location in the installation. This can be easily accomplished by using hierarchial names which also make sense for the user. For example, the document for the Konsole program could be named kde.console or gimp could be named gnome.image.editor etc. These identifiers are for the system only, they should not be the name of the programs since those can change. Normally, a user would find a document using a query, not by trying to find it's document name.

All documents should contain an index.html which will be used in case the user opens a document using it's filename. The filename alone does not give any indication about which subdocument should be displayed.

Bookmark System

As said above, the bookmark system will enable the user to mark places in documents in a consistent manner across all installations. This system already exists in links. Just recording the URL's should be enough.

Scripting System

I think lua is the best language to provide scripting services through. lua is designed specifically for embedding.

Each scripted document should have a corresponding file under /scripts. Suppose /users/add_user.html is scripted. In this case, /users/add_user.html is fed as an input to /scripts/users/add_user.html.

Hosted by www.Geocities.ws

1