SEAT plugin: SEarch wiki and ticket ATtachments


This plugin allows text integral search in wiki and ticket attachments, including proprietary file formats such as .pdf, .doc, .ppt, etc.

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.


4 / 9


1 / 1


1 / 1


Download the zipped source from here.


Check out using Subversion, or browse the source with Trac.


  • Install swish-e, the open source system for indexing documents.
  • Download the source code to YOUR_SOURCE_DIR.
  • Install the plugin:
    python bdist_egg
    cp dist/TracSearchAttachmentsPlugin-0.1-py2.4.egg /path/to/your/env/plugins/
  • 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:
    searchattachments.* = enabled
    # 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

15177 by rjollos on 2016-01-26 19:12:25
0.2dev: Fix indentation using
14892 by rjollos on 2015-08-28 02:22:07
Convert to datetime. Untested patch by srl100@…. Fixes #4930.
14470 by rjollos on 2015-02-27 22:50:21
Branching for Trac 1.0.


Author: deltroo
Maintainer: none (needsadoption)

Last modified 11 months ago Last modified on Nov 23, 2015, 4:57:32 PM