Add more subcommands to the moin command-line client

The moin command line client is a very powerful maintenance tool. It'd be nice to extend it with more options to further simplify life to system administrators. E.g. add a subcommand to list users in a named group, or to dump the raw text of a page to stdout.

Listing users in a group can be accomplished by this standalone program (thanks to ReimarBauer for pointing me in the right direction)

   1 from MoinMoin.web.contexts import ScriptContext
   2 import sys
   3 
   4 if len(sys.argv)==1:
   5         print "Missing group name"
   6         exit(1)
   7 request = ScriptContext()
   8 groups = request.groups
   9 for group in sys.argv[1:]:
  10         users = groups.get(group)
  11         for user in users:
  12                 print user.encode('utf-8')


CategoryFeatureRequest

MoinMoin: FeatureRequests/CommandLineExtensions (last edited 2013-01-14 17:06:40 by FrancescoChemolli)