Cantor Integrated Documentation : Week 1 and 2 Progress

Hello KDE people!! It's been almost couple of weeks of the coding period already, and it has been hectic already. I was mostly able to stick to the timeline I had proposed, just loosing couple of days here and there. None the less, I am here presenting my progress on the project.

Things Done

1. Creation of QHP file
It stands for Qt Help Project. This is similar to xml’s file format. It contains the table of contents, indices, and references to the actual documentation files (*.html). This file is later passed to qhcp (Qt Help Collection File). It contains various tags like table of contents, section tag for defining the actual documentation, keywords tag for defining the indices for the documentation, files tag for listing all the files required. Click here for more details on qhp

For adding the keywords that will serve as the index for the documentation, I made use of the index.hhk file that is shipped with the official installation of Maxima. But, copying and adding each and every index (~2.5k of them) from index.hhk to .qhp file would have been a difficult task. So as a solution, I utilized the power of Python to write a script that will do it for me. Here is the link to that script if you are interested.

Steps to extract the indices from index.hhk file to add them to qhp
index.hhk is an index file shipped with the Maxima documentation. To extract all the indices, run the python script named over the index file to get the keywords listed for qhp file. Copy and paste the output.txt file’s content to qhp file under keywords section.

2. Creation of QHCP file
It is an XML file that contains references to the compressed help files that should be included in the help collection. This file can be passed to the help generator for creating a qhc and qch files in one go. Refer this link for more information
Use the following command to generate the above said files.
qhelpgenerator mycollection.qhcp -o mycollection.qhc 

3. Adding custom style to the Maxima's official documentation 

I have also tried customizing the official documentation. I personally did not liked the layout of the official documentation, so I tried to add some styling to it. Currently I am in process of doing it.  Adding style to hundreds of HTML files was a challenge and tedious task to be completed manually. I again utilized Python's power and created a script to link the main CSS file to the HTML files. Here is the script.
Below is a screenshot taken from QtAssistant browser when I load the .qch file which is generated in the previous step. (Edit->Preferences->Documentation->Add).

That's all folks for this time, until then, Good bye!!


Popular posts from this blog


About my GSoC project