1.3 KiB
1.3 KiB
DoctoCheck
A crude tool to poll Doctolib and hopefully get an ophtalomogist appointment. It will hit a Doctolib API endpoint and query for the availabilities of a particular doctor for the next 3 weeks. If there is any available slot, a notification is sent to my phone using ntfy.
Improvements
- Assistant to find out config values
- Notify of next availability
- Config: override with environment
- Config: add validation after decoding config file
- Add retry logic?
Test run
- Compile with
go build - Create
config.tomlfile, usingconfig.example.tomlas a template - Run once with
doctocheck - More verbose output with
doctocheck -v - Notify also when there's no availability:
doctocheck -debug
Deployment
The project ships with systemd unit files that can be used to ensure Doctolib
gets polled every 15 minutes. Note that it supposes doctocheck is installed
under /usr/local/bin and the config file is under /etc/doctocheck; you may
want to adjust that. To install them:
sudo cp systemd/doctocheck.{service,timer} /etc/systemd/system/
sudo systemctl daemon-reload
Then enable the service and the timer:
sudo systemctl enable --now doctocheck.timer
We can now check when the next run is scheduled:
systemctl list-timers doctocheck.timer