Barname Kon is telegram bot which create "Add to Calendar" link (Google Calendar) and file (.ics) for your event. It only accept Jalali date and Tehran time.
- Install Heroku cli From Here. You should change your IP for sign up [from Iran to anywhere!]
- Download Ngrok and set it on port 5000 (
./ngrok http 5000
) - Clone Repository
- Create virtural env and install requirements.
- Change variable in .env.sample in proper way
- You should create a bot in @Botfather.
- Rename .env.sample to .env
- In Barnamekon.py :
cd path/to/barnamekon
heroku local web
- open this address in your browser localhost:5000 . if
!
appear it means it deployed successfully else, see terminal for log. - Go to telegram and interact with Barnamekon.
I know it isn't not a simple way but I can't find better way. If you have an idea please open issue and tell me about that, it's really appreciated.
I use this medium post and official pyTelegramBOTAPI documents
I think fast,best and cheapest 😁 way for deploy your Bot is heroku. This post really help me to do that.
I oppened two issue that explain my ideas for improving this project. So feel free to send pull request or open new issue.
2021/3/29 : Solve the problem of summer time. (Barnamekon set time 1 hour ahead when summer time come.)
2021/5/19 : Create ics file for events. But ics file don't show time correctly (I think this is the problem with timezone), It will be fixed in next update.
2021/6/3 : Bug related to pytz library and known bug from ics library which incorrectly set time in ics file, fixed.
2021/8/11 : Add .env.sample file. Also add steps to README.md for deploying Barnamekon in local machine.