Changes between Version 3 and Version 4 of IncludeAttachmentMacro
- Timestamp:
- Aug 23, 2016, 6:33:39 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IncludeAttachmentMacro
v3 v4 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = IncludeAttachment - embedthe text of an attachment3 = Display the text of an attachment 4 4 5 5 == Description 6 6 7 This macro embeds the contents of an attachment in a wiki-format ed text (e.g. a wiki page or a ticket). The text of the attachment is syntax-highlighted according to its MIME type. Currently only attachments of mime types starting with `text/` are accepted.7 This macro embeds the contents of an attachment in a wiki-formatted text, for example a wiki page or a ticket. The text of the attachment is syntax-highlighted according to its MIME type. Currently only attachments of mime types starting with `text/` are accepted. 8 8 9 == Examples 10 11 Include the attachment named `attachment.txt` of the `MyPage` wiki page: 9 To include the attachment named `attachment.txt` of the `MyPage` wiki page: 12 10 13 11 {{{ … … 15 13 }}} 16 14 17 Include a source file from a ticket attachment:15 To include a source file from a ticket attachment: 18 16 19 17 {{{ 20 18 IncludeAttachment(ticket:42:somefile.c) 21 19 }}} 22 23 == Permissions24 20 25 21 The user must have the `ATTACHMENT_VIEW` permission on the attachment to be able to include it using this macro. … … 49 45 Change to the directory where you unpacked or checked out the sources and generate the .egg file: 50 46 51 {{{ 47 {{{#!sh 52 48 $ cd includeattachmentmacro/trunk 53 49 $ python setup.py bdist_egg 54 50 }}} 55 51 56 Copy the .egg file to the `plugins` directory of your trac environment:52 Copy the .egg file to the `plugins` directory of your Trac environment: 57 53 58 {{{ 54 {{{#!sh 59 55 $ cp dist/IncludeAttachment-0.1-py2.7.egg /path/to/trac/env/plugins 60 56 }}} 61 57 62 Enable the plugin in the trac configuration file (`/path/to/trac/env/conf/trac.ini`):58 Enable the plugin in the trac configuration file `/path/to/trac/env/conf/trac.ini`: 63 59 64 {{{ 60 {{{#!ini 65 61 [components] 66 62 includeattachment.* = enabled