createpleromaapp/README.md

75 lines
2.4 KiB
Markdown
Raw Normal View History

2022-09-01 03:50:43 +00:00
# Readme
Create Pleroma App is a simple python3 script to generate OAuth tokens for your Pleroma account.
2024-03-10 02:03:11 +00:00
This will output the following credentials as shell variable:
```
API_BASE_URL=string
CLIENT_ID=string
CLIENT_SECRET=string
API_BASE_URL=string
```
2022-09-01 03:50:43 +00:00
## Installing
2024-03-10 02:03:11 +00:00
To setup the python3 environment run the following commands:
2022-09-01 03:50:43 +00:00
```
2022-09-01 03:51:45 +00:00
git clone 'https://git.yandere.cc/Anon/CreatePleromaApp.git'
2022-09-01 03:52:44 +00:00
cd CreatePleromaApp/
2022-09-01 03:50:43 +00:00
python -m venv venv
pip install --upgrade pip
2024-03-10 02:03:11 +00:00
pip install Mastodon.py
2022-09-01 03:50:43 +00:00
deactivate
./run.sh -h
```
If everything worked correctly you should see usage information on Create Pleroma App.
2022-09-01 03:54:16 +00:00
## Default Settings
2022-09-01 03:50:43 +00:00
If you want to change the default values for the input prompts, you can edit the source code directly in `src/create_app.py`
2024-03-10 02:03:11 +00:00
## Generating Your OAuth Tokens
To generate your tokens, run the following commands and follow the interactive prompts:
```
touch cred.sh
chmod 600 cred.sh
cd ..
git clone 'https://git.yandere.cc/Anon/CreatePleromaApp.git'
cd CreatePleromaApp/
./run.sh > ../FediStatusPoster/cred.sh
# Follow the interactive prompts
```
## Encrypting Your OAuth Tokens
If you are going to be running a bot over a long period of time, consider encrypting your OAuth tokens with GPG encryption and a keyfile.
2022-10-09 20:57:10 +00:00
2024-03-10 02:03:11 +00:00
REMINDER: Your keyfile should typically be stored on a seperate removable device that can be quickly disconnected. If your account is compromised, you should also revoke permissions in your Pleroma settings panel.
```
touch cred.sh.gpg
touch cred.sh.key
chmod 600 cred.sh.key cred.sh.gpg
</dev/random tr -dc 'a-zA-Z0-9' | head -c4096 > cred.sh.key
cd ..
git clone 'https://git.yandere.cc/Anon/CreatePleromaApp.git'
cd CreatePleromaApp/
./run.sh | gpg -q -c --pinentry-mode loopback --passphrase-file ../FediStatusPoster/cred.sh.gpg -o ../FediStatusPoster/cred.sh.gpg -
# Follow the interactive prompts
```
If you do not want to keep a keyfile, but still want encryption, modify the encryption step with the following:
```
./run.sh | gpg -q -c --pinentry-mode loopback -o ../FediStatusPoster/cred.sh.gpg -
```
2022-09-01 03:50:43 +00:00
2024-03-10 02:03:11 +00:00
Be sure to update `./run.sh` to point to your new paths:
2022-09-01 03:50:43 +00:00
```
2024-03-10 02:03:11 +00:00
DEFAULT_CREDENTIALS="cred.sh.gpg"
DEFAULT_KEYFILE="cred.sh.key" or DEFAULT_KEYFILE="-" (if not using a keyfile)
2022-09-01 03:50:43 +00:00
```
2022-09-01 03:56:03 +00:00
## Donate
2022-10-18 20:14:39 +00:00
BTC: bc1q8w04c6xt0sm2nskkqatp372llyx8ed33at4k4g
ETH & BAT: 0x2B1C49cc1C93e5bba59a5eD4D0E0a4Da8D6Ce482
2022-09-01 03:56:03 +00:00
2022-10-18 20:14:39 +00:00
XMR: 493HynLQA4z71b3j9ZDXRNQudpdFW8GxeBGD8ahRctKn97RRurMVd35DqVqdAdjv68TcXTJWUwm6ee81ujDXGcmtKFixwQk