mirror of https://github.com/ooguz/pfxposter
0.1.0
This commit is contained in:
parent
bd467d6ca3
commit
df326fb87b
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
from .pfxposter import *
|
from .pfxposter import *
|
||||||
|
|
||||||
__version__ = '0.0.1'
|
__version__ = '0.1.0'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ def main():
|
||||||
get_image = requests.get(image_url)
|
get_image = requests.get(image_url)
|
||||||
tmp.write(get_image.content)
|
tmp.write(get_image.content)
|
||||||
mastodon_media = mastodon.media_post(tmp.name)
|
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)
|
print("Status posted: ", image_name)
|
||||||
tmp.close()
|
tmp.close()
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -2,4 +2,4 @@ twine
|
||||||
Mastodon.py>=1.5.1
|
Mastodon.py>=1.5.1
|
||||||
atoma>=0.0.17
|
atoma>=0.0.17
|
||||||
toml>=0.10.1
|
toml>=0.10.1
|
||||||
|
python-crontab>=2.5.1
|
||||||
|
|
12
setup.py
12
setup.py
|
@ -4,10 +4,16 @@ from setuptools import setup
|
||||||
from setuptools import find_packages
|
from setuptools import find_packages
|
||||||
import os
|
import os
|
||||||
import pfxposter
|
import pfxposter
|
||||||
|
from crontab import CronTab
|
||||||
|
|
||||||
with open("README.md", "r") as fh:
|
with open("README.md", "r") as fh:
|
||||||
long_description = fh.read()
|
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(
|
setup(
|
||||||
name='pfxposter',
|
name='pfxposter',
|
||||||
|
@ -21,6 +27,7 @@ setup(
|
||||||
license='GLWTS(Good Luck With That Shit) Public License',
|
license='GLWTS(Good Luck With That Shit) Public License',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
include_package_data=True,
|
||||||
project_urls={
|
project_urls={
|
||||||
"Bug Tracker": "https://github.com/ooguz/pfxposter/issues",
|
"Bug Tracker": "https://github.com/ooguz/pfxposter/issues",
|
||||||
"Source Code": "https://github.com/ooguz/pfxposter",
|
"Source Code": "https://github.com/ooguz/pfxposter",
|
||||||
|
@ -35,7 +42,10 @@ setup(
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
"Topic :: Internet",
|
"Topic :: Internet",
|
||||||
],
|
],
|
||||||
|
entry_points={"console_scripts": ["pfxposter = pfxposter.pfxposter:main"]},
|
||||||
data_files=[('/home/{}/.pfxposter', ['data/config.toml'])],
|
data_files=[('/home/{}/.pfxposter', ['data/config.toml'])],
|
||||||
python_requires=">=3.6",
|
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()
|
||||||
|
|
Loading…
Reference in New Issue