[NetBSD logo]    &    [Google logo]

NetBSD-SoC: Apropos replacement based on mandoc and SQLite's FTS: Final Status Report


The main objective of the project was to develop a replacement tool for apropos(1) which would provide a better search experience. We often encounter situations where we are faced with a problem whose solution is easily answered somewhere in some man page but due to the lack of a search tool, we either turn towards Google or seek the advice of an expert. The aim of this project was to try to develop such a search tool, which would point the user towards the solution.

Deliverables Proposed & Delivered

Deliverables Proposed & Not Delivered

Details About The Deliverables Produced

There are two command line utilities 'makemandb' and 'apropos'. You would first need to build the Full Text Search (FTS) Index using makemandb(1) and then you can use apropos(1) (the one provided by this project) to perform searches.

A Library Like Interface

Besides the two command line tools, I have also developed a very small library to allow and build a search application on top of the FTS index built by makemandb. It has following public functions: For more detailed documentation you can read up the man pages of the individual components.

Requirements For Building & Running

Following are the requirements for building and running it on NetBSD:
  1. -CURRENT version of NetBSD (or at least -CURRENT man pages and -CURRENT version of man(1) ).
  2. libmandoc from mdocml.


Some Personal Remarks


I owe a big chunk of the success to my mentor Joerg Sonnenberger who was always there to answer my questions, offer advice and review the code. I have learnt a great deal from him and I am sure I have improved as a programmer. The best thing about working with him was that he never really disclosed the solution, instead he gently guided towards the direction of the solution, so I never lost a learning opportunity :-)

David Young also offered valuable guidance during the project. He provided some clever insights and tips to improve the search and ranking of the results. I decided to decompose the database into more columns based on different sections in a man page based on his idea only.

Thanks to Kristaps Dzonsons as well who is responsible for the mdocml project. He also reviewed the code related to parsing of the pages and pointed out bugs in the code. I implemented makemandb based on his utility "mandocdb", so that was also a huge help.

Special thanks goes to Thomas Klausner for reviewing the man pages I wrote and also proving patches for the errors/mistakes I had made in them. I must also thank Julio Merino, Jan Schaumann, Jukka Ruohonen, S.P.Zeidler for the interest they showed in the project and offered help throughout :-)

And thanks to lots of other people in the community as well whose names I forgot to mention. It was encouraging to see responses to each status report I made and kept me excited.

What Next

I thoroughly enjoyed my experience while working on this project. I would definitely like to continue working in the NetBSD community, in fact I was discussing with Joerg about some of the projects I could work on. I have interest in systems programming but not enough knowledge, but I don't mind learning ;-)
Get NetBSD Summer of Code projects at SourceForge.net. Fast, secure and Free Open Source software downloads
Abhinav Upadhyay <er.abhinav.upadhyay at gmail dot com>
$Id: final-report.html,v 1.3 2011/08/25 20:41:41 abhinavupadhyay Exp $