mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
add missing db connection
This commit is contained in:
parent
8cab227531
commit
fe01416134
1 changed files with 10 additions and 0 deletions
|
@ -127,6 +127,8 @@ def make_post(args):
|
|||
acct = args[3]
|
||||
handle = args[0]
|
||||
|
||||
# print("Generating post for {}".format(handle))
|
||||
|
||||
bot, post = generate_output(handle)
|
||||
|
||||
client = Mastodon(
|
||||
|
@ -136,6 +138,14 @@ def make_post(args):
|
|||
api_base_url = "https://{}".format(handle.split("@")[2])
|
||||
)
|
||||
|
||||
db = MySQLdb.connect(
|
||||
host = cfg['db_host'],
|
||||
user=cfg['db_user'],
|
||||
passwd=cfg['db_pass'],
|
||||
db=cfg['db_name']
|
||||
)
|
||||
c = db.cursor()
|
||||
|
||||
# print(post)
|
||||
visibility = bot['post_privacy'] if len(args) == 1 else args[2]
|
||||
visibilities = ['public', 'unlisted', 'private']
|
||||
|
|
Loading…
Reference in a new issue