Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabrielrf/rastreiobot
Telegram Bot @RastreioBot
https://github.com/gabrielrf/rastreiobot
hacktoberfest mongodb python telegram telegram-bot telegram-bot-api
Last synced: 1 day ago
JSON representation
Telegram Bot @RastreioBot
- Host: GitHub
- URL: https://github.com/gabrielrf/rastreiobot
- Owner: GabrielRF
- License: gpl-3.0
- Created: 2017-02-01T19:02:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-21T14:10:14.000Z (over 1 year ago)
- Last Synced: 2025-01-05T02:09:38.530Z (8 days ago)
- Topics: hacktoberfest, mongodb, python, telegram, telegram-bot, telegram-bot-api
- Language: Python
- Homepage: https://rastreiobot.xyz
- Size: 830 KB
- Stars: 363
- Watchers: 18
- Forks: 56
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# [RastreioBot](http://telegram.me/RastreioBot)
[![Build Status](https://github.com/GabrielRF/RastreioBot/actions/workflows/ci.yml/badge.svg)](https://github.com/GabrielRF/RastreioBot/actions/workflows/ci.yml)
[![Deploy](https://github.com/GabrielRF/RastreioBot/actions/workflows/deploy.yml/badge.svg)](https://github.com/GabrielRF/RastreioBot/actions/workflows/deploy.yml)
[![Twitter Follow](https://img.shields.io/twitter/follow/espadrine.svg?style=social&label=Follow)](https://twitter.com/gabrf)* [About](#about)
* [Setup](#setup)
* [Run](#run)
* [Contribute](#contribute)
* [Contact](#contact)## About
This is a [Telegram](http://telegram.org) Bot that tracks packages from the [Brazilian Mail Service](https://www.correios.com.br/). It runs on Python 3 and uses MongoDB.
[Try it!](http://telegram.me/RastreioBot)
## Setup
We use [Poetry](https://python-poetry.org/) to manage our dependencies. Check out its [Poetry guide](https://python-poetry.org/docs/#installation) to install it on your machine.
To install the required packages, use the command below. It will install the runtime and also the development dependencies (e.g. Pytest).
```
$ poetry install
```Create a file `bot.conf` following `bot.conf_sample`.
`TOKEN` Bot token generated by BotFather
`int_check` Minimum interval between checks for the same package (3600 means 1 hour)
`*_log` Log files
`patreon` List of people that donate to the bot
`Banned` List of banned users
`usuario` User provived by Correios
`senha` Password provided by Correios
`token` Token provided by Correios
`key` Key provided by TrackingMore
`url` Sentry URL
### MongoDB
__RaspberryPi__
```
https://github.com/GabrielRF/Docker-MongoDB-RPi
```
__Mac__```
brew install mongodb-community
brew services start mongodb-community
```### SQLite
```
touch data_base.db
```create db structure
```
CREATE TABLE assinantes (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
chatid TEXT,
picpayid TEXT);
```## Commands available
```
$ poetry run rastreio --help
Usage: rastreio [OPTIONS] COMMAND [ARGS]...Options:
--help Show this message and exit.Commands:
packages:clean Clean old and duplicated packages
packages:update Update active packages
packages:delete Delete a package
bot:run [--maintenance] Set bot to maintenance mode
```## Running tests
The tests are running on `pytest`, so, in order to run them, just do
```
poetry run pytest
```## Contribute
Pull requests and issues are welcome!
## Contact
[Telegram](http://telegram.me/GabrielRF)
[Site](http://www.gabrf.com)