From 75530bae88b7caa9f4597ac12e9a5117d96f44b0 Mon Sep 17 00:00:00 2001 From: horhik Date: Tue, 31 Aug 2021 23:57:31 +0300 Subject: [PATCH] add README --- README.md | 14 ++++++++++++++ already_posted.txt | 1 + src/main.py | 5 +++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..33b3c6d --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Instagram2Mastodon 🐘 + +Simple python 🐍 script for crossposting from instagram to mastodon (maybe it could work with pixelfed) + +## Installing +Just clone repo, build a docker container and run it +``` bash + git clone https://github.com/horhik/instagram2mastodon + cd instagram2mastodon + docker build -t YOUR_CONTAINER_NAME . + docker container run -it -v $(pwd):/app I2M_INSTAGRAM_USER I2M_INSTANCE I2M_TOKEN +``` + + diff --git a/already_posted.txt b/already_posted.txt index 5aaccfb..a088570 100644 --- a/already_posted.txt +++ b/already_posted.txt @@ -141,3 +141,4 @@ https://scontent-arn2-1.cdninstagram.com/v/t51.2885-15/e35/s1080x1080/151776689_ + diff --git a/src/main.py b/src/main.py index 99bb071..cb4de49 100644 --- a/src/main.py +++ b/src/main.py @@ -12,7 +12,8 @@ f.write("\n") f.close() fetched_user = sys.argv[1] -mastodon_token = sys.argv[2] +mastodon_instance = sys.argv[2] +mastodon_token = sys.argv[3] print(Fore.GREEN + '🚀 > Connecting to Instagram...') print(Style.RESET_ALL) @@ -24,7 +25,7 @@ print(Fore.GREEN + '🚀 > Connecting to Mastodon/Pixelfed...') print(Style.RESET_ALL) mastodon = Mastodon( access_token = mastodon_token, - api_base_url = 'https://mastodon.ml' + api_base_url = mastodon_instance # api_base_url = 'https://pixelfed.tokyo/' )