Made generated config look a little nicer

This commit is contained in:
Amber 2022-03-21 21:48:03 -05:00
parent f37840ef01
commit a64a1a8e96
2 changed files with 3 additions and 6 deletions

View File

@ -6,9 +6,5 @@
"mention_handling": 1,
"max_thread_length": 15,
"strip_paired_punctuation": false,
"website": "https://git.nixnet.services/amber/amber-ebooks",
"client": {
"id": "placeholder string",
"secret": "placeholder string"
}
"website": "https://git.nixnet.services/amber/amber-ebooks"
}

View File

@ -62,7 +62,8 @@ if "secret" not in cfg:
print("Open this URL and authenticate to give mstdn-ebooks access to your bot's account: {}".format(client.auth_request_url(scopes=scopes)))
cfg['secret'] = client.log_in(code=input("Secret: "), scopes=scopes)
json.dump(cfg, open(args.cfg, "w+"))
#json.dump(cfg, open(args.cfg, "w+"))
open(args.cfg, "w").write(re.sub(",", ",\n", json.dumps(cfg)))
def extract_toot(toot):
toot = functions.extract_toot(toot)