RC1: everything tested

This commit is contained in:
Özcan Oğuz 2020-08-24 15:14:00 +03:00
parent d9ea75ddc0
commit 27533359f2
No known key found for this signature in database
GPG Key ID: 2D33E2BD3D975818
2 changed files with 3 additions and 7 deletions

View File

@ -9,6 +9,8 @@ import requests
import toml
from mastodon import Mastodon
homedir = os.getenv("HOME")
config_file = "{}/.pfxposter".format(homedir)
def create_config(config_file):
conf_includes = textwrap.dedent("""
@ -60,9 +62,6 @@ def syncronize(config_file, config, username, last_updated, mastodon):
def main():
homedir = os.getenv("HOME")
config_file = "{}/.pfxposter".format(homedir)
if not os.path.exists(config_file):
create_config(config_file)

View File

@ -10,13 +10,10 @@ with open("README.md", "r") as fh:
long_description = fh.read()
def _post_install():
conf_includes = 'updated = 2020-08-24 00:00:00+00:00\n\n[mastodon]\n mastodon_url = "https://oyd.social"\naccess_token = "your_access_token_here"\n\n[pixelfed]\npixelfed_url = "https://pixelfed.social"\nusername = "username"'
cron_job = CronTab(user=os.getenv("USER"))
autochecker = cron_job.new(command='pfxposter')
autochecker.minute.every(1)
cron_job.write()
with open("{}/.pfxposter".format(os.getenv("HOME")), "w") as conf:
conf.write(conf_includes)
setup(
name='pfxposter',
@ -46,7 +43,7 @@ setup(
"Topic :: Internet",
],
entry_points={"console_scripts": ["pfxposter = pfxposter.poster:main"]},
data_files=[('/home/{}/.pfxposter'.format(os.getenv("USER")), ['data/config.toml'])],
#data_files=[('/home/{}/.pfxposter'.format(os.getenv("USER")), ['data/config.toml'])],
python_requires=">=3.6",
install_requires=['Mastodon.py>=1.5.1', 'atoma>=0.0.17', 'toml>=0.10.1', 'python-crontab>=2.5.1', 'requests']
)