From 66ce481e034cf77026be63c50d93489f2b65bf93 Mon Sep 17 00:00:00 2001 From: horhik Date: Sun, 14 Nov 2021 23:46:53 +0300 Subject: [PATCH 1/4] add Default arguments list to Docs.md --- Docs.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Docs.md b/Docs.md index 9350c42..f088471 100644 --- a/Docs.md +++ b/Docs.md @@ -3,19 +3,19 @@ ## How to use You can use Instagram2Fedi via docker or just like a python script -### Via Docker +### Via Docker 🐋 Specify your variables in `./env.sh` and then run `./run.sh` You can modify `docker run` arguments in `./run.sh` -### Just a python script +### Just a python script 🐍 Run `pip3 install -r requirements.txt` and then run `./insta2fedi`. Specify your arguments. You should use `--use-docker 0`. -## Command line arguments +## Command line arguments 🖥 `--use-mastodon` - set not positive number (`0`, `-1`...) if your instance don't have max image count limit. @@ -36,3 +36,16 @@ If theres more than one new post, sets with which time interval should it post t `--fetch-count` - How many new posts to select `--use-docker` - If you're running it via docker container, set to `1` or `True` + +## Default values ⚙ +Default values are: +``` bash + --instance None + --instagram-user None + --token None + --check-interval 3600 + --post-interval 3600 + --fetch-count 10 + --use-mastodon 4 + --use-docker True +``` From 0cea3d42f3f58cdb4e0eeba1e6aaa06ff79b424f Mon Sep 17 00:00:00 2001 From: horhik Date: Sun, 14 Nov 2021 23:49:10 +0300 Subject: [PATCH 2/4] update README --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4938d5a..1fe7ea3 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,13 @@ Simple python 🐍 script for crossposting from instagram to Mastodon/Pixelfed -## Installing +## Using without docker +See [Docs.md](./Docs.md) + +## Using with Docker Just clone repo, build a docker container and run it +You can write all needed variables in `./env.sh` and then do `source ./run.sh` ``` bash git clone https://github.com/horhik/instagram2fedi @@ -13,8 +17,6 @@ docker build -t $YOUR_CONTAINER_NAME . docker container run -it -d -v $(pwd):/app $YOUR_CONTAINER_NAME $I2M_INSTAGRAM_USER $I2M_INSTANCE $I2M_TOKEN ``` -You can write all needed variables in `./env.sh` and then do `source ./run.sh` - ![image](https://user-images.githubusercontent.com/46262811/131577640-a3103ff2-af37-422d-96f1-60f1acdef939.png) From a39365ec1f88ad99f86c8b599d7bca4896042548 Mon Sep 17 00:00:00 2001 From: horhik Date: Sun, 14 Nov 2021 23:52:13 +0300 Subject: [PATCH 3/4] add example to Docs --- Docs.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Docs.md b/Docs.md index f088471..b9cd91f 100644 --- a/Docs.md +++ b/Docs.md @@ -15,6 +15,12 @@ Run `pip3 install -r requirements.txt` and then run `./insta2fedi`. Specify your arguments. You should use `--use-docker 0`. +For example: +``` bash + ./insta2fedi --use-docker false --instagram-user --instance --token --check-interval 10 --post-interval 10 --use-mastodon 4 + # will check for new post each 10 seconds +``` + ## Command line arguments 🖥 `--use-mastodon` - set not positive number (`0`, `-1`...) if your instance don't have max image count limit. From 5c8867a93823aa840163d9cfa2d1a3acd5a032ac Mon Sep 17 00:00:00 2001 From: horhik Date: Sun, 14 Nov 2021 23:54:16 +0300 Subject: [PATCH 4/4] beautify Docs.md --- Docs.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Docs.md b/Docs.md index b9cd91f..d6d5052 100644 --- a/Docs.md +++ b/Docs.md @@ -27,22 +27,37 @@ For example: For example, default maximum photo count in mastodon is `4` +--- + `--instance` - Your instance url +--- + `--instagram-user` - Your instagram user name. +--- + `--token` - Your OAuth token +--- + `--check-interval` - Interval in seconds how often to check for new posts +--- + `--post-interval` - Interval in seconds between posting new fetched posts. If theres more than one new post, sets with which time interval should it post them +--- + `--fetch-count` - How many new posts to select +--- + `--use-docker` - If you're running it via docker container, set to `1` or `True` + ## Default values ⚙ Default values are: ``` bash