The Macro Bazaar
THIS PAGE IS DEPRECATED: It will be removed after 01 July 2015. If you are the author of a macro listed here, please move it to more suitable hosting. trac-hacks.org provides free hosting for TracPlugins, WikiProcessors and WikiMacros.
Some macros got removed, as they are (or their functionality is) now available as plugins on th:wiki. There is currently a discusson if this page should be phased out completely on trac-dev list.
Looking for fresh macro goodness for your Trac installation? Have you written a clever macro you're dying to share with the world? This is the place.
The macro bazaar is for sharing information about user-developer macros, links to source code and requests.
Note: Please state your name, email, and version of Trac your macro is developed for.
Another Note: Trac Hacks provides free Trac + Subversion hosting for Trac macros, patches, plugins, etc.
Installing a macro (old style "HDF" macros)
- Download the <macro>.py file.
- Save it to your
projenv/wiki-macros
directory - Restart your web server
- Open a Wiki page and add the macro text to test the macro (usually something like
[[Macro]]
or[[Macro(argument1, argument2)]]
Note that this kind of macros is still supported in Trac 0.10, but deprecated. You should start developing and using macros as plugins implementing the IWikiMacroProvider
interface, or, even simpler, inheriting from the trac.wiki.macros.WikiMacroBase
class.
Installing a macro (new style macros)
This follows the same rules as installing a plugin, see TracPlugins.
But usually, macros are simple enough so that they can be developed as single file plugins. In that case, the installation is simpler, and much similar to the above:
- Download the <macro>.py file.
- Save it to your
projenv/plugins
directory - Restart your web server
- Open a Wiki page and add the macro text to test the macro (usually something like
[[Macro]]
or[[Macro(argument1, argument2)]]
Example for such macros are provided below:
You can edit the macro by using any text editor and editing the trac.db/wiki-macros/<macro>.py file. Make the appropriate changes, restart the web server you are using, and the changes should appear.
To delete the macro, just delete all the macro files in the trac.db/wiki-macros directory (that have the form <macro>.*).
Examples
HelloWorld
A simple example macro. Distributed with Trac.
Download: source:trunk/wiki-macros/HelloWorld.py
By: TracTeam — Ver: >0.5.2
Includes
include
Inserts the output of an external URL.
Example:
[[include(http://www.example.com/)]]
Download: http://randomfoo.net/code/trac/include.py
By: lhl — Ver: 0.7.1
Replacement that also handles the WikiFile macro below. Docs are inside the module @ the top.
Download: Include.2.py
By: csawyer@… — Ver: 0.8
Download: Include.3.py
By: cbrant@… — Ver: 0.9.3
WikiInclude
Inserts the contents of another wiki page. It expands arguments in the page in the form {{N}}.
Example:
[[WikiInclude(Foo)]] [[WikiInclude(Foo|Argument1|Argument2..|ArgumentN)]]
Version: ≥ 0.8
Download: WikiInclude.py
Version: ≥ 0.9
Download: WikiInclude.2.py
By: Vegard Eriksen zyp at jvnv dot net
Version: ≥ 0.11
Download: WikiInclude.0.11.py
By: chelah@…
Based on WikiInclude, I've created the sucessor TracWikiTemplates Plugin - s0undt3ch
WikiFile
Inserts the output of an URL/file as wiki file. The file can be written in trac syntax and the macro will convert it to html.
The macro looks at the suffix of the file and tries to interpret it according to that syntax,
html will be intrepreted as html
rst will be interpreted Restructured Text
cpp as c++ etc
So you can have a file on the filesystem that is written with trac syntax or restructured text and display it within the wiki. The advantage is that you can use version control on file. The disadvantage is that you cant click page history and see the history of the page. You can also not edit the file within the Wiki which takes away alot of the advantages of a Wiki. But within a company it might be ok.
Example:
[[WikiFile(http://www.example.com/myfile.rst)]]
Download: WikiFile.py By: Toni Brkic toni.brkic at switchcore.com — Required ver patch for #801 must be implemented
MimeInclude
Inserts the output of an external URL, with an optional MIMEtype argument for rendering mode and colorization. See the examples in code docstring. Enjoy!
Download: MimeInclude.py
By: Carlo C8E Miron <carlo.miron AT gmail.com> — Ver: ≥ 0.8.1 (tested on Debian versions 0.8.1-2 until 0.8.4-1)
IncludeSource
This plugin define a new wiki macro "IncludeSource", then you can use a source file under subversion as wiki source for trac wiki.
Example:
[[InsertSource(/path/to/wiki-source-file/under/subversion)]]
Download: http://niw.at/articles/2006/12/16/include-source-wiki-macro-for-trac
By: niw — Ver: = 0.10.x
I have attached a modified version of the IncludeSource macro here. It is based on niw's version (linked above), buts adds a few new features, such as line numbering with links (just like the regular Trac browser pages), along with support for including line ranges and targeting specific revisions.
From the macro doc:
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)]]
Note that it currently has a bug with calling the macro twice in the same page. The source has additional information about where this happens. It seems to be related to apr pool stuff in the subversion python bindings.
By: chris.heller — Ver: = 0.10.x
Site Navigation
BackLinks
First stab at a macro that displays all wiki pages linking to a specified page name.
Usage:
[[BackLinks(pagename)]]
I'd really like it to default to displaying backlinks to the current page when a page name isn't supplied, but, um, I have no idea how to do that. Suggestions greatly appreciated.
Download: BackLinks.py
By: Dan Hon <danhon+trac@…> — Ver. ≥ 0.7.1
Dan, here's an idea.
thispage = hdf.getValue('wiki.page_name', '')
Download: BackLinks.2.py patches the wikimacro to default to display backlinks to the current page if a page name is not specified.
By: Muness Alrubaie <muness@…> — Ver. ≥ 0.8
Well, both those seem to have a bug: they will list pages for which at least one version linked to thispage, rather than just the latest version. So here's a fixed macro.
Download: BackLinks3.py patches the wikimacro to display only pages where the latest version links to the specified or current page.
By: Andrew Durdin <adurdin at gmail.com> — Ver. ≥ 0.8
Well, both those seem to have a bug: they will list pages for which at least one version linked to thispage, rather than just the latest version. So here's a fixed macro.
Download: BackLinks.3.py based on Andrew's fix displays only pages where the latest version explicitly links (i.e. no CamelCase, only [wiki:... ...]
links) to the specified or current page.
By: Muness Alrubaie <muness@…> — Ver. ≥ 0.8
Download: BackLinks.4.py based on Andrew's and Muness's fixes, displays pages where the latest version contains either a CamelCase link OR explicitly links (i.e. [wiki:... ...]
links) to the specified or current page.
By: Ed Szynaka <trac@…> — Ver. ≥ 0.8
Download: BackLinks.5.py based on Andrew's and Muness's fixes, with UTF-8 support and links like [wiki:link]
.
By: Trapanator <trap@…> — Ver. ≥ 0.8
Question: Is there a chance to integrate the macro in the wiki menu like Title Index? Would be very appretiated.
Answer: See the section BackLinksMenu
BackLinksMenu
BackLinksMenu is a macro that that can show a menu with wiki-pages that refer to actual page or to one page of your choice.
You can download it from here: http://trac-hacks.org/wiki/BackLinksMenuMacro
By: Trapanator <trap@…> — Ver. ≥ 0.9
AutoNav
Derived from BackLinks. All references to the page where the macro is and all arguments supplied is sorted and looked up for references.
Example:
[[AutoNav()]]
Behaves as BackLinks above and gets all the references to this page in a list.
Example:
[[AutoNav(MyPage, AndThisPageToo, WithThisPage)]]
Add the Names "MyPage", "AndThisPageToo" and "WithThisPage" with the list of references to this page.
By: Anders Jansson <anders dot jansson at kastanj dot net>
Reimplemented old AutoNav as a plugin (a.k.a "new style macro") for Trac 0.10 and upcoming Trac 0.11 (#3958)
Download: autonav-trac-0.10.py autonav-trac-0.11.py
Installation: place in your TracEnvironment, in the plugins
subfolder.
By: Andrew Stromnov <stromnov at gmail dot com>, cboos
ParentLinkage
Inserts a sort of "breadcrumb" set of links to the parent, grand-parent and so-forth wiki entries. This macro is inspired and sorta based on the ParentWiki macro. This applies to wiki pages that have a "/" in their name indiciating the heirarchy.
There is one argument allowed and this is a simple string of equal signs in the spirit of the wiki header formatting. The string must contain one or more equal signs and no other characters. The argument will trigger the macro to wrap the entire linkage in the appropriate HTML heading tags (with id attribute set).
Something interesting to note is that if the content of the href's are CamelCased words; the macro will somewhat intelligently break them up with spaces. This feature will also take the words "And" and "Of" and replace them with "and" and "of" respectively resulting in "ThisAndThat" being converted into "This and That".
Download: ParentLinkage.py
Version: ≥ 0.10
By: Kevin C. Krinke <kevin@…>
ParentLinkage Example A:
If the current page was named "GrandParent/Parent/ACamelCaseName" and you insert:
[[ParentLinkage]]
Results in the following HTML output:
<a class="wiki" href="/wiki/GrandParent">Grand Parent</a> - <a class="wiki" href="/wiki/GrandParent/Parent">Parent</a> - A Camel Case Name
Which renders to something like:
Grand Parent - Parent - A Camel Case Name
ParentLinkage Example B:
If the current page was named "GrandParent/Parent/ACamelCaseName" and you insert:
[[ParentLinkage(==)]]
Results in the following HTML output:
<h2 id="GrandParent-Parent-ACamelCaseName"><a class="wiki" href="/wiki/GrandParent">Grand Parent</a> - <a class="wiki" href="/wiki/GrandParent/Parent">Parent</a> - A Camel Case Name</h2>
Which renders to something like:
== Grand Parent - Parent - A Camel Case Name ==
RelLink
Creates a link relative to the current page.
Examples: [[RelLink(deeper1)]]
Download: RelLink.py
Version: ≥ 0.8?
By: Thomas Richter tr+tracweb@…
ShowPath
Show the path to the specified wiki or the current wiki if none is specified. This is similar to the directory names at the top of the TracBrowser. This applies mainly to hierarchical wiki entries. e.g. the path to a Book/Chapter/Section/Subsection
would be WikiStart/Book/Chapter/Section/Subsection
(all but the current would be linked).
Download: ShowPath.py
Version: ≥ 0.8
By: Muness Alrubaie <muness@…>
Note: If this strikes you as something you want to hack into Trac (rather than calling it on every page) use TracShowPathPatch.
0.11 version available: same functionality as described above, but for Trac 0.11dev (trunk). See source for details and trac.ini options.
Download: ShowPath.2.py
Version: ≥ 0.11
By: Morris <gt4329b@…>
Redirect
It is sometimes useful to create alias names for wiki pages (or tickets or other trac objects. This can be accomplished using the "redirect" macro.
Download:
- For 0.8, use redirect.py
- For 0.9, please see http://svn.ipd.uni-karlsruhe.de/trac/javaparty/wiki/TracRedirect
Usage: E.g., on page RequestForRedirect use [[redirect(ticket:976)]] to create an alias wiki name for ticket #976.
Note: the argument to the redirect macro must be in general form of TracLinks (item:id).
Note: to edit a page that contains a redirect macro, you must type its URL directly into your browser's location bar and append the string '?edit=true' to it.
Version: ≥ 0.8; < 0.9
By: Bernhard Haumacher <haui at haumacher.de>
TOC
This macro adds the ability to create table of contents on any set of pages. If a page is not specified, the current page and version is used.
The table of contents is automatically generated from headings in the page.
Usage:
Table of contents for the current page and version:
[[TOC]]
Table of contents for multiple pages:
[[TOC(WikiStart, WikiFormatting)]]
Download: http://trac-hacks.org/wiki/TocMacro
By: Alec Thomas <trac-form@…>
Version: ≥ 0.7.1 (requires patch available at http://trac-hacks.org/wiki/AnchorPatch)
23/05/05: Michel Jouvin has added a titleindex
argument which
generates one line summaries for each page. He also modified the default
behaviour to exclude the top-level heading, only displaying sub-headings. You
can override this by explicitly including a page name. These changes have been
integrated into trunk at the URL below.
Time & Date
Timestamp
Inserts current date and time. Distributed with Trac.
Download: source:trunk/wiki-macros/Timestamp.py
By: TracTeam — Ver: >0.5.2
DateOffset
Returns the date referred to as follows:
- First arg is the offset, i.e. the date to start from
- Second arg is the multiplier to multiply the count by (e.g. 7 for a week)
- Third arg is the count (i.e. the number of additions to make).
So, for example:
[[DateOffset(2005/01/05,7,0)]]
returns Wed Jan 05[[DateOffset(2005/01/05,7,4)]]
returns Wed Feb 02
You can also configure the input and output date formats. (See http://python.org/doc/2.3.4/lib/module-time.html). e.g.:
[[DateOffset(01/05/2005,7,0,%m/%d/%Y,%A %B %d)]]
returns Wednesday January 05
Please email me fixes and excuse any obvious errors: I've never written any python before this.
Download: DateOffset.py
Version: ≥ 0.8
By: Muness Alrubaie <muness@…>
Miscellaneous
TracChart
http://www.piedcow.com/archives/2005/03/inspired_to_cre.html Simple* Chart Stylesheet. A simple stylesheet and chart generator based on Digital Media Minute XML/SWF Charts.
By: The Pied Cow — Ver: >0.8.0
Debbug
Link to the Debian BTS; either a package's bug page or a specific bug.
Example usage:
[[Debbug(123456)]] [[Debbug(trac)]]
Download:
Debbug.py
By: Joe Wreschnig — Ver: ≥ 0.5.2
Javadoc
Creates links to Javadoc pages based on a package or fully-qualified class name.
Example usage:
[[javadoc(java.lang)]] [[javadoc(java.lang.String)]] [[javadoc(java.lang.String, Text for link)]]
See source for customizing the available Javadoc URLs.
Download: javadoc.py
By: Matthew Good <matt-good.net> — Ver: ≥0.7.1
TracPythonDoc
Generates PythonDoc output for files in the repository.
Example usage for current revision:
[[TracPythonDoc(trunk/myproject/myfile.py)]]
And specific revision:
[[TracPythonDoc(trunk/myproject/myfile.py, 420)]]
Download: http://blog.melhase.net/files/TracPythonDoc.py
By: Troy Melhase <troy@…> — Ver: ≥0.9
Uncategorized
Download Stats
This macro shows webalizer statistics from one or more patterns. You have to give the webalizer html files path as first argument followed by one or more patterns using | (pipe) as delimiter.
Usage:
[[downloadStats(<path_to_webalizer>|<pattern_1>|<pattern_2>|...|<pattern_n>)]]
Example:
[[downloadStats(/var/www/webalizer/|sarge-i386-1.raw|debian-br-cdd_1.0pre5.iso)]]
Download: downloadStats.py
By: Tiago Bortoletto Vaz <tiago@…>
Ver. ≥ 0.7.1
UserChanges
Trivial change of the RecentChanges macro that only displays the recently changed pages for a specified user. Usage:
[[UserChange(username)]] or [[UserChange(username, # of last modified pages to display)]]
Download: UserChanges.py
By: David Mohr <datrac@…> — Ver. ≥ 0.7.1
SvnFiles
This macro autogenerates a list of clickable file links referring to files in a given directory of the repository whose names match a given regular expression. We needed this for a page giving an overall view of project progress for a project broken up into a shallow hierarchy, combined with ReTickets (below) it autogenerates an overview wiki page.
Please don't laugh at the code, I've been playing with trac for 2 days and had never touched python before writing these two…
Usage
[[SvnFiles(directory,regexp)]]
All arguments are needed, god alone knows what happens if you leave them out.
Download: SvnFiles.py Version: 0.8 By: Simon Stapleton <simon@…>
Download: SvnFiles.2.py Version: 0.9 By: Krachtwerk
Download: SvnFiles-0.10.py Version: 0.10 By: Rasmus — patched 0.9 with file name sorting and added <br /> at end of each line
ReTickets
This macro autogenerates a list of clickable ticket links (link number and person assigned) referring to tickets whose summaries match a given regular expression. We needed this for a page giving an overall view of project progress for a project broken up into a shallow hierarchy, combined with SvnFiles (above) it autogenerates an overview wiki page.
As an added bonus, hovering over the links gives the summary and description of the ticket.
Patched 2008-01-30 by Vladislav Naumov to handle a nasty issue with quotes in summary or description.
Usage
[[ReTickets(regexp)]]
Download: ReTickets.2.py
Version: 0.8
By: Simon Stapleton <simon.stapleton@…>
Updated By: Vladislav Naumov <vladislav.naumov@…>
Search
Build a search URL for the supplied argument or just a link to a search engine if no args are present. Set to use google. Edit the macro to modify the engine(/url).
Download: Search.py
Version: ≥ 0.8
By: Muness Alrubaie <muness@…>
TracSearch
Builds a link to search for a supplied argument in any or all of the wiki, changesets, and tickets.
Download: TracSearch.py
Version: ≥ 0.8
By: Andrew Durdin <adurdin at gmail.com>
Blog
A simple blog macro which renders matched wiki pages on one page. Only one month's wiki pages are shown at once.
Usage example:
[[Blog(blog/%)]] [[Blog(2004%,blog/%)]]
Note: if you're using macro redirect and AddComment, you may need to modify these macros to disable them by:
if hdf.getValue('macro.blog.rendering', '0') == '1': # workaround: if this wiki is rendering via macro Blog, don't redirect! out.write('<div class="system-message">Warning: redirection disabled in Blog mode.</div>') return out.getvalue()
Download: Blog.py
By: Walter Wong <wangzq@…>
Version: ≥0.8
Download:
Blog.2.py
Adopted to work on my 0.9.3
Version: ≥ 0.9.x?
By: Christian Eberl <chexx@…>
Download: Blog.ByCreationDate.py
Adapted By: Dan Mahn <trac@…>
Version: 0.10
Mods:
- Display blog pages by page creation date instead of last edit date. This allows edits to previous blog pages without reordering them.
- Fixed a problem with call to
wiki_to_html(text,env,hdf,db,0)
. Trac 0.10 doesn't like thehdf
argument because it's apparently looking for ahref
inside of it. Changedhdf
toNone
; it looks likeenv
is then used instead ofhdf
.
Acronym
Add support for HTML acronyms.
Usage example:
[[acronym(HTML, Hypertext Markup Language)]]
Download: acronym.py
By: Justin Palmer <trac at isolated-designs dot net>
Version: ≥0.8
Note: The Acronym plugin adds acronyms on-the-fly from a table in a Wiki page.
FootNote
Automatically collates and generates foot-notes.
Usage example:
Some text [[FootNote(This is a footnote)]] This foot-note refers to the first[[FootNote(1)]]. ... Listing the foot-notes in this page: [[FootNote]]
Multiple sets of foot-notes can be generated and existing foot-notes referred to by index.
The latest version coalesces identical foot-note text into a single foot-note.
Download: http://trac-hacks.org/wiki/FootNoteMacro
By: Alec Thomas <trac-form@…>
Version: ≥ 0.8
Image
Note: this macro is a default macro since Trac 0.9, see WikiMacros#AvailableMacros Display image of attachment or repository file onto any wiki/ticket document.
Example
Take image from same page: [[Image(photo.jpg)]] # simple [[Image(photo.jpg,120px)]] # as specified size [[Image(photo.jpg,right)]] # place image in right of page Or from other place: [[Image(OtherPage/foo.bmp)]] # from OtherPage [[Image(wiki/OtherPage/foo.bmp)]] # same above [[Image(ticket/36/boo.jpg)]] # from ticket:36 [[Image(file/images/bee.jpg)]] # from repository
See heading comment of source file for more detail.
Download: Image.2.py
By: Shun-ichi Goto <gotoh@…>
Version: ≥ 0.8
Download: Image.3.py
Version: ≥ [1688]
TicketBox
Display list of ticket numbers in a box on the right side of the page. The purpose of this macro is show related tickets compactly. You can specify ticket number or report number which would be expanded as ticket numbers. Tickets will be displayed as sorted and uniq'ed.
Example:
[[TicketBox(#1,#7,#31)]] ... list of tickets [[TicketBox(1,7,31)]] ... '#' char can be omitted [[TicketBox({1})]] ... expand report result as ticket list [[TicketBox([report:1])]] ... alternate format of report [[TicketBox([report:9?name=val])]] ... report with dynamic variable [[TicketBox({1),#50,{2},100)]] ... convination of above [[TicketBox(500pt,{1})]] ... with box width as 50 point [[TicketBox(200px,{1})]] ... with box width as 200 pixel [[TicketBox(25%,{1})]] ... with box width as 25% [[TicketBox('Different Title',#1,#2)]] ... Use different title [[TicketBox("Other Title",#1,#2)]] ... likewise
Dynamic Variables
is supported for report. Variables can be specified like
[report:9?PRIORITY=high&COMPONENT=ui]
. Of course, the special
variable '$USER
' is available.
Download: http://trac-hacks.org/wiki/TicketBoxMacro
By: Shun-ichi Goto <gotoh@…>
Version: ≥ 0.8 (also 0.9pre)
Revised: 2005/07/09
NotImplemented
The NotImplemented macro is a simple text output macro for system documentation. It outputs a simple block that states a feature is not implemented and optionally includes a ticket or milestone (or any other wiki content) reference point.
Examples:
[[NotImplemented]]
[[NotImplemented(ticket:177)]]
and
[[NotImplemented(ticket:177 and ticket:179)]]
will output (with the correct wiki links replaced):
Download: NotImplemented.py
Author: ebrown@…
Version: Tested on 0.9pre
ChooseTemplate
Allow Trac to support templates for wiki-pages
Example:
[[ChooseTemplate]] [[ChooseTemplate(templates)]]
The argument has to point to a wikipage whose subpages are the templates. If no argumnent is given, a default argument of "WikiTemplates" is assumed.
Download: ChooseTemplate.1.py
Author: spamfaenger at gmx.de
Version: Tested on 0.9b2
ListTracProjects
Lists all your Trac projects, which can be used to switch easy to another project page
Example:
[[ListTracProjects]]
Make sure to change the following things in the source:
- Line 7 — Local directory of where the trac projects are located
- Line 13 — Change the /projects/ to something you use for multiple projects
- Line 16 — Change the /projects/ to something you use for multiple projects
Although it's very small, the source can probably be improved a lot, but it's my first Python thingie
Author: robert@…
Version: Tested on 0.9.2 and 0.9.3
NOTE: An updated version of this script is available on Trac-Hacks. This version prints links in an alphabetized, tabled format, more suitable for listing large numbers of projects. It also provides some amount of error checking and information retrieval (i.e. displaying project descriptions).
Author: mathomas@…
Version: Tested on 0.10
Download Original: ListTracProjects.py
Center
This macro facilitates an easy way to align content to the center. For example
[[Center(begin)]] Everythig between "begin" and "end" will appear aligned to the center [[Center(end)]]
Color
This is a simple macro to colorize short text.
Example:
Text can be written [[Color(green, with green)]], [[Color(blue, with blue)]], or [[Color(#b06cc3, in any other RGB color)]]
There is a version in the attachments below that supports v0.11.
RSSget
A Simple RSS News Retriever: Returns the content of an rss2 feed, parsed and pretty.
This edition:
- caches fetched feeds to /tmp/tracrss
- returns the feed as a <dl>
Example usage:
[[RSSget(http://www.example.com/feed.xml)]]
Customisation:
RESULTS_FULL = 1; < number of results for which descriptions are displayed
RESULTS_TOTAL = 5; < total number of results, titles of posts are displayed
CACHE_INTERVAL = 1500 < time till feed is rechecked.
Download:
http://trac-hacks.org/browser/rssgetmacro/0.9
By: Graeme Worthy — Ver: ≥ 0.0.1
VisitCounter
Displays current or specified wiki page visit count in text or image form. Stores visited pages information in cookie on client side.
Example usage:
[[VisitCounter(WikiStart)]]
Download:
http://trac-hacks.org/browser/visitcoutermacro
By: Radek Bartoň <blackhex@…>
LastModifiedVersion
This is a macro inspired by LastModified. It simply prints the last modified version of the current wiki page.
Usage:
[[LastModifiedVersion]]
Download: LastModifiedVersion.py
By: Matt Shin
Add your macro here …
Requests
Requests, comments, etc. go here.
- Request: A macro, that simply prints the number of the last changeset.
- Request: A macro, that simply shows a signature of the current user with timestamp. e.g. using
[[sign]]
in the wiki text edit would render to "—anonymous 2008-01-20 20:02:34". - Request: A mcaro, that simply shows a timestamp. e.g. using timestamp would always show the fixed time of when the page was saved then, like "2008-01-22 10:42:17" (CurrentDate does not work, since it always updates when the page is saved again…).
- Request: Extend the Image Macro. Enable Descriptions for Images and enable linking Images in the text. Example:
[[Image(image.png, desc("This is a wonderful Image"))]]
andYou can see this in [Image{1}] what I mean
- Request: Extend the Image Macro: If a page links to a lot of Images (~ a screenshot page) it would be nice to only show small thumbnails instead of resizing the image through html. Something like
[[Image(myimage.png, thumbnail=50%)]]
would create a thumb thats only 50% the size of the original image… - Something like pararaph numbers in http://www.blueoxen.org/tools/purplewiki/ helps with documentation authoring.
- Request: Extend the TicketBox macro so that it can display tickets returned by a ticket report as well. Example:
[[TicketBox({1},5)]]
would show tickets returned by report 1 and ticket no. 5 as well- Good idea. I've implemented and attached. See above. (gotoh)
- Request: Extend the TicketBox macro so that it can display tickets returned by a ticket report using dynamic variables. Example:
[[TicketBox(200px,'Active Tickets',[report:11?COMPONENT=name])]]
- Ok, implemented. See above. (gotoh)
- Request: Binding of the TWikiDraw to Trac. Example: drawing:foo
- Request: WikiInclude doesn't check if user has WIKI_VIEW privilege. This could be considered a security hole, if a user uses wiki formatting in a ticket.
- Request: In ReTickets I'd like to be able to grab tickets including one or more (with regexps even) keywords listed in it, rather then using the summary. Perhaps as an option or new Macro?
- Request: In LastModified or DateOffset it would be cool to be able to put references to pages, source, changeset, roadmap instead of date only. That way i could display in my user pages a lot of usefull informations (days left before milestone, not modified since, commited since, and so on, …)
- It would be cool to have a macro that could include a file in the project repository:
[[includeP('trunk/project/main.cpp')]]
or, even cooler, part of the file:[[includeLines('trunk/project/main.cpp',from=10,to=5)]]
Or the part of a file enclosed by a tag. For example, let trunk/foo.cpp be:
... void a(); //tag1 void b() { ... } //tag1 ...
one could write
See for example method "b" in file foo.cpp: [[includetag('trunk/foo.cpp', 'tag1')]]
Is this Already Available ? Does IncludeSource / InsertSource ( http://niw.at/articles/2006/12/16/include-source-wiki-macro-for-trac ) above make a good starting point?
- Request: Project/ticket price quotes. For ticket poster to entice developers to work on ticket, they can offer an amount. Or for clients requesting features the developer can enter their price to complete the ticket.
- Request: Time tracking for tickets! Each user can enter the time they've spent working on a ticket. Total time and total per developer will be summarized on the ticket. Perhaps integrates with the above?
- PS: I'm willing to pay for the above two enhancements ;P please contact me at <quinn at strangecode dot com>.
- Request: I'd like a macro that lists WikiWords in the Wiki that don't have pages yet, to remind us of what we haven't yet got round to writing.
See also: WikiMacros
Attachments (75)
-
javadoc.py
(3.5 KB
) - added by 20 years ago.
Javadoc WikiMacro
-
UserChanges.py
(1.3 KB
) - added by 20 years ago.
Displays the recently changed pages of a specific user.
-
BackLinks.py
(830 bytes
) - added by 20 years ago.
BackLinks wikimacro
- WikiFile.py (921 bytes ) - added by 20 years ago.
-
TracPoll.py
(2.1 KB
) - added by 20 years ago.
TracPoll macro
- TracPoll.2.py (2.1 KB ) - added by 20 years ago.
-
TOC.py
(1.9 KB
) - added by 20 years ago.
Table of contents macro (requires patch in #992)
-
SvnFiles.py
(1.1 KB
) - added by 20 years ago.
SvnFiles macro
-
DateOffset.py
(1.7 KB
) - added by 20 years ago.
DateOffset Macro
-
BackLinks.2.py
(889 bytes
) - added by 20 years ago.
Updated version of BackLinks.py that shows links to the current page if none is specified
- SubWiki.py (1.1 KB ) - added by 20 years ago.
- ParentWiki.py (770 bytes ) - added by 20 years ago.
-
ShowPath.py
(817 bytes
) - added by 20 years ago.
ShowPath macro
-
Search.py
(709 bytes
) - added by 20 years ago.
Search macro
-
SubWiki.2.py
(1.7 KB
) - added by 20 years ago.
Patch of SubWiki.py, that pulls from the text a 'description' from a given line #.
-
Include.2.py
(2.0 KB
) - added by 20 years ago.
This incorporates WikiFile and Include together, and doesn't require patching on 0.8
-
SubWiki.3.py
(2.7 KB
) - added by 20 years ago.
Yet another version SubWiki - supports levels and extracting first heading (as a description)
-
redirect.py
(914 bytes
) - added by 20 years ago.
Macro for redirects and page aliases. Descrition see: MacroBazaar
-
TracSearch.py
(1.1 KB
) - added by 20 years ago.
TracSearch macro
- BackLinks3.py (947 bytes ) - added by 20 years ago.
-
docbook.py
(558 bytes
) - added by 20 years ago.
Simple DocBook WikiProcessor
-
docbook.2.py
(592 bytes
) - added by 20 years ago.
DocBookProcessor, updated to strip non-body content
-
Blog.py
(4.6 KB
) - added by 20 years ago.
macro "Blog"
-
TracNav.py
(7.0 KB
) - added by 20 years ago.
Navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc). Revistion 2865.
-
acronym.py
(179 bytes
) - added by 20 years ago.
Add support for the HTML acronym tag.
- WikiInclude.py (583 bytes ) - added by 20 years ago.
-
Image.py
(4.7 KB
) - added by 20 years ago.
Macro to display image in attachment/repository onto wiki/ticket
-
Image.2.py
(4.7 KB
) - added by 20 years ago.
Macro to display image in attachment/repository onto wiki/ticket (revised)
-
TicketBox.py
(970 bytes
) - added by 20 years ago.
Display list of ticket numbers in a box.
-
Debbug.py
(378 bytes
) - added by 20 years ago.
Link to the Debian BTS
-
TracNav.2.py
(8.2 KB
) - added by 20 years ago.
Updated navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc). Revision 2939.
-
BackLinks.3.py
(951 bytes
) - added by 20 years ago.
Another version of BackLinks. This one only matches ... based links
-
TOC.2.py
(3.9 KB
) - added by 20 years ago.
Modified TOC version (see description)
-
tracnav.png
(6.2 KB
) - added by 20 years ago.
TracNav screenshot.
- MimeInclude.py (2.3 KB ) - added by 20 years ago.
-
Image.3.py
(4.7 KB
) - added by 20 years ago.
!Image macro updated for [1688]
-
WikiCalendar.3.py
(2.7 KB
) - added by 20 years ago.
Added navigation links to the calendar caption
-
RelLink.py
(394 bytes
) - added by 19 years ago.
macro RelLink
-
TicketBox.2.py
(3.4 KB
) - added by 19 years ago.
Enhanced version to suport using report result.
-
TicketBox.3.py
(4.4 KB
) - added by 19 years ago.
Enhanced version of supporting dynamic variables.
-
downloadStats.py
(2.9 KB
) - added by 19 years ago.
Download Stats, that shows webalizer stats in Trac env
-
WikiInclude.2.py
(571 bytes
) - added by 19 years ago.
Updated for the new formatter API of .9 pre
-
AutoNav.py
(2.1 KB
) - added by 19 years ago.
Small change from Backlinks that adds CamelCase pages in the List too.
-
AutoNav.2.py
(2.3 KB
) - added by 19 years ago.
Small change from Backlinks that adds CamelCase pages in the List too (with correct spelling).
-
NotImplemented.py
(363 bytes
) - added by 19 years ago.
Not Implemented Message (0.9+)
-
ChooseTemplate.py
(2.8 KB
) - added by 19 years ago.
a template chooser for trac
-
ChooseTemplate.1.py
(2.8 KB
) - added by 19 years ago.
spelling mistake in the file
-
TracNav.3.py
(8.0 KB
) - added by 19 years ago.
Updated navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc?). Revision 3044.
-
tracnav.css
(1.4 KB
) - added by 19 years ago.
style file for TracNav
-
TracNav.3.2.py
(9.1 KB
) - added by 19 years ago.
Updated navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc). Revision 3060.
-
AuthNav.py
(2.1 KB
) - added by 19 years ago.
Fix truncated page list (don't stop after encountering thispage)
-
AutoNav.3.py
(2.1 KB
) - added by 19 years ago.
Fix truncated page list (don't stop enumerating pages after encountering thispage)
-
ListTracProjects.py
(350 bytes
) - added by 19 years ago.
Small Macro to list all Trac projects (for easy switching)
-
Include.3.py
(2.0 KB
) - added by 19 years ago.
Include macro updated to use correct wiki_to_html function in 0.9.3.
-
Blog.2.py
(4.7 KB
) - added by 19 years ago.
macro "Blog", adopted to 0.9.3
-
Color.py
(486 bytes
) - added by 19 years ago.
Color macro
-
Center.py
(666 bytes
) - added by 19 years ago.
add Center macro
-
RSSget.py
(6.0 KB
) - added by 18 years ago.
an rss feed reader
-
BackLinks.4.py
(1.1 KB
) - added by 18 years ago.
Updated Backlinks that only links CamelCase and wiki: links
-
SvnFiles.2.py
(1.3 KB
) - added by 18 years ago.
Small update to SvnFiles, to make it work under 0.9
-
Blog.ByCreationDate.py
(4.7 KB
) - added by 18 years ago.
Adaptation of Blog.py macro to sort blog entries by page creation date instead of last edit date.
- ReTickets.py (1.0 KB ) - added by 18 years ago.
-
LastModifiedVersion.py
(758 bytes
) - added by 18 years ago.
Macro that prints the last modified version of the wiki page, inspired by the LastModified.py wiki macro
-
SvnFiles-0.10.py
(1.3 KB
) - added by 18 years ago.
Patched SvnFiles.2.py with sorting and <br /> after each file
-
autonav-trac-0.10.py
(2.1 KB
) - added by 18 years ago.
AutoNav macro as an example of "new style macro" (i.e. single file plugin), for Trac 0.10
-
autonav-trac-0.11.py
(2.1 KB
) - added by 18 years ago.
AutoNav macro as an example of "new style macro" (i.e. single file plugin), for Trac 0.11
-
Color-0.11.py
(617 bytes
) - added by 18 years ago.
replacement for Color.py to support 0.11
-
ParentLinkage.py
(2.9 KB
) - added by 18 years ago.
A ParentWiki inspired macro written for trac v0.10
-
Color-0.11v2.py
(792 bytes
) - added by 17 years ago.
Supports background-colour and padding like the original Color.py
-
ParentWiki.2.py
(806 bytes
) - added by 17 years ago.
0.10 patch
-
ShowPath.2.py
(3.4 KB
) - added by 17 years ago.
ShowPath plugin for 0.11
-
WikiInclude.0.11.py
(860 bytes
) - added by 17 years ago.
Converted for Trac 0.11
-
ReTickets.2.py
(1.1 KB
) - added by 17 years ago.
Patched version of ReTickets.py
-
SubWiki.4.py
(3.9 KB
) - added by 17 years ago.
SubWiki for trac 0.11b
-
IncludeSource.py
(9.3 KB
) - added by 17 years ago.
Modified version of IncludeSource. Supports partial includes, line numbering, auto-selection of formatter (with optional override)
Download all attachments as: .zip