diff --git a/run.py b/run.py index 916bfc1..dd47fe0 100755 --- a/run.py +++ b/run.py @@ -32,15 +32,15 @@ for row in dc.fetchall(): client = Mastodon(client_id=row['client_id'], client_secret=row['client_secret'], access_token=row['secret'], api_base_url=row['instance']) for post in j['posts']: if post['senderData']['id'] == False: - sender = "Anonymous user" + sender = "(anonymous)" else: sender = post['senderData']['username'] if int(post['timestamp']) == int(row['latest_post']): #this is the one we've already seen continue - - toot = "Curious cat question from {}: \"{}\"\nMy answer: {}\nView online at https://curiouscat.me/{}/post/{}".format(sender, post['comment'], post['reply'], row['cc'], post['id']) #TODO: what if this is over 500 characters? + + toot = "Curious cat user {} asks: {}\nMy answer: {}\nView online at https://curiouscat.me/{}/post/{}".format(sender, post['comment'], post['reply'], row['cc'], post['id']) #TODO: what if this is over 500 characters? if settings['cw']: client.status_post(toot, spoiler_text="Curious Cat post") else: diff --git a/web.py b/web.py index 8948b8c..9f9f0f8 100755 --- a/web.py +++ b/web.py @@ -244,3 +244,6 @@ def ccc_c(): @app.route('/cc_connect/complete') def cc_connect_complete(): return render_template('cc_connect_complete.html', bg="background-image:url('{}')".format(session['ccavi'])) + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=4734) #4734 is t9 for 'greg' \ No newline at end of file