Purpose: Watch for new notices on medical counselling websites, and to collect data for later analysis
Basically 2 kaam hai iske:
-
Scrape websites like MCC, Bihar UGMAC, to fetch latest notices It runs as a daemon in background, and shows a notification when new notices are available
-
Data Collectors: Each data collector are separated into individual binaries, for easy use with
crontab
, so you can chose the update frequency. Currently, there is only one, for NMC, it parses the website for data on number of pg students etc, and saves them in a sql table
notify-send
- For notifiersmysql
- For data collectorslinux
- Because I use it, so I tested it on linux only... only problem might bexdg
though, you can probably fix it easily on windows
Things which are daemons, or needed to be started once, I use systemd units.
For things, which are one-shot and require to be started repeatedly, I used
fcrontab
... I could have used systemd timers, but crontab is easier
- For notifiers, I create a systemd service unit, probably inside
~/.local/share/systemd/user
, with the following content:
[Unit]
Description=Ankit NEET Notice Notifier
After=mariadb.service
StartLimitBurst=5
[Service]
Restart=always
RestartSec=10s
Environment="LD_LIBRARY_PATH=/home/MYUNAME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib" "SQL_USERNAME=xxxxx" "DB_NAME=medicaldata" "TABLE_NAME=nmc"
ExecStart=/home/MYUNAME/.local/bin/notice-notifier-daemon
[Install]
WantedBy=default.target
- For the ones that require to be repeatedly run, do it with:
fcrontab -e # or crontab -e
Then,
# Run after every 10 minutes
*/10 * * * * /home/MYUNAME/.local/bin/kuchh-to-hoga