|Version 3 (modified by 8 years ago) (diff),|
This is a slightly modified version of the IncludeSource macro to allow for partial includes.
This was originally done as a modification to the IncludeSource macro that was posted on [MacroBazaar http://trac.edgewall.org/wiki/MacroBazaar], but has been brought forward to 0.11. The old version is still posted there.
Note that the macro in the file is still named IncludeSource because it provides the existing functionality, but I've titled the hack differently to not conflict with the original. If people like this, it can be merged into the original IncludeSource to minimize confusion.
If you have any issues, create a new ticket.
Download the zipped source from [download:includesourcepartialplugin here].
Enabling the plugin
trac.ini, edit the components section to add the entry as
[components] includesource.* = enabled
Examples:# include entire file [[IncludeSource(trunk/proj/file.py)]] # includes line 20-50 inclusive [[IncludeSource(trunk/proj/file.py, start=20, end=50)]] # includes last 30 lines of file at revision 1200 [[IncludeSource(trunk/proj/file.py, start=-30, rev=1200)]] # include entire file but formatted plain [[IncludeSource(trunk/proj/file.py, mimetype=text/plain)]]
- 15931 by rjollos on 2016-10-19 17:07:30
Fixes a regression in r15745.
Patch by ebouaziz@…
- 15745 by rjollos on 2016-09-02 01:36:04
0.3: Properly construct the
Patch by ichael-dev@….
- 15744 by rjollos on 2016-09-02 00:56:21
ImportErrordue to missing