This commit is contained in:
Özcan Oğuz 2020-08-24 12:17:21 +03:00
parent bd467d6ca3
commit df326fb87b
No known key found for this signature in database
GPG Key ID: 2D33E2BD3D975818
4 changed files with 14 additions and 4 deletions

View File

@ -2,6 +2,6 @@
from .pfxposter import *
__version__ = '0.0.1'
__version__ = '0.1.0'

View File

@ -41,7 +41,7 @@ def main():
get_image = requests.get(image_url)
tmp.write(get_image.content)
mastodon_media = mastodon.media_post(tmp.name)
#mastodon.status_post(image_name, media_ids=mastodon_media['id'])
mastodon.status_post(image_name, media_ids=mastodon_media['id'])
print("Status posted: ", image_name)
tmp.close()
if __name__ == "__main__":

View File

@ -2,4 +2,4 @@ twine
Mastodon.py>=1.5.1
atoma>=0.0.17
toml>=0.10.1
python-crontab>=2.5.1

View File

@ -4,10 +4,16 @@ from setuptools import setup
from setuptools import find_packages
import os
import pfxposter
from crontab import CronTab
with open("README.md", "r") as fh:
long_description = fh.read()
def _post_install():
cron_job = CronTab(user=os.getenv("USER"))
autochecker = cron_job.new(command='pfxposter')
autochecker.minute.every(1)
cron_job.write()
setup(
name='pfxposter',
@ -21,6 +27,7 @@ setup(
license='GLWTS(Good Luck With That Shit) Public License',
packages=find_packages(),
zip_safe=False,
include_package_data=True,
project_urls={
"Bug Tracker": "https://github.com/ooguz/pfxposter/issues",
"Source Code": "https://github.com/ooguz/pfxposter",
@ -35,7 +42,10 @@ setup(
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet",
],
entry_points={"console_scripts": ["pfxposter = pfxposter.pfxposter:main"]},
data_files=[('/home/{}/.pfxposter', ['data/config.toml'])],
python_requires=">=3.6",
install_requires=['Mastodon.py>=1.5.1', 'atoma>=0.0.17', 'toml>=0.10.1']
install_requires=['Mastodon.py>=1.5.1', 'atoma>=0.0.17', 'toml>=0.10.1', 'python-crontab>=2.5.1']
)
_post_install()