39 | | python set-up bdist_egg |
40 | | cp searchattachmpents.egg YOUR_TRAC_ENV/plugins |
41 | | }}} |
42 | | |
43 | | * Configure the [attachment] section of trac.ini |
44 | | |
45 | | `[components]`[[BR]] |
46 | | `searchattachments.* = enabled` |
47 | | [[BR]][[BR]] |
48 | | `[attachment]`[[BR]] |
49 | | `swish = /usr/bin/local/swish-e`[[BR]] |
50 | | `filter.doc = /usr/local/bin/catdoc -b "%s" > "%s"`[[BR]] |
51 | | `filter.ppt = /usr/local/bin/catppt "%s" > "%s"`[[BR]] |
52 | | `filter.pdf = /usr/bin/pdftotext "%s" "%s"`[[BR]] |
53 | | [[BR]] |
54 | | ''swish'' |
55 | | path to the swish-e command on your system. |
56 | | |
57 | | ''filter.*'' |
58 | | command to use for converting a non-text format to text. The command takes a file as input (first ''%s'') and writes the generated a text file in a file (second ''%s''): |
59 | | |
60 | | |
61 | | There is no need to declare a filter command for .txt or .text. Text files are handled |
62 | | natively. To index a new non-text format, just add a filter.* entry using the appropriate |
63 | | command line tool for this format. |
64 | | {{{ |
65 | | filter.myEXT = my_command -infile "%s" -outfile "%s" |
| 40 | python setup.py bdist_egg |
| 41 | cp dist/TracSearchAttachmentsPlugin-0.1-py2.4.egg /path/to/your/env/plugins/ |
115 | | * '''restart''' the trac server ( /etc/init.d/httpd restart) |
| 95 | * Configure trac.ini |
| 96 | {{{ |
| 97 | |
| 98 | [components] |
| 99 | .... |
| 100 | searchattachments.* = enabled |
| 101 | |
| 102 | [attachments] |
| 103 | ... |
| 104 | # This is the path to the swish-e command on your system |
| 105 | swish = /usr/local/bin/swish-e |
| 106 | seat = /path/to/your/env/trac-seat |
| 107 | |
| 108 | # The first %s is the absolute path of the input file. |
| 109 | # The second %s is the absolute path of the text file generated by the command. |
| 110 | filter.doc = /usr/local/bin/catdoc -b "%s" > "%s" |
| 111 | filter.ppt = /usr/local/bin/catppt "%s" > "%s" |
| 112 | filter.pdf = /usr/bin/pdftotext "%s" "%s" |
| 113 | }}} |
| 114 | |
| 115 | There is no need to declare a filter command for .txt or .text. Text files are handled |
| 116 | natively. To index a new non-text format, just add a filter.* entry using the appropriate |
| 117 | command line tool for this format. |
| 118 | {{{ |
| 119 | filter.EXTENSION = path_to_EXTENSION_to_text_command -infile "%s" -outfile "%s" |
| 120 | }}} |
| 121 | |
| 122 | * '''restart''' the trac server |
| 123 | |