https://github.com/scriptex/vik-varna-alerts
Email and web notifications for planned repairs from ViK-Varna
https://github.com/scriptex/vik-varna-alerts
cron email-alert web-alert
Last synced: 7 months ago
JSON representation
Email and web notifications for planned repairs from ViK-Varna
- Host: GitHub
- URL: https://github.com/scriptex/vik-varna-alerts
- Owner: scriptex
- License: mit
- Created: 2023-08-01T08:20:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-11T08:49:46.000Z (8 months ago)
- Last Synced: 2025-07-11T11:50:02.526Z (8 months ago)
- Topics: cron, email-alert, web-alert
- Language: TypeScript
- Homepage: https://vik-varna-alerts.atanas.info/
- Size: 370 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ViK Varna Alerts
[](https://github.com/scriptex/vik-varna-alerts/actions?query=workflow%3ABuild)
[](https://github.com/scriptex/vik-varna-alerts/actions/workflows/send-email.yml)
[](https://www.codacy.com/gh/scriptex/vik-varna-alerts/dashboard?utm_source=github.com&utm_medium=referral&utm_content=scriptex/vik-varna-alerts&utm_campaign=Badge_Grade)
[](https://codebeat.co/projects/github-com-scriptex-vik-varna-alerts-master)
[](https://www.codefactor.io/repository/github/scriptex/vik-varna-alerts)
[](https://deepscan.io/dashboard#view=project&tid=3574&pid=5257&bid=40799)
[](https://github.com/scriptex/vik-varna-alerts/)
> Email and web notifications for planned repairs from ViK-Varna
## About
ViK Varna (ВиК-Варна) is the local water supplier for Varna region in Bulgaria. They post notifications about planned repairs on their website but it is not possible to subscribe to those notifications and receive them immediately - instead one should check their website frequently.
The code in this repository serves as a middleware between the website and the user - it sends hourly notifications on email which contain the latest news related to planned repairs and outages.
The way the code is structured allows for integration with any other website which has a dedicated page for this purpose.
## Usage
In order to use this repository, one must clone it and adjust the repository secrets found under `settings/secrets/actions` in the repository and add their own configuration:
```sh
# The email address of the recipient of the notifications
EMAIL_TO="recipient@example.com"
# The email address of the sender of the notifications
EMAIL_FROM="sender@example.com"
# The web address (URL) of the page that contains the notifications
ALERTS_PAGE="['https://website.notifications/deep/link/1', https://website.notifications/deep/link/2]"
# The subject in the email
EMAIL_SUBJECT="Planned outages and repairs"
# The CSS selector for the HTML element which contains the notifications
DATE_SELECTOR='.item-date-selector'
# The CSS selector for the HTML element which contains the notifications
ALERTS_SELECTOR=".alerts-selector"
# A CSS class name for a single notification element
CHILD_CLASSNAME='alert-item'
# API key for Brevo (formerly known as Sendinblue)
SENDINBLUE_API_KEY="abc-123"
```
## Available ways to use the code in this repository
The code is deployed via Vercel and is running as serverless lambda functions which can be accessed here:
- [the page which contains the alerts](https://vik-varna-alerts.atanas.info/api/alerts)
- [the page which sends an email with the alerts](https://vik-varna-alerts.atanas.info/api/email)
When forked and correctly set up, this repository creates a CRON job which sends an email at 0 (zero) o'clock each hour between 5:00 and 14:00 UTC.
One can adjust this by modifying the parameters in the [action configuration](https://github.com/scriptex/vik-varna-alerts/blob/main/.github/workflows/send-email.yml)
## Visitor stats




## Code stats





## LICENSE
MIT
---
Connect with me:
---