Edgewall Software

Version 21 (modified by trac-form@…, 19 years ago) ( diff )

Added TOC macro

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: TracTeamVer: >0.5.2

Timestamp

Inserts current date and time. Distributed with Trac.
Download: source:trunk/trac/wikimacros/Timestamp.py
By: TracTeamVer: >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

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

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:

[[TracPoll(Title for poll; Option 1 for poll; Option 2 for poll; etc.)]]

Download: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/TracPoll.2.py
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://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/TOC.py
By: Alec Thomas <trac-form@…>
Version: ≥ 0.7.1 (requires patch included in #992)

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 Contens" of the page (from headings) like Twiki.org has.


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.

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)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.