This code helps understand one of the MoinMoinQuestions

   1 from MoinMoin.Page import Page
   2 
   3 Dependencies = ["time"]
   4 
   5 def actionNotDone(line):
   6     return line and (line.lstrip().startswith(u'[[Card(Action notdone'))
   7 
   8 def execute(macro, args):
   9     request = macro.request
  10     pagelist = args.split(",")
  11     fmt = macro.formatter.text
  12     # this is a draft - only one page processed for now
  13     pagename = pagelist[0]
  14     if not request.user.may.read(pagename):
  15         return ''
  16     pagetext = Page(request, pagename, formatter=fmt).get_raw_body()
  17     pagelines = pagetext.split(u'\n')
  18     remaining_actions = filter(actionNotDone, pagelines)
  19     action_block = '\n'.join(remaining_actions)
  20     return fmt(action_block)

The output I see:

[[Card(Action notdone|WhoEver|Dec: Core organisational group: outline ready (needs to be for next JPA)|["ECATS School 2007"])]] [[Card(Action notdone |WhoEver| end sep: Inform partners on ["USFD"] meeting (create an activity item in the relevant work package page)|["WP2"] or ["WP3"] or ["WP5"])]] [[Card(Action notdone|MMT| MMT meeting oct: Assessment & PEKH database structure adn implementation: technical discussion|["assessment and PEKH databases"])]] [[Card(Action notdone|FrancisHirsinger| 15 nov: present a proposal on structure ("System outline")|["assessment and PEKH databases"])]] [[Card(Action notdone|WhoEver| Integrate PEKH and Assessment databases|["assessment and PEKH databases"])]] [[Card(Action notdone|WhoEver|MMT october: Present MMT with list of criteria of eligibility and objectives. Communicate possibilities|["mobility program"])]] [[Card(Action notdone|interested parties|Decide at home who one proposes to send out and who one proposes to invite and let the mobility task leader know through wiki page|write in ["mobility program"])]] 

You have to feed that through the wiki parser again if you want it rendered. See other places in the code where MoinMoin.parser.wiki is used.

MoinMoin: AlvaroTejero/ActionFilter (last edited 2007-10-29 19:08:32 by localhost)