diff --git a/config.def.json b/config.def.json index 4eeb4e0..861542e 100644 --- a/config.def.json +++ b/config.def.json @@ -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" } diff --git a/main.py b/main.py index e0a11b7..f573a33 100755 --- a/main.py +++ b/main.py @@ -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)