Skip to content

A Telgram bot for sending notifications about shipments

Notifications You must be signed in to change notification settings

alufers/paczkobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1348696 · Jun 18, 2024
May 6, 2023
Mar 6, 2023
Mar 6, 2023
Jun 29, 2021
Mar 24, 2022
Nov 1, 2022
Oct 5, 2023
Oct 5, 2023
Jan 24, 2024
Oct 5, 2023
Jun 18, 2024
Sep 27, 2021
Oct 17, 2023
Sep 21, 2023
Mar 7, 2023
Mar 6, 2023
Mar 6, 2023
May 7, 2022
Sep 21, 2023
Oct 5, 2023
Oct 5, 2023
Mar 18, 2023
Mar 3, 2021

Repository files navigation

paczkobot

A Telegram bot for tracking packages.

See it in action: @paczko_bot

Features

  • Track packages from these providers
    • dhl (requires API key)
    • ups
    • dpd.com.pl
    • poczta-polska
    • postnl
    • Inpost
    • gls
    • packeta
    • FedEx (Poland)
    • Geis (Poland)
    • Orlen
    • Deutsche Post
  • Follow packages and send notifications when a package status changes
  • Generate QR codes for InPost Paczkomaty
  • Automatically import packages from InPost Paczkomaty
  • Remotely open InPost Paczkomaty
  • Detect package barcodes in images

Screenshots

Screenshot Screenshot Screenshot

Usage

Create a file called paczkobot.yaml looking like this:

telegram:
  debug: false
  username: paczko_bot
  token: "<telegram api key>"
db:
  type: sqlite # or postgres
  filename: paczkobot_dev.db # for sqlite
  dsn: "host=localhost user=gorm password=gorm dbname=gorm port=9920 sslmode=disable TimeZone=Europe/Warsaw" # for postgres
tracking:
  providers:
    dhl:
      enable: false # register on the dhl developers webpage to enable
      api_key: "<dhl api key>"
    mock:
      enable: false
  automatic_tracking_check_interval: 20m0s
  automatic_tracking_check_jitter: 7m0s
  delay_between_packages_in_automatic_tracking: 1m0s
  max_packages_per_automatic_tracking_check: 15
  max_time_without_change: 336h0m0s

You have to enter your telegram token there.

Then you can run the bot as a Go program (go run .) or use the following docker-compose.yml file to run in docker:

version: '3'
services:
  paczkobot:
    image: ghcr.io/alufers/paczkobot:latest
    restart: unless-stopped
    volumes:
        - ./paczkobot-config.yaml:/etc/paczkobot/paczkobot.yaml

Images for x86_64 and aarch64 are provided.

Contributing

Contributions are welcome! Please open an issue or a pull request.

Please note that this repository uses pre-commit to run some checks on the code before committing. You can install it with pip install pre-commit and then run pre-commit install to install the git hooks.

Thank you!