|
|
|
@ -168,13 +168,23 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
# Actions / commands |
|
|
|
|
INIT_PARSER = SUBPARSERS.add_parser('init', help='initialize credentials') |
|
|
|
|
INIT_PARSER.add_argument('--totp', |
|
|
|
|
help='use totp login (requires user to open URL in browser and then enter token to bot during init/login)', |
|
|
|
|
action='store_true') |
|
|
|
|
LOGIN_PARSER = SUBPARSERS.add_parser('login', help='login to instance if credentials have expired') |
|
|
|
|
LOGIN_PARSER.add_argument('--totp', |
|
|
|
|
help='use totp login (requires user to open URL in browser and then enter token to bot during init/login)', |
|
|
|
|
action='store_true') |
|
|
|
|
INIT_PARSER.add_argument( |
|
|
|
|
'--totp', |
|
|
|
|
help=( |
|
|
|
|
'use totp login (requires user to open URL in browser and then enter token to bot ' |
|
|
|
|
'during init/login)' |
|
|
|
|
), |
|
|
|
|
action='store_true') |
|
|
|
|
LOGIN_PARSER = SUBPARSERS.add_parser( |
|
|
|
|
'login', |
|
|
|
|
help='login to instance if credentials have expired') |
|
|
|
|
LOGIN_PARSER.add_argument( |
|
|
|
|
'--totp', |
|
|
|
|
help=( |
|
|
|
|
'use totp login (requires user to open URL in browser and then enter token to bot ' |
|
|
|
|
'during init/login)' |
|
|
|
|
), |
|
|
|
|
action='store_true') |
|
|
|
|
TOOT_PARSER = SUBPARSERS.add_parser('toot', help='send configured toot') |
|
|
|
|
RSS_PARSER = SUBPARSERS.add_parser('rss', help='cross post articles from an rss feed') |
|
|
|
|
CURATE_PARSER = SUBPARSERS.add_parser('curation', help='Run the curation bot (service)') |
|
|
|
|