Am 16.01.2007 um 21:20 schrieb Emmanuel Blot:
As a plugin, you can just extend WikiMacroBase. You can also use a
single .py file in the plugins/ folder if you want something easier
than a full setuptools plugin.

It seems that the old way to write macro has been discarded (at least,
the macro located in the wiki-macros/ directory does not seem to be
rendered anymore). I should say that I'm a bit confused at this point:
is the "old way" already obsoleted ?

Yes. This is an (mostly unforeseen) side-effect of the move to Genshi: the old way of writing macros relied heavily on the HDF object being available, thereby coupling old-style macros tightly to ClearSilver. As a result, supporting old-style macros would require some pretty heavy surgery.

It's unfortunate that we did not notice this earlier, as ideally we should've had an official deprecation phase for old-style wiki macro API, while providing the new plugin APIs (wiki context etc) to use in its place. But it's too late at this point. We'll just have to write a good migration guide and cut off the legacy.

For example, the Timestamp macro that is demonstrated in the
WikiMacros default page does not seem to be found. This is weird as
the trunk still contains the macro in wiki-macros/ dir, and the
wiki-default/WikiMacros page still contains a reference to this macro.

Indeed, there's quite a bit of work pending in this area. Porting the builtin old-style macros is one of the tasks. Updating the documentation would be another. IIUC, the cboos' wiki context work has progressed nicely, so we can actually start with these tasks(?)

Another question: if I place the new-style macro in the global plugin
directory, I guess I need to enable it in the [components] trac.ini
section, don't I?

Right (IIRC).

Is there an easy way to have a global macro directory (i.e. macros
used from any projects) that would not require to edit the trac.ini
config file?

Currently not, but you can use the global trac.ini file to enable macros for all projects.

Cheers,
Chris
--
Christopher Lenz
  cmlenz at gmx.de
  http://www.cmlenz.net/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to