A bot that sends notifications (reminder, stock, forex) to telegram chat.
Notifications are classified into report and notification.
- Report refers to notification that is sent periodically eg once per day.
- Monitor refers to notification that is sent only if the rule is met, adhoc basis.
Spreadsheet
date (A1) | time (A2) | type (A3) | title (A4) |
---|---|---|---|
28 Feb 2018 | 10:14:00 | Eat | Breakfast |
28 Feb 2018 | Book | Shuttle | |
21 Mar 2018 | 19:20:00 | Upgrade | Packages |
On 28 Feb 2018, this message will be sent to telegram:
Upcoming events:
Write Shuttle
Book Shuttle
- API token from open exchange rates
- Google Service Account key and access to the google sheet
- Telegram bot token from BotFather
- Structured data in Google sheets
- Copy sample/ to secrets/
- Copy google service account key (google.json) into secrets
- Update the open exchange rate key in oer.js
- Update the telegram bot token and chat into chat.js
npm run install
npm run live
npm run start
docker-compose build
docker-compose up
docker-compose down
[ ] update readme
[ ] Use secret management - docker secrets, vault etc.
[ ] create boilerplate
[ ] Use user in dockerfile
[X] use sinon for mock and spying
[X] docker
[X] tests
[X] check time for reminder
[X] scheduler
Hardcoded the group of docker nodejs user
RUN groupadd -r nodejs -g 1001 \
&& useradd -m -r -g nodejs nodejs \
&& chown -R nodejs:nodejs /usr/app
Test a specific test file
npm run test-debug <file>
Full test ( lint + unit tests + coverage )
npm run test
Run locally
npm run start
Node.js Quickstart | Sheets API | Google Developers
ava test runner