mirror of
https://github.com/Horhik/Instagram2Fedi.git
synced 2024-11-25 01:21:31 +00:00
finish docker-compose file
This commit is contained in:
parent
43d2ea6c01
commit
a424783a71
|
@ -5,10 +5,10 @@ services:
|
|||
context: .
|
||||
image: "horhik/instagram2fedi:latest"
|
||||
environment:
|
||||
- YOUR_CONTAINER_NAME=innubis_crossposter
|
||||
- I2M_INSTAGRAM_USER=innubis
|
||||
- I2M_INSTANCE=mastodon.ml
|
||||
- I2M_TOKEN=y-Sz4sICYGwEkTI5UJz2U-58hvjGXec61YSLo2zascQ
|
||||
- YOUR_CONTAINER_NAME=<whatever>
|
||||
- I2M_INSTAGRAM_USER=<instgram username>
|
||||
- I2M_INSTANCE=<mastodon or pixelfed instance>
|
||||
- I2M_TOKEN=<your token here>
|
||||
- I2M_CHECK_INTERVAL=3600 #1 hour
|
||||
- I2M_POST_INTERVAL=3600 #1 hour
|
||||
- I2M_USE_MASTODON=4 #max carouse - is 4, if there's no limit set to -1
|
||||
|
|
|
@ -19,31 +19,21 @@ print(post_interval)
|
|||
print(use_mastodon)
|
||||
print(fetch_count)
|
||||
|
||||
|
||||
def exists(a):
|
||||
return a != '' and a != False
|
||||
|
||||
|
||||
def process_arguments(args, defaults):
|
||||
if(instance):
|
||||
defaults["instance"] = instance
|
||||
elif (instagram_user):
|
||||
defaults["instagram-user"] = instagram_user
|
||||
elif (token):
|
||||
defaults["token"] = token
|
||||
|
||||
elif (check_interval):
|
||||
defaults["check-interval"] = check_interval
|
||||
|
||||
elif (post_interval):
|
||||
defaults["post-interval"] = post_interval
|
||||
|
||||
elif (fetch_count):
|
||||
defaults["fetch-count"] = fetch_count
|
||||
|
||||
elif (use_mastodon):
|
||||
defaults["carousel-limit"] = use_mastodon
|
||||
else:
|
||||
print(Fore.RED + '❗ -> Missing Argument ')
|
||||
print(Style.RESET_ALL)
|
||||
print(datetime.datetime.now())
|
||||
defaults["instance"] = instance if instance !='' and instance else None
|
||||
defaults["instagram-user"] = instagram_user if instagram_user != '' and instagram_user else None
|
||||
defaults["token"] = token if token != '' and token else None
|
||||
defaults["check-interval"] = int(check_interval) if check_interval != '' and check_interval else None
|
||||
defaults["post-interval"] = int(post_interval) if post_interval != '' and post_interval else None
|
||||
defaults["fetch-count"] = int(fetch_count) if fetch_count != '' and fetch_count else None
|
||||
defaults["carousel-limit"] = int(use_mastodon) if use_mastodon != '' and use_mastodon else None
|
||||
#print(Fore.RED + '❗ -> Missing Argument ')
|
||||
#print(Style.RESET_ALL)
|
||||
#print(datetime.datetime.now())
|
||||
print(defaults)
|
||||
return defaults
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ default_settings = {
|
|||
|
||||
settings = process_arguments(sys.argv, default_settings)
|
||||
|
||||
print('FINAL SETTINGS' , settings)
|
||||
print('FAIL ♂ SETTINGS' , settings)
|
||||
|
||||
agree = [1, True, "true", "True", "yes", "Yes"]
|
||||
if (os.environ.get("USE_DOCKER")):
|
||||
|
|
Loading…
Reference in a new issue