Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/natsuozawa/currency-discord
Periodic currency notification for discord
https://github.com/natsuozawa/currency-discord
Last synced: about 12 hours ago
JSON representation
Periodic currency notification for discord
- Host: GitHub
- URL: https://github.com/natsuozawa/currency-discord
- Owner: natsuozawa
- Created: 2022-07-24T07:26:33.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-10T12:26:38.000Z (over 2 years ago)
- Last Synced: 2023-03-05T19:34:20.375Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# currency-discord
Notifies a discord channel via webhook about currency rates using a custom mechanism.
# Background
Managing finances in multiple currencies can be hectic. I have created this workflow to spare the time of searching exchange rates every month.
# Mechanism
This workflow calculates a roughly stable exchange rate by taking the average daily exchange rate of the last n days (this is configurable, up to 365). You can configure a periodic activation of this workflow using crontab.
Depends on [fawazahmed0/currency-api](https://github.com/fawazahmed0/currency-api).
# Installation and configuration
Developed and tested using Python 3.9.
Create an .env file from .env.example as follows:
```
WEBHOOK_URL= obtained from Discord.
CURRENCIES_FORM= comma separated values, ISO abbreviations
CURRENCIES_TO= comma separated values, ISO abbreviations
LAST_N_DAYS= number from 1 to 365
```This workflow will generate currency rates for all currency pairs in `CURRENCIES_FORM` and `CURRENCIES_TO`.
Then, run
```
docker-compose up
```# Development
After cloning the repository, create and use a virtual environment.
```
python3 -m venv venv
source venv/bin/activate
```Install dependencies.
```
pip3 install -r requirements.txt
```