finished documentation
This commit is contained in:
parent
af09f493f0
commit
07aad6baa4
53
README.md
53
README.md
|
@ -110,3 +110,56 @@ vim headers/1.txt
|
|||
```
|
||||
Create as much headers TXT files as you wish. It will be **used randomly on requests to Instagram** by the mirror bot.
|
||||
|
||||
|
||||
## Run the server
|
||||
|
||||
The server is just a **simple HTTP Python server** that acts as an API to manage your mirrors.
|
||||
|
||||
You have to run the **server.py** script using: `python3 server.py` (it will run at 0.0.0.0:8080).
|
||||
Optionally, you can set a **binding port** with a positional argument like this: `python3 server.py 8081`
|
||||
|
||||
|
||||
## API Documentation
|
||||
|
||||
**List** accounts:
|
||||
|
||||
`curl 127.0.0.1:8080/list`
|
||||
|
||||
**Add a new Instagram account to mirror**. This is done **syncronously until it finishes adding** account information, once it's done, it **calls update asyncronously**.
|
||||
|
||||
`curl 127.0.0.1:8080/<username>/add`
|
||||
|
||||
**Update Instagram account/s mirror** on Pixelfed (mirrors new content). This is **done fully asyncronously**
|
||||
|
||||
```bash
|
||||
# Update just the given account
|
||||
curl 127.0.0.1:8080/<username>/update`
|
||||
|
||||
# API supports wildcard to update all accounts mirrors
|
||||
curl '127.0.0.1:8080/*/update'`
|
||||
```
|
||||
|
||||
**Log in or log out** the account from Pixelfed.
|
||||
|
||||
```bash
|
||||
curl 127.0.0.1:8080/<username>/login
|
||||
curl 127.0.0.1:8080/<username>/logout
|
||||
```
|
||||
In case of repeated posts or disaster, **prune/nuke all Pixelfed posts** from the given account.
|
||||
|
||||
`curl 127.0.0.1:8080/<username>/nuke`
|
||||
|
||||
|
||||
|
||||
## Automatically updating posts of mirrored accounts
|
||||
|
||||
You have to **create a cronjob or systemd timer** (or whatever scheduled) to run `curl '127.0.0.1:8080/*/update'`
|
||||
|
||||
Please consider **how many accounts you mirror** + **how often you want to update posts** + **how often you want to bother Instagram** servers... A good reference is **a job every 4 hours for more-or-less 20 accounts** to be "completely safe".
|
||||
|
||||
|
||||
|
||||
## Happy Mirroring!
|
||||
|
||||
Any problem/bug/request you might encounter **you may contact me** at https://contact.nogafam.es
|
||||
|
||||
|
|
Loading…
Reference in New Issue