added file option
parent
7e5f1c0d85
commit
eef4efc061
|
@ -110,14 +110,16 @@ def once(tooter: Tooter):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Check for suspicious impersonators.')
|
description='Randomly interact with a Mastodon timeline.')
|
||||||
parser.add_argument( '-d', '--debug', action='store_true',
|
parser.add_argument( '-d', '--debug', action='store_true',
|
||||||
help='Enable debugging messages.')
|
help='Enable debugging messages.')
|
||||||
parser.add_argument( '-o', '--once', action='store_true',
|
parser.add_argument( '-o', '--once', action='store_true',
|
||||||
help='Run once and exit. Default is to run as a daemon.')
|
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()
|
args = parser.parse_args()
|
||||||
|
|
||||||
Tooter.load_credentials('users.toml')
|
Tooter.load_credentials(args.file)
|
||||||
|
|
||||||
if args.once:
|
if args.once:
|
||||||
t = Tooter('nick')
|
t = Tooter('nick')
|
||||||
|
|
Loading…
Reference in New Issue