Simple python script that will convert CHF Swiss Francs to IDR Indonesian Rupiah and send the result to a telegram user.
- pip
sudo apt-get install python3-pip -y
- Get a free API Key from Telegram @BotFather https://telegram.me/BotFather. Then you can ask the Telegram UserID bot https://telegram.me/myidbot to give you your User ID by sending the command :
/getid
- Clone the repo
git clone https://github.com/iyotee/CHF2IDR.git
- Install pip packages
pip3 install -r requirements.txt
-
Enter your API in
main.py
ormain2.py
-
Simply run
cd CHF2IDR && python3 main.py
or
python3 main2.py
for using a different API service (APILAYER.COM)
you can create a cron task every hour ( 0 * * * * )
crontab -e
edit the end of the files by appending :
0 * * * * python3 CHF2IDR/main.py
OR
0 * * * * python3 CHF2IDR/main2.py
Save and exit with ctrl+x and that's it ! Your bot is now running and sending your message on your Telegram user every hour ! ๐