Contents
SEarch wiki and ticket ATtachments (SEAT)
Notice: This plugin is unmaintained and available for adoption.
Description
This plugin allows text integral search in wiki and ticket attachments, including proprietary file formats such as .pdf, .doc, .ppt, etc. It uses swish-e as the indexing system, which itself is GPL licensed, but is no longer under active development.
Key features:
- New Attachments source to the search page.
- An excerpt of the matching documents is presented in the result page.
- Any format is supported as long as there is a command line tool for plain text conversion (filter command).
Note: Trac 0.11.4 or later is required.
Bugs/Feature Requests
Existing bugs and feature requests for SearchAttachmentsPlugin are here.
If you have any issues, create a new ticket.
defect |
4 / 9 |
||
---|---|---|---|
enhancement |
1 / 1 |
||
task |
1 / 1 |
Download
Download the zipped source from here.
Source
Check out SearchAttachmentsPlugin from here using Subversion, or browse the source with Trac.
Installation
- Install swish-e, the open source system for indexing documents.
- Install filter tools for the formats you want to index:
- Download the source code to YOUR_SOURCE_DIR.
- Install the plugin:
python setup.py bdist_egg cp dist/TracSearchAttachmentsPlugin-0.1-py2.4.egg /path/to/your/env/plugins/
Configuration
- Use the trac-seat utility to index existing attachments:
cp YOUR_SOURCE_DIR/searchattachmentsplugin/0.10/trac-seat /path/to/your/env/index cd /path/to/your/env/index chmod +x trac-seat ./trac-seat /path/to/your/env meta ./trac-seat /path/to/your/env index -c cd .. chown -R apache:apache /path/to/your/env/index
- Configure your
trac.ini
file as follows:[components] ... searchattachments.* = enabled [attachment] ... # This is the path to the swish-e command on your system swish = /usr/local/bin/swish-e seat = /path/to/your/env/trac-seat # The first %s is the absolute path of the input file. # The second %s is the absolute path of the text file generated by the command. filter.doc = /usr/local/bin/catdoc -b "%s" > "%s" filter.ppt = /usr/local/bin/catppt "%s" > "%s" filter.pdf = /usr/bin/pdftotext "%s" "%s"
Comment: I have had better success omitting the -b flag to catdoc.
There is no need to declare a filter command for .txt or .text. Text files are handled natively. To index a new non-text format, just add a
filter.*
entry using the appropriate command line tool for this format.filter.EXTENSION = path_to_EXTENSION_to_text_command -infile "%s" -outfile "%s"
- Restart the Trac server.
Recent Changes
Author/Contributors
Author: deltroo
Maintainer: none (needsadoption)
Contributors: