CreatePleromaApp/README.md
2024-03-09 18:03:11 -08:00

75 lines
2.4 KiB
Markdown

# Readme
Create Pleroma App is a simple python3 script to generate OAuth tokens for your Pleroma account.
This will output the following credentials as shell variable:
```
API_BASE_URL=string
CLIENT_ID=string
CLIENT_SECRET=string
API_BASE_URL=string
```
## Installing
To setup the python3 environment run the following commands:
```
git clone 'https://git.yandere.cc/Anon/CreatePleromaApp.git'
cd CreatePleromaApp/
python -m venv venv
pip install --upgrade pip
pip install Mastodon.py
deactivate
./run.sh -h
```
If everything worked correctly you should see usage information on Create Pleroma App.
## Default Settings
If you want to change the default values for the input prompts, you can edit the source code directly in `src/create_app.py`
## 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.
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 -
```
Be sure to update `./run.sh` to point to your new paths:
```
DEFAULT_CREDENTIALS="cred.sh.gpg"
DEFAULT_KEYFILE="cred.sh.key" or DEFAULT_KEYFILE="-" (if not using a keyfile)
```
## Donate
BTC: bc1q8w04c6xt0sm2nskkqatp372llyx8ed33at4k4g
ETH & BAT: 0x2B1C49cc1C93e5bba59a5eD4D0E0a4Da8D6Ce482
XMR: 493HynLQA4z71b3j9ZDXRNQudpdFW8GxeBGD8ahRctKn97RRurMVd35DqVqdAdjv68TcXTJWUwm6ee81ujDXGcmtKFixwQk