[Moin-user] Random Line Macro

Bill Vodall wa7nwp at jnos.org
Tue Aug 12 08:03:04 EDT 2003


I bet some Python guru out there can whip out this MoinMoin macro
without too much trouble.  What I'm looking for is a way to randomly pick
one line from a Wiki page being used as a data file.

Lets say everything between {{{ - }}} is valid data.  A simple fortune file
could be:

FortuneFile
{{{
Make the most of the best, and the least of the worst.
File - don't pile.
Standard is better then better.
He who runs in front of car will be tired.
He who runs behind car will be exhausted.
}}}

Then loading a page with a macro like  [[PickOneLine(FortuneFile)]] would
expand to one of the lines from above.

Thanks...
Bill





More information about the Moin-user mailing list