A Twitter bot that tweets the current progress of the KFUPM current semester.
The tweet will look something like this:
[🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢🁢]100% 🎉
130/130 days left 🗓
Today: Last day for faculty to submit grades to the Deanship (2:00 PM);Official Graduation Date 💡
#KFUPM
Don't forget to follow the bot account 🫶
See the contributing guide for detailed instructions on how to get started with this project.
We accept any type of contribution, including some that don't require you to write a single line of code.
This project is intended to be used with the latest Active LTS release of Node.js.
To clone this repo:
-
Open a new
terminal
/powershell
window. -
Clone the repo:
git clone https://github.com/hadysata/KFUPM-semester-progress-bar.git
-
Open the project in your favorite IDE/Code editor
- In the project root folder, run
npm i && cd functions && npm i
- If you wish to use Firebase cloud functions, run:
npm install -g firebase-tools
cd functions && firebase init
Follow the instructions in your CLI, and make sure to setup Firebase cloud functions(Your Firebase project plan should be Blaze
)
- In the project root folder, create a new
.env
file with the following variables:
APP_KEY=""
APP_SECRET=""
ACCESS_TOKEN=""
ACCESS_SECRET=""
These are Twitter keys used by the bot to use Twitter API; you can get these keys from Twitter developer portal
To run the script, in the project root folder run:
npm run build
npm run start
To run the simulator, run:
npm run start:simulator
To run the bot on Firebase cloud functions, run:
cd fuctions
npm run serve
To deploy the bot script to Firebase cloud functions, run:
cd fuctions
firebase deploy
You could also run this script on other cloud platform such as Heroku or Railway; just make sure to setup a cron job/scheduler to run this script in any time interval you want.
The simulator script will simulate and try to generate whole semester tweets; this script is connected to Github workflow, so any changes that break the simulator will result in a failing test.
Licensed under the APLv2. See the LICENSE file for details.