diff --git a/bin/311_ebooks.py b/bin/311_ebooks.py index 23d2f29..ee3105b 100644 --- a/bin/311_ebooks.py +++ b/bin/311_ebooks.py @@ -7,7 +7,7 @@ from configparser import ConfigParser import os.path # Open the db -conn = sqlite3.connect('requests.sqlite') +conn = sqlite3.connect('../requests.sqlite') c = conn.cursor() def get_descriptions(): @@ -29,7 +29,7 @@ text_model = markovify.Text(b) # parse existing file config = ConfigParser() -config.read('auth.ini') +config.read('../auth.ini') # read values from a section server = config.get('hackgfk_311_ebooks', 'server') @@ -37,22 +37,22 @@ email = config.get('hackgfk_311_ebooks', 'email') password = config.get('hackgfk_311_ebooks', 'password') # Register the app (once) -if not os.path.isfile('hackgfk_311_ebooks_clientcred.secret'): +if not os.path.isfile('../hackgfk_311_ebooks_clientcred.secret'): Mastodon.create_app( 'hackgfk_311_ebooks', api_base_url = server, - to_file = 'hackgfk_311_ebooks_clientcred.secret' + to_file = '../hackgfk_311_ebooks_clientcred.secret' ) # Log in mastodon = Mastodon( - client_id = 'hackgfk_311_ebooks_clientcred.secret', + client_id = '../hackgfk_311_ebooks_clientcred.secret', api_base_url = server, ) mastodon.log_in( email, password, - to_file = 'hackgfk_311_ebooks_usercred.secret' + to_file = '../hackgfk_311_ebooks_usercred.secret' ) # Send toot