Changes between Version 20 and Version 21 of SearchAttachmentsPlugin


Ignore:
Timestamp:
Mar 4, 2015, 9:21:46 PM (9 years ago)
Author:
Ryan J Ollos
Comment:

More page cleanup.

Legend:

Unmodified
Added
Removed
Modified
  • SearchAttachmentsPlugin

    v20 v21  
    3232
    3333  * Install the plugin:
    34 {{{
    35     python setup.py bdist_egg
    36     cp dist/TracSearchAttachmentsPlugin-0.1-py2.4.egg /path/to/your/env/plugins/
     34 {{{#!sh
     35python setup.py bdist_egg
     36cp dist/TracSearchAttachmentsPlugin-0.1-py2.4.egg /path/to/your/env/plugins/
    3737}}}
    3838
     
    4343    '''Comment''': This is already done for Trac 0.11.4.
    4444
    45 {{{
     45 {{{#!python
    4646
    4747162     def insert(self, filename, fileobj, size, t=None, db=None):
     
    8080
    8181  * Use the trac-seat utility to index existing attachments:
    82 {{{
    83     cp YOUR_SOURCE_DIR/searchattachmentsplugin/0.10/trac-seat /path/to/your/env/index
    84     cd /path/to/your/env/index
    85     chmod +x trac-seat
    86     ./trac-seat /path/to/your/env meta
    87     ./trac-seat /path/to/your/env index -c
    88     cd ..
    89     chown -R apache:apache /path/to.your/env/index
     82 {{{#!sh
     83cp YOUR_SOURCE_DIR/searchattachmentsplugin/0.10/trac-seat /path/to/your/env/index
     84cd /path/to/your/env/index
     85chmod +x trac-seat
     86./trac-seat /path/to/your/env meta
     87./trac-seat /path/to/your/env index -c
     88cd ..
     89chown -R apache:apache /path/to.your/env/index
    9090}}}
    9191
     
    9393
    9494  * Configure trac.ini:
    95 {{{
     95 {{{#!ini
     96[components]
     97...
     98searchattachments.* = enabled
    9699
    97    [components]
    98    ....
    99    searchattachments.* = enabled
     100[attachment]
     101...
     102# This is the path to the swish-e command on your system
     103swish = /usr/local/bin/swish-e
     104seat  = /path/to/your/env/trac-seat
    100105
    101    [attachment]
    102    ...
    103    # This is the path to the swish-e command on your system
    104    swish = /usr/local/bin/swish-e
    105    seat  = /path/to/your/env/trac-seat
    106 
    107    # The first %s is the absolute path of the input file.
    108    # The second %s is the absolute path of the text file generated by the command.
    109    filter.doc = /usr/local/bin/catdoc -b "%s" > "%s"
    110    filter.ppt = /usr/local/bin/catppt "%s" > "%s"
    111    filter.pdf = /usr/bin/pdftotext "%s" "%s"
     106# The first %s is the absolute path of the input file.
     107# The second %s is the absolute path of the text file generated by the command.
     108filter.doc = /usr/local/bin/catdoc -b "%s" > "%s"
     109filter.ppt = /usr/local/bin/catppt "%s" > "%s"
     110filter.pdf = /usr/bin/pdftotext "%s" "%s"
    112111}}}
    113112
     
    117116
    118117  There is no need to declare a filter command for .txt or .text. Text files are handled
    119   natively. To index a new non-text format, just add a filter.* entry using the appropriate
     118  natively. To index a new non-text format, just add a `filter.*` entry using the appropriate
    120119  command line tool for this format.
    121 {{{
    122    filter.EXTENSION = path_to_EXTENSION_to_text_command -infile "%s" -outfile "%s"
     120 {{{
     121filter.EXTENSION = path_to_EXTENSION_to_text_command -infile "%s" -outfile "%s"
    123122}}}
    124123