diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2015-06-03 13:41:01 -0300 |
---|---|---|
committer | Bruno Wagner <bwgpro@gmail.com> | 2015-06-03 13:41:01 -0300 |
commit | e67b2c523f0f343f8416b7ee4096deb117209301 (patch) | |
tree | 30b4e7856feab48b7becdd4446f48b39512cd67d /service/pixelated/config | |
parent | d11a2b8d66f77fa9a263e85d314dd7712702a605 (diff) |
Moved all args parseing to config/args and fixed maintenance after the shifts
Diffstat (limited to 'service/pixelated/config')
-rw-r--r-- | service/pixelated/config/args.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/service/pixelated/config/args.py b/service/pixelated/config/args.py index a5d19369..f3549df1 100644 --- a/service/pixelated/config/args.py +++ b/service/pixelated/config/args.py @@ -18,7 +18,7 @@ import argparse from pixelated.bitmask_libraries.config import DEFAULT_LEAP_HOME -def parse(): +def parse_user_agent_args(): parser = argparse.ArgumentParser(description='Pixelated user agent.') parser_add_default_arguments(parser) @@ -33,6 +33,20 @@ def parse(): return args +def parse_maintenance_args(): + parser = argparse.ArgumentParser(description='pixelated maintenance') + parser_add_default_arguments(parser) + subparsers = parser.add_subparsers(help='commands', dest='command') + subparsers.add_parser('reset', help='reset account command') + mails_parser = subparsers.add_parser('load-mails', help='load mails into account') + mails_parser.add_argument('file', nargs='+', help='file(s) with mail data') + + subparsers.add_parser('dump-soledad', help='dump the soledad database') + subparsers.add_parser('sync', help='sync the soledad database') + + return parser.parse_args() + + def parser_add_default_arguments(parser): parser.add_argument('--debug', action='store_true', help='DEBUG mode.') parser.add_argument('--dispatcher', help='run in organization mode, the credentials will be read from specified file', metavar='file') |