Instagram2Fedi/Docs.md

90 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

2021-11-14 20:17:45 +00:00
# Instagram2Fedi Docs 📜
2021-11-14 20:11:00 +00:00
2021-11-14 20:17:45 +00:00
## How to use
2021-11-14 20:19:53 +00:00
You can use Instagram2Fedi via docker or just like a python script
2021-11-14 20:17:45 +00:00
** Note: ** _Credentials can be complicated. Running without Instagram credentials (`user-name` and `user-password`) appears to work for a short period of time but will, eventually, fail. Providing credentials will work unless Instagram issues a challenge. Recommend leaving `user-name` blank if running as a scheduled job (`--scheduled`) and providing them otherwise._
2021-11-20 11:38:10 +00:00
### With Docker 🐋
2021-11-14 20:17:45 +00:00
Specify your variables in `./env.sh` and then run `./run.sh`
You can modify `docker run` arguments in `./run.sh`
2021-11-14 20:46:53 +00:00
### Just a python script 🐍
2021-11-14 20:17:45 +00:00
Run `pip3 install -r requirements.txt` and then run `./insta2fedi`.
Specify your arguments. You should use `--use-docker 0`.
2021-11-14 20:52:13 +00:00
For example:
``` bash
2022-08-31 18:02:54 +00:00
./insta2fedi --use-docker false --instagram-user <instagram username> --instance <instance domain> --token <OAuth token> --check-interval 10 --post-interval 10 --use-mastodon 4 --user-name <admin> --user-password <admin>
2021-11-14 20:52:13 +00:00
# will check for new post each 10 seconds
```
2021-11-14 20:46:53 +00:00
## Command line arguments 🖥
2021-11-14 20:11:00 +00:00
`--use-mastodon` - set not positive number (`0`, `-1`...) if your instance don't have max image count limit.
2021-11-14 20:17:45 +00:00
2021-11-14 20:11:00 +00:00
For example, default maximum photo count in mastodon is `4`
2021-11-14 20:54:16 +00:00
---
2021-11-14 20:11:00 +00:00
`--instance` - Your instance url
2021-11-14 20:54:16 +00:00
---
2022-08-31 18:02:54 +00:00
`--instagram-user` - Your fetched instagram account user name.
---
`--user-name` - Your instagram user name.
---
`--user-password` - Your instagram password.
2021-11-14 20:11:00 +00:00
2021-11-14 20:54:16 +00:00
---
2021-11-14 20:11:00 +00:00
`--token` - Your OAuth token
2021-11-14 20:54:16 +00:00
---
2021-11-14 20:11:00 +00:00
`--check-interval` - Interval in seconds how often to check for new posts
2021-11-14 20:54:16 +00:00
---
2021-11-14 20:19:53 +00:00
`--post-interval` - Interval in seconds between posting new fetched posts.
2021-11-14 20:17:45 +00:00
2021-11-14 20:11:00 +00:00
If theres more than one new post, sets with which time interval should it post them
2021-11-14 20:54:16 +00:00
---
2021-11-14 20:11:00 +00:00
`--fetch-count` - How many new posts to select
2021-11-14 20:54:16 +00:00
---
2021-11-14 20:11:00 +00:00
`--use-docker` - If you're running it via docker container, set to `1` or `True`
2021-11-14 20:46:53 +00:00
---
`--scheduled` - If set, Instagram2Fedi runs once instead of sleeping for `check-interval` and running forever. This is intended for use as a `cron` job. No additional parameter is needed, just add `--scheduled`.
---
`--verbose` - If set, output all logs including secrets. No additional parameter is needed, just add `--scheduled`.
2021-11-14 20:54:16 +00:00
2021-11-14 20:46:53 +00:00
## 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
```