SowaNotifier is an Elixir application that monitors the catalog of the Wielkopolska Public Library (WBP) in Poznań for new book additions. It fetches the catalog page, parses the data, and sends notifications about new items via a webhook.
- Fetches and parses the WBP Poznań catalog page
- Detects new book additions
- Sends notifications via Slack webhook
- Stores processed data to avoid duplicate notifications
-
Clone the repository:
git clone https://github.com/your-username/sowa_notifier.git cd sowa_notifier -
Install dependencies:
mix deps.get -
Create a
.envfile in the project root with the following content:SOWA_NOTIFIER_WEBHOOK_URL=your_webhook_url_hereReplace
your_webhook_url_herewith your actual webhook URL. -
Compile the project:
mix compile
The application uses environment variables for configuration. Make sure to set up the following:
SOWA_NOTIFIER_WEBHOOK_URL: The URL of the Slack webhook to send notifications to.
You can set these in your .env file for development or directly in your environment for production.
To run the application:
mix run --no-halt
The application will periodically check for new books and send notifications as configured.
To run the application in interactive mode:
iex -S mix
You can then manually trigger the fetch and parse process:
SowaNotifier.fetch_and_parse()Run the test suite with:
mix test
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details.