programs for talking to a mastodon server.
See LICENSE.md.
-
Sync this repo:
git clone https://github.com/HalCanary/mastodoner.git cd mastodoner/
-
Install
go
version ≥ 1.19 (https://go.dev/dl/). -
Execute:
go build -o . ./...
-
Create an access token by visiting this url:
https://YOUR_HOSTNAME_HERE/settings/applications
Grant the following access:
read:accounts
read:search
write:follows
write:statuses
-
Create a config file
~/mastodon.json
that looks like:{ "AccessToken": "YOUR_ACCESS_TOKEN HERE", "Language": "en", "Host": "YOUR_HOSTNAME_HERE", "MaximumStatusLength": 500 }
-
Write your status in a text file, e.g.
STATUS.txt
-
Update your status:
./poststatus < STATUS.txt
or
./poststatus -spoiler 'Content Warning: US politics' < STATUS.txt