4 usage: %(progname)s username 10 import roslib; roslib.load_manifest(
'webui')
12 import os, sys, string, time, getopt
15 from auth
import db_auth
22 print __doc__ % vars()
24 def main(argv, stdout, environ):
26 optlist, args = getopt.getopt(argv[1:],
"", [
"help"])
32 for (field, val)
in optlist:
36 db = db_auth.initSchema()
42 user = db.users.lookup(username=username)
44 for taskid
in args[1:]:
45 user.add_favorite_app(taskid)
47 for app
in user.favorite_apps_list():
50 for taskid
in args[1:]:
51 user.remove_favorite_app(taskid)
55 if __name__ ==
"__main__":
56 main(sys.argv, sys.stdout, os.environ)
def main(argv, stdout, environ)