[[PageOutline(2-5,Contents,pullout)]] = SEarch wiki and ticket ATtachments (SEAT) == Description This plugin allows text integral search in wiki and ticket attachments, including proprietary file formats such as .pdf, .doc, .ppt, etc. It uses [http://swish-e.org/ 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 [report:9?COMPONENT=SearchAttachmentsPlugin here]. If you have any issues, create a [/newticket?component=SearchAttachmentsPlugin new ticket]. [[TicketQuery(component=SearchAttachmentsPlugin,group=type,format=progress)]] == Download Download the zipped source from [export:searchattachmentsplugin here]. == Source Check out SearchAttachmentsPlugin from [/svn/searchattachmentsplugin here] using Subversion, or [source:searchattachmentsplugin browse the source] with Trac. == Installation * Install [http://swish-e.org swish-e], the open source system for indexing documents. * Install filter tools for the formats you want to index: * [http://www.wagner.pp.ru/~vitus/software/catdoc catdoc and catppt] * [http://www.foolabs.com/xpdf pdftotext] * Download the source code to YOUR_SOURCE_DIR. * Install the plugin: {{{#!sh 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: {{{#!sh 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: {{{#!ini [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 [[ChangeLog(searchattachmentsplugin, 3)]] == Author/Contributors '''Author:''' [wiki:deltroo] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''