{"id":23231412,"url":"https://github.com/memoryleak07/tpbtelegrambot","last_synced_at":"2025-04-05T19:26:31.109Z","repository":{"id":204677094,"uuid":"529996622","full_name":"memoryleak07/TPBTelegramBOT","owner":"memoryleak07","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-07T23:08:48.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T17:17:11.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memoryleak07.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-28T22:40:29.000Z","updated_at":"2024-11-07T22:59:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"0a4b73fc-5211-4d55-9b25-b1d0ca338585","html_url":"https://github.com/memoryleak07/TPBTelegramBOT","commit_stats":null,"previous_names":["memoryleak07/tpbtelegrambot"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memoryleak07%2FTPBTelegramBOT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memoryleak07%2FTPBTelegramBOT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memoryleak07%2FTPBTelegramBOT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memoryleak07%2FTPBTelegramBOT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memoryleak07","download_url":"https://codeload.github.com/memoryleak07/TPBTelegramBOT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247388691,"owners_count":20931082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T02:14:46.902Z","updated_at":"2025-04-05T19:26:31.071Z","avatar_url":"https://github.com/memoryleak07.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Builds\n[![tpb-telegrambot image release](https://github.com/memoryleak07/TPBTelegramBOT/actions/workflows/telegram-bot-release.yml/badge.svg)](https://github.com/memoryleak07/TPBTelegramBOT/actions/workflows/telegram-bot-release.yml)\n[![tpb-telegramapi image release](https://github.com/memoryleak07/TPBTelegramBOT/actions/workflows/telegram-api-release.yml/badge.svg)](https://github.com/memoryleak07/TPBTelegramBOT/actions/workflows/telegram-api-release.yml)\n\n# How to use TelegramBot\n\n### add bot to docker-compose\n```docker-compose\nversion: '3'\n\nservices:\n  telegram-bot:\n    image: tpb-telegram-bot:latest\n    depends_on:\n      - telegram-bot-api\n    volumes:\n      - $LOCAL_DESTINATION_PATH:/data\n    environment:\n      - LOG_LEVEL=$LOG_LEVEL\n      - BOT_TOKEN=$BOT_TOKEN\n      - BASE_FILE_URL=$BASE_FILE_URL\n      - API_BASE_URL=$API_BASE_URL\n      - READ_TIMEOUT=$READ_TIMEOUT\n      - QBITTORENT_URL=$QBITTORENT_URL\n      - QBITTORENT_USERNAME=$QBITTORENT_USERNAME\n      - QBITTORENT_PASSWORD=$QBITTORENT_PASSWORD\n      - IS_LOCAL_API=$IS_LOCAL_API\n      - DESTINATION_PATH=$DESTINATION_PATH\n      - USERS_WITHE_LIST=$USERS_WITHE_LIST\n      - GET_INTERNAL_USAGE=$GET_INTERNAL_USAGE\n      - TELEGRAM_DOWNLOAD_DATA_FILE_PATH=$TELEGRAM_DOWNLOAD_DATA_FILE_PATH\n      - LOCAL_TELEGRAM_DOWNLOAD_DATA_FILE_PATH=$LOCAL_TELEGRAM_DOWNLOAD_DATA_FILE_PATH\n```\n### Variabili da configurare nell'enviroment\n\nDi seguito l'elenco delle variabili da configurare nell'environment, per il debug utilizzare il file `.vscode/launch.json`.\n\n| Key                  | Obbligatorio | Descrizione                                                          | Default value                     |\n|----------------------|:------------:|----------------------------------------------------------------------|-----------------------------------|\n| BOT_TOKEN            |      SI      | Token generato con [BotFather](https://t.me/BotFather)               |                                   |\n| LOG_LEVEL            |              | Livello di logging                                                   | ERROR                             |\n| BASE_FILE_URL        |              | Directory di salvataggio dei file scaricati tramite telegram         | https://api.telegram.org/file/bot |\n| API_BASE_URL         |              | Endpoint delle API telegram                                          | https://api.telegram.org/bot      |\n| READ_TIMEOUT         |              | Timeout del download dei file scaricati tramite telegram. Utilizzando API avviate in locale settare a None| 5.0 |\n| QBITTORENT_URL       |      SI      | Indirizzo client QBittorrent                                         |                                   |\n| QBITTORENT_USERNAME  |              | Username per l'accesso al client QBittorrent                         |                                   |\n| QBITTORENT_PASSWORD  |              | Password per l'accesso al client QBittorrent                         |                                   |\n| IS_LOCAL_API         |              | Indica se le API di telegram sono avviate in locale                  | False                             |\n| DESTINATION_PATH     |      SI      | Path di salvataggio dei file scaricati tramite telegram. Attraverso tale path si ottine anche lo spazio di archiviazione: disponibile, usato e totale | |\n| USERS_WITHE_LIST     |              | Lista di username autorizzati all'utilizzo del bot separati da virgola. Se non vengono specificati l'accesso è autorizzato a tutti | |\n| GET_INTERNAL_USAGE   |              | Indica se ottenere le info di archiviazione della memoria interna    | False |\n| TELEGRAM_DOWNLOAD_DATA_FILE_PATH | SI | Indica il path di salvataggio del file `data.dict` utilizzato per la storicizzazione dei file da scaricare tramite telegram | |\n\n### Elenco comandi per configurazione in **BotFather**\n\nDi seguito l'elenco dei comandi da utilizzare per la configurazione del bot in [BotFather](https://t.me/BotFather).\n\n```\nstart - Start\ndwtelegram - To run section Telegram download\nsearch - To run Torrent download\nspace - Space on disks\nprev - Precedent command\nsetname - Change name of file in download list\nspace - Show raspy memory space\nnext - Next state\ndwlist - Download list\nend - Close handler\nmagnet - Download torrent by magnet link\nqbittorrent - View qBittorrent command\n```\n\n# How to use Telegram API\n\n### Use container\nPer avviarlo può essere utilizzato il seguente `docker-compose`\n\n```docker-compose\nversion: '3'\n\nservices:\n  telegram-bot-api:\n    image: tpb-telegram-api:latest\n    container_name: telegram-bot-api\n    environment:\n      - API_ID=1234561\n      - API_HASH=1234567\n    ports:\n      - 8880:8080\n    volumes:\n      - data:/data\n    # command: ./build/telegram-bot-api --local --api-id=$API_ID --api-hash=$API_HASH --dir=/data/telegram-api --http-port=8880\n\nvolumes:\n  data:\n```\n### Build and install Telegram API on Raspberry Pi\n\nI seguenti comandi consentono il download dal repository [API Telegram](https://github.com/tdlib/telegram-bot-api.git) e la compilazione su Raspberry Pi.\n\n```bash\nsudo apt-get install make git zlib1g-dev libssl-dev gperf php-cli cmake clang libc++-dev libc++abi-dev\ngit clone --recursive https://github.com/tdlib/telegram-bot-api.git\ncd telegram-bot-api\nmkdir build\ncd build\nCXXFLAGS=\"-stdlib=libc++\" CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=../tdlib ..\ncmake --install . --target prepare_cross_compiling\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemoryleak07%2Ftpbtelegrambot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemoryleak07%2Ftpbtelegrambot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemoryleak07%2Ftpbtelegrambot/lists"}