[Moin-user] automatism for names of generated pages

Thomas Waldmann tw-public at gmx.de
Mon Mar 9 06:49:50 EDT 2009


> However, what I really want is some automatism: The page to generate  
> should be named "xyz-<unique-key>" where <unique-key> is either a  
> simple sequence number (with preceeding zeros...) or whatever is  
> suitable for humans (reflecting order, easy to understand).  I don't  
> want the user to observe rules and query existing pages in order to  
> provide that <unique.key> but I want it to have generated.

I am not sure something like that exists yet. I guess that needs some
special macro or action that checks the wiki page namespace for some
criteria, determines highest number present and then creates a page with
n+1.

Alternatively, using a timestamp yyyy-mm-dd-hh-mm-ss would also be
likely unique enough.

When done right and with subpages, MonthCalendar could even navigate
that stuff (day level only).

> I doubt a sequence can be done with what Moin provides so far. Am I  
> right?

Yes, we don't provide counters.

> Do I have to customize this  macro? (I doubt I can achieve that :-( )

Looks like. Heads up, Python is easy. :)

> How does one count and keep variables?

Just query what's already there in the namespace (pagelist).






More information about the Moin-user mailing list