|
|
|
@ -1,10 +1,17 @@
|
|
|
|
#!/usr/bin/python3
|
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
|
|
|
|
from mastodon import Mastodon
|
|
|
|
from mastodon import Mastodon
|
|
|
|
|
|
|
|
import configparser
|
|
|
|
|
|
|
|
import xdg.BaseDirectory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config_file_path = '%s/masto-mutuals/config.txt' % xdg.BaseDirectory.xdg_config_home
|
|
|
|
|
|
|
|
config = configparser.ConfigParser()
|
|
|
|
|
|
|
|
config.read(config_file_path)
|
|
|
|
|
|
|
|
# TODO: if config file is empty, this should write defaults into a file.
|
|
|
|
|
|
|
|
|
|
|
|
mastodon = Mastodon(
|
|
|
|
mastodon = Mastodon(
|
|
|
|
access_token = 'apptoken.secret', #app authtoken
|
|
|
|
access_token = config['ACCOUNT_DATA']['access_token']
|
|
|
|
api_base_url = 'https://lgbt.io'
|
|
|
|
api_base_url = config['ACCOUNT_DATA']['instance_url']
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
user_id = mastodon.me()['id']
|
|
|
|
user_id = mastodon.me()['id']
|
|
|
|
|