Compare commits

...

3 commits

Author SHA1 Message Date
1accbedd0f gitignore model.json 2019-05-30 20:37:02 +10:00
788f0a45dd removed reference to mstdn-ebooks 2019-05-30 20:33:29 +10:00
eaf3d114a6 fixed 401 error 2019-05-30 20:32:05 +10:00
3 changed files with 7 additions and 4 deletions

1
.gitignore vendored
View file

@ -3,3 +3,4 @@ __pycache__
reply.py reply.py
config.json config.json
corpus.txt corpus.txt
model.json

6
gen.py
View file

@ -28,8 +28,10 @@ cfg = json.load(open('config.json', 'r'))
toot = create.make_toot() toot = create.make_toot()
if not args.simulate: if not args.simulate:
client = Mastodon(client_id = cfg['client']['id'], client = Mastodon(
client_secret = cfg['client']['secret'], client_id=cfg['client']['id'],
client_secret=cfg['client']['secret'],
access_token=cfg['secret'],
api_base_url=cfg['site']) api_base_url=cfg['site'])
try: try:

View file

@ -34,7 +34,7 @@ except:
if "client" not in cfg: if "client" not in cfg:
print("No application info -- registering application with {}".format(cfg['site'])) print("No application info -- registering application with {}".format(cfg['site']))
client_id, client_secret = Mastodon.create_app("mstdn-ebooks", client_id, client_secret = Mastodon.create_app("txtbooks",
api_base_url=cfg['site'], api_base_url=cfg['site'],
scopes=scopes, scopes=scopes,
website="https://git.lynnesbian.space/Lynnesbian/txtbooks") website="https://git.lynnesbian.space/Lynnesbian/txtbooks")