This is a collection of commandline tools for indexing text documents and looking them up. They are very simple but work for me, perhaps someone would like to improve them. Programming language: Ada (FSF gcc 4.6 or higher, Ada 2005)

Sledgehammer Tools

==================

Sledgehammer is a free text file indexing tool written in Ada that consists of two helper programs:

sh-index - for creating an index given some directory

sh-lookup - for looking up entries in the index, including an interactive mode

The programs are licensed under GNU General Public License 3.0 and come with ABSOLUTELY NO WARRANTY. This package should have come with a copy of the GPLv3 license in a file called "License.txt".

Installation

------------

There is a makefile that calls gnatmake on the project file. The usual sequence

make

make install

will compile and install the binaries in /usr/local/bin under the names sh-index and sh-lookup. Check the online help with the flag -h for usage information.

Dependencies and Platforms

------- ------- ------- -----

Sledgehammer tools require FSF Ada in GCC 4.6 or higher for compiling and the following commands available in /usr/bin:

find

pdftotext, iconv, odt2txt, antiword, detex, ps2txt, dvi2tty, html2txt, unrtf

Please check the implementation in converters.adb for more information.

The tools have only been tested on GNU/Linux. For Unix systems you might need to check the content of the sigchld_handler files and adapt them as necessary.

Troubleshooting

---------------

If you get an out of stack error, you might need to increase the hard coded stack size at the beginning of index.adb to a higher value. Current default is 64MB and should be plenty for most purposes.

If you run out of memory during indexing, buy more memory.

Contact

-------

The tools are called sledgehammer, because the methods used are like using a sledgehammer for putting a screw into the wall. Please feel free to make improvements.