Compare commits
No commits in common. "main" and "1.0" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,7 +1,7 @@
|
||||
include
|
||||
bin
|
||||
conf.toml
|
||||
*.tar*
|
||||
*.zst
|
||||
|
||||
# ---> Python
|
||||
# Byte-compiled / optimized / DLL files
|
||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name='social-photos',
|
||||
version='1.2',
|
||||
version='1.0',
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
'blurhash==1.1.4',
|
||||
|
@ -1,8 +1,8 @@
|
||||
from . import load_config
|
||||
from load_config import config
|
||||
|
||||
from mastodon import Mastodon
|
||||
|
||||
m = Mastodon(access_token=load_config.config['boost_mastodon']['token'], api_base_url=load_config.config['boost_mastodon']['server'])
|
||||
m = Mastodon(access_token=config['boost_mastodon']['token'], api_base_url=config['boost_mastodon']['server'])
|
||||
|
||||
def boost(url):
|
||||
search_results = m.search(url, resolve=True, exclude_unreviewed=False)
|
||||
|
@ -1,5 +1,5 @@
|
||||
from . import load_config
|
||||
from . import image_processing
|
||||
import load_config
|
||||
import image_processing
|
||||
|
||||
import os, sys, time, argparse, random
|
||||
|
||||
@ -66,12 +66,12 @@ def main():
|
||||
|
||||
if load_config.config['pixelfed']['enable']:
|
||||
print("Pixelfed publishing enabled")
|
||||
from . import publish_pixelfed
|
||||
import publish_pixelfed
|
||||
posts['pixelfed'] = publish_pixelfed.upload(file_data)
|
||||
|
||||
if load_config.config['flickr']['enable']:
|
||||
print("Flickr publishing enabled")
|
||||
from . import publish_flickr
|
||||
import publish_flickr
|
||||
posts['flickr'] = publish_flickr.upload(file_data)
|
||||
|
||||
## Wait before boosing to ensure media has been processed
|
||||
@ -81,7 +81,7 @@ def main():
|
||||
|
||||
if load_config.config['boost_mastodon']['enable']:
|
||||
print("Mastodon Boost enabled")
|
||||
from . import boost_mastodon
|
||||
import boost_mastodon
|
||||
posts['mastodon_boost'] = boost_mastodon.boost(posts['pixelfed'])
|
||||
|
||||
if delete_mode:
|
||||
|
@ -1,5 +1,5 @@
|
||||
import flickrapi
|
||||
from . import load_config
|
||||
import load_config
|
||||
|
||||
print("Authenticating with Flickr")
|
||||
flickr = flickrapi.FlickrAPI(load_config.config['flickr']['app_api'], load_config.config['flickr']['app_secret'])
|
||||
|
@ -1,4 +1,4 @@
|
||||
from . import load_config
|
||||
import load_config
|
||||
|
||||
from mastodon import Mastodon
|
||||
import datetime, pytz
|
||||
|
Loading…
Reference in New Issue
Block a user