Version 30 (modified by 19 years ago) ( diff ) | ,
---|
The Macro Bazaar
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.
HelloWorld
A simple example macro. Distributed with Trac.
Download: source:trunk/trac/wikimacros/HelloWorld.py
By: TracTeam — Ver: >0.5.2
Timestamp
Inserts current date and time. Distributed with Trac.
Download: source:trunk/trac/wikimacros/Timestamp.py
By: TracTeam — Ver: >0.5.2
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
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: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/WikiFile.py By: Toni Brkic toni.brkic at switchcore.com — Required ver patch for #801 must be implemented
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: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/javadoc.py
By: Matthew Good <matt-good.net> — 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: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/UserChanges.py
By: David Mohr <datrac@…> — Ver. ≥ 0.7.1
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: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/BackLinks.py
By: Dan Hon <danhon+trac@…> — Ver. ≥ 0.7.1
Dan, here's an idea.
thispage = hdf.getValue('wiki.page_name', '')
TracPoll
This macro adds polls to Trac. Any number of polls can be added to a page and polls are unique to each project.
The pickled state of the poll is stored in polldir
(set at the top of the plugin). No locking is performed.
Usage:
[[Poll(Title for poll; Option 1 for poll; Option 2 for poll; etc.)]]
Download: http://svn.swapoff.org/trachacks/wiki/PollMacro
By: Alec Thomas <trac-form@…> — Ver. ≥ 0.7.1
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://svn.swapoff.org/trachacks/wiki/TocMacro
By: Alec Thomas <trac-form@…>
Version: ≥ 0.7.1 (requires patch available at http://svn.swapoff.org/trachacks/wiki/AnchorPatch)
AddComment
Adds a textarea to TracWiki pages allowing for quick comments to be added in a standard format.
The comments are fully integrated into the Wiki, incrementing the version number and adding a log comment.
Download: http://svn.swapoff.org/trachacks/wiki/AddCommentMacro
By: Alec Thomas <trac-form@…>
Version: ≥ 0.8
LastModified
Shows the last modification date of the specified page, or the page the macro appears in if not specified. An optional argument, delta
, can be given to show the time elapsed since the last modification. The output is placed in span with a title that gives the exact modification date and the author of the change. See examples or download it!
Usage:
[[LastModified]] [[LastModified(delta)]] [[LastModified(MacroBazaar)]] [[LastModified(MacroBazaar,delta)]]
Download: http://severinghaus.org/projects/bfgff/LastModified.py
Version: ≥ 0.7
By: Steven N. Severinghaus <sns@…>
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: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/SvnFiles.py By: Simon Stapleton <simon@…>
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.
Usage
[[ReTickets(regexp)]]
Download: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/ReTickets.py By: Simon Stapleton <simon@…>
Add your macro here …
Requests, misc
Requests, comments, etc go here.
Simpler wiki markup as commonly used in emails, like
- *bold*
- /italics/
- lines starting with space render as code (preformatted text)
- static timestamp command
Markup for "Table of Contents" of the page (from headings) like Twiki.org has.
The TOC macro above does exactly this.
Comment plugin, to allow add comments to page without full edit. There are fancy comment plugins allowing custom formatting, but even plain text would improve usability a lot. Face it, many people are afraid to EDIT, but will add comments if it's simple.
The AddComment macro above does this.
Fancy example Simple comments
I'll gladly explain in more details and help you (using Twiki/perl, starting with Trac/python), email me: pmasiar1 (at) yahoo (dot) com
Something like pararaph numbers in http://www.blueoxen.org/tools/purplewiki/ helps with documentation authoring.
A BackLinks feature would be useful, and is a requirement to use WikiBadges, afaik (already requested in tickets #611 and #646)
See also: WikiMacros, ProcessorBazaar
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 19 years ago.
BackLinks wikimacro
- WikiFile.py (921 bytes ) - added by 19 years ago.
-
TracPoll.py
(2.1 KB
) - added by 19 years ago.
TracPoll macro
- TracPoll.2.py (2.1 KB ) - added by 19 years ago.
-
TOC.py
(1.9 KB
) - added by 19 years ago.
Table of contents macro (requires patch in #992)
-
SvnFiles.py
(1.1 KB
) - added by 19 years ago.
SvnFiles macro
-
DateOffset.py
(1.7 KB
) - added by 19 years ago.
DateOffset Macro
-
BackLinks.2.py
(889 bytes
) - added by 19 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 19 years ago.
- ParentWiki.py (770 bytes ) - added by 19 years ago.
-
ShowPath.py
(817 bytes
) - added by 19 years ago.
ShowPath macro
-
Search.py
(709 bytes
) - added by 19 years ago.
Search macro
-
SubWiki.2.py
(1.7 KB
) - added by 19 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 19 years ago.
This incorporates WikiFile and Include together, and doesn't require patching on 0.8
-
SubWiki.3.py
(2.7 KB
) - added by 19 years ago.
Yet another version SubWiki - supports levels and extracting first heading (as a description)
-
redirect.py
(914 bytes
) - added by 19 years ago.
Macro for redirects and page aliases. Descrition see: MacroBazaar
-
TracSearch.py
(1.1 KB
) - added by 19 years ago.
TracSearch macro
- BackLinks3.py (947 bytes ) - added by 19 years ago.
-
docbook.py
(558 bytes
) - added by 19 years ago.
Simple DocBook WikiProcessor
-
docbook.2.py
(592 bytes
) - added by 19 years ago.
DocBookProcessor, updated to strip non-body content
-
Blog.py
(4.6 KB
) - added by 19 years ago.
macro "Blog"
-
TracNav.py
(7.0 KB
) - added by 19 years ago.
Navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc). Revistion 2865.
-
acronym.py
(179 bytes
) - added by 19 years ago.
Add support for the HTML acronym tag.
- WikiInclude.py (583 bytes ) - added by 19 years ago.
-
Image.py
(4.7 KB
) - added by 19 years ago.
Macro to display image in attachment/repository onto wiki/ticket
-
Image.2.py
(4.7 KB
) - added by 19 years ago.
Macro to display image in attachment/repository onto wiki/ticket (revised)
-
TicketBox.py
(970 bytes
) - added by 19 years ago.
Display list of ticket numbers in a box.
-
Debbug.py
(378 bytes
) - added by 19 years ago.
Link to the Debian BTS
-
TracNav.2.py
(8.2 KB
) - added by 19 years ago.
Updated navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc). Revision 2939.
-
BackLinks.3.py
(951 bytes
) - added by 19 years ago.
Another version of BackLinks. This one only matches ... based links
-
TOC.2.py
(3.9 KB
) - added by 19 years ago.
Modified TOC version (see description)
-
tracnav.png
(6.2 KB
) - added by 19 years ago.
TracNav screenshot.
- MimeInclude.py (2.3 KB ) - added by 19 years ago.
-
Image.3.py
(4.7 KB
) - added by 19 years ago.
!Image macro updated for [1688]
-
WikiCalendar.3.py
(2.7 KB
) - added by 19 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 18 years ago.
Updated navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc?). Revision 3044.
-
tracnav.css
(1.4 KB
) - added by 18 years ago.
style file for TracNav
-
TracNav.3.2.py
(9.1 KB
) - added by 18 years ago.
Updated navigation bar for Trac (wiki-customizable hierarchical replacement for TracGuideToc). Revision 3060.
-
AuthNav.py
(2.1 KB
) - added by 18 years ago.
Fix truncated page list (don't stop after encountering thispage)
-
AutoNav.3.py
(2.1 KB
) - added by 18 years ago.
Fix truncated page list (don't stop enumerating pages after encountering thispage)
-
ListTracProjects.py
(350 bytes
) - added by 18 years ago.
Small Macro to list all Trac projects (for easy switching)
-
Include.3.py
(2.0 KB
) - added by 18 years ago.
Include macro updated to use correct wiki_to_html function in 0.9.3.
-
Blog.2.py
(4.7 KB
) - added by 18 years ago.
macro "Blog", adopted to 0.9.3
-
Color.py
(486 bytes
) - added by 18 years ago.
Color macro
-
Center.py
(666 bytes
) - added by 18 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 17 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 17 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 17 years ago.
replacement for Color.py to support 0.11
-
ParentLinkage.py
(2.9 KB
) - added by 17 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 16 years ago.
Converted for Trac 0.11
-
ReTickets.2.py
(1.1 KB
) - added by 16 years ago.
Patched version of ReTickets.py
-
SubWiki.4.py
(3.9 KB
) - added by 16 years ago.
SubWiki for trac 0.11b
-
IncludeSource.py
(9.3 KB
) - added by 16 years ago.
Modified version of IncludeSource. Supports partial includes, line numbering, auto-selection of formatter (with optional override)
Download all attachments as: .zip