IncludeSourcePartial?

Description

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 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.

Bugs/Feature Requests

Existing bugs and feature requests for IncludeSourcePartialPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out IncludeSourcePartialPlugin from here using Subversion, or browse the source with Trac.

Enabling the plugin

In trac.ini, edit the components section to add the entry as follows:

[components]
includesource.* = enabled

Example

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)]]

Recent Changes

[5038] by chrisheller on 12/21/08 14:58:23

Fixes ticket #4315

[5023] by mauro on 12/18/08 06:31:40

Include izzy's setup code for installling the plugin through easy_install

[4590] by chrisheller on 10/27/08 04:33:38

Restore original fallback of patch. See ticket:3911

[4589] by chrisheller on 10/27/08 04:11:14

Fix reported issue with multirepos patch running on 0.11.1. This now makes an explicit test of whether multirepo support is available. If not, fall back to existing behavior.

Author/Contributors

Author: chrisheller
Contributors: