Recieve notifications daily about an incoming deadline.
There are two ways of setting up. One is to clone this repository and make any optional modifications to the coundown.py file and deploy it yourself to Heroku. The other is to follow the simple steps below which uses the Heroku button to deploy the app. A prequisite is that you have a Heroku account and have added a method of payment on there. Including add ons on a Herku app, even though the Heroku Scheduler is free, requires that the account has a method of payment.
-
Create a new incoming webhook for your Slack channel and copy the unique URL. This is the URL countdown.py will be sending post requests to.
-
Press this button to create a new Heroku app:
-
Paste the unique URL into the 'SLACK_URL' field and deploy the app.
-
After deployment, click manage apps. You should also get a message to your Slack channel to confirm connection.
-
Click on the Heroku Scheduler, this will open up a dashboard where we can run scripts periodically.
-
We will need run the countdown.py deadline task. The specification for the method is as follows:
The method takes two optional arguments. Options: -d DEADLINE, --deadline=DEADLINE Specify the deadline in ISO format: yyyy-mm-dd -e EVENT, --event=EVENT Name of the deadline event
i.e. If the date today is the 16th July 2015 then
countdown deadline -d 2015-07-18
should print out “2 days until 18 July 2015”countdown deadline -d 2015-07-18 -e weekend
should print out “2 days until weekend”.
If no argument is given, the default is for the method to post how many days till the next Christmas.
-
In the terminal type:
python countdown.py deadline
followed by your desired arguments.
-
Next specify how often you want the script to run, i.e. how often you want a reminder of your deadline in the Slack Channel.
-
Once this is saved the app is complete.