added file option

main
Nicholas Hope 2022-11-25 19:33:45 -05:00
parent 7e5f1c0d85
commit eef4efc061
1 changed files with 4 additions and 2 deletions

View File

@ -110,14 +110,16 @@ def once(tooter: Tooter):
def main():
parser = argparse.ArgumentParser(
description='Check for suspicious impersonators.')
description='Randomly interact with a Mastodon timeline.')
parser.add_argument( '-d', '--debug', action='store_true',
help='Enable debugging messages.')
parser.add_argument( '-o', '--once', action='store_true',
help='Run once and exit. Default is to run as a daemon.')
parser.add_argument( 'file', nargs='?', default='users.toml',
help='Change file to source users from.')
args = parser.parse_args()
Tooter.load_credentials('users.toml')
Tooter.load_credentials(args.file)
if args.once:
t = Tooter('nick')