https://github.com/vieitesss/dhl_package_tracker
Script that sends a notification in case there is an update about your package
https://github.com/vieitesss/dhl_package_tracker
Last synced: 4 months ago
JSON representation
Script that sends a notification in case there is an update about your package
- Host: GitHub
- URL: https://github.com/vieitesss/dhl_package_tracker
- Owner: vieitesss
- Created: 2024-06-25T15:21:06.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-28T15:45:42.000Z (12 months ago)
- Last Synced: 2025-01-13T23:20:00.529Z (5 months ago)
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DHL_package_tracker
I've made this script because I'm waiting for a [Voyager](https://www.zsa.io/voyager) keyboard, and I'm so exited that I can't stop reloading the web to see if there are any updates.
This Python script saves the last update message from DHL web and checks, every time it is executed, if the previous saved message is equal to the new message. If the messages are different, it uses [dunst](https://github.com/dunst-project/dunst) to send a notification to your computer, so you can see the change live.
# Prerequisites
- Only tested in Debian 12 (may or may not work in other distributions)
- python3
- dunst## Optional
You can receive a phone notification if you install [PushBullet](https://www.pushbullet.com/) on your PC and phone, and then provide your Access Token to the script.
To create an Acess Token justo do Settings>Create Access Token in your PushBullet account (PC).
# How to use
First of all is installing the requirements.
```bash
pip install -r requirements.txt
```How I'm currently using it is through a cron job that runs it every minute. To setup a cron job you just have to do the following:
```bash
crontab -e
```Include the following line at the end of the file.
```bash
*/1 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /path/to/python3 /path/to/main.py
# For example
# */1 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /usr/local/bin/python3 /home/user/main.py 123123123
```- The "XDG..." thing is required, at least for me, to allow cron to send notifications.
- The number at the end must be your DHL package id.# More
You can do with this script whatever you want. Tweak it to your liking.