A twitter bot that automatically tweets a rant.
Named after the screaming bird piha, it represents the bot's action - ranting/screaming. 😜
- I wanted to practice my recently acquired Golang skills.
- My internet service provider was extremely terrible at addressing requests. Tired of following up with them, I wrote this bot to do that for me repeatedly and automatically until my issues are resolved.
- We all need a twitter bot at some point in our life! 😉
- You will need a twitter developer account. Follow the instructions here to set up a new twitter bot app and gather the following secrets:
- TWITTER_API_KEY
- TWITTER_API_KEY_SECRET
- TWITTER_ACCESS_TOKEN
- TWITTER_ACCESS_TOKEN_SECRET
- edit
config.env
file and setup the below configurations- RANT_USER - the twitter handle of the service provider
- RANT_DATE - the date in YYYY-MM-DD format when your issue with the service provider occurred
- RANT_TEMPLATE - the rant tweet template. DO NOT change the text inside
{{}}
including the braces.
The project utilizes GitHub Actions to automatically run piha daily at 10 AM IST.
- Fork this repo
- Click on
Settings
tab and then onSecrets
option - Add each of the secrets gathered from prerequisite step 1
- Optionally edit
.github\workflows\run-piha.yml
and changeon.cron.schedule
property to run the tool at your desired time - To stop piha, move
run-piha.yml
file out of theworkflows
directory
- Clone this repo
- run
cp example.env local.env
- edit
local.env
file and set the secrets gathered from prerequisite step 1 - run
go get -v -t -d ./...
to install the dependencies - run
go run piha.go
Peace ✌