Fix relative paths that broke for some reason.
This commit is contained in:
@ -7,7 +7,7 @@ from configparser import ConfigParser
|
|||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
# Open the db
|
# Open the db
|
||||||
conn = sqlite3.connect('requests.sqlite')
|
conn = sqlite3.connect('../requests.sqlite')
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
|
|
||||||
def get_descriptions():
|
def get_descriptions():
|
||||||
@ -29,7 +29,7 @@ text_model = markovify.Text(b)
|
|||||||
|
|
||||||
# parse existing file
|
# parse existing file
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read('auth.ini')
|
config.read('../auth.ini')
|
||||||
|
|
||||||
# read values from a section
|
# read values from a section
|
||||||
server = config.get('hackgfk_311_ebooks', 'server')
|
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')
|
password = config.get('hackgfk_311_ebooks', 'password')
|
||||||
|
|
||||||
# Register the app (once)
|
# 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(
|
Mastodon.create_app(
|
||||||
'hackgfk_311_ebooks',
|
'hackgfk_311_ebooks',
|
||||||
api_base_url = server,
|
api_base_url = server,
|
||||||
to_file = 'hackgfk_311_ebooks_clientcred.secret'
|
to_file = '../hackgfk_311_ebooks_clientcred.secret'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Log in
|
# Log in
|
||||||
mastodon = Mastodon(
|
mastodon = Mastodon(
|
||||||
client_id = 'hackgfk_311_ebooks_clientcred.secret',
|
client_id = '../hackgfk_311_ebooks_clientcred.secret',
|
||||||
api_base_url = server,
|
api_base_url = server,
|
||||||
)
|
)
|
||||||
mastodon.log_in(
|
mastodon.log_in(
|
||||||
email,
|
email,
|
||||||
password,
|
password,
|
||||||
to_file = 'hackgfk_311_ebooks_usercred.secret'
|
to_file = '../hackgfk_311_ebooks_usercred.secret'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Send toot
|
# Send toot
|
||||||
|
Reference in New Issue
Block a user