{"id":17366943,"url":"https://github.com/gabrielrf/trafficstatus2telegram","last_synced_at":"2026-06-09T13:31:16.127Z","repository":{"id":197629112,"uuid":"698713149","full_name":"GabrielRF/TrafficStatus2Telegram","owner":"GabrielRF","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-05T16:26:35.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T05:52:53.054Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabrielRF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-30T18:24:23.000Z","updated_at":"2023-10-01T16:40:00.000Z","dependencies_parsed_at":"2023-10-05T17:25:02.855Z","dependency_job_id":null,"html_url":"https://github.com/GabrielRF/TrafficStatus2Telegram","commit_stats":null,"previous_names":["gabrielrf/trafficstatus2telegram"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GabrielRF/TrafficStatus2Telegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FTrafficStatus2Telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FTrafficStatus2Telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FTrafficStatus2Telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FTrafficStatus2Telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabrielRF","download_url":"https://codeload.github.com/GabrielRF/TrafficStatus2Telegram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielRF%2FTrafficStatus2Telegram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34110011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-15T22:11:53.910Z","updated_at":"2026-06-09T13:31:16.097Z","avatar_url":"https://github.com/GabrielRF.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traffic Status to Telegram\n\nEnvio automático do tempo de viagem de carro entre dois pontos usando Google Maps.\n\n## Sugestões\n\n**Envie novas rotas**! Faça um *Pull Request* considerando as instruções em [GitHub Action](#github-action) e novas mensagens serão enviadas no canal [@BsbDF](https://t.me/BsbDF).\n\n## trafficstatus.py\n\n### Variáveis de ambiente\n\n* `BOT_TOKEN`: Token do bot que faz o envio;\n* `GOOGLE_API_KEY`: Chave de acesso à *Distance Matrix API* do Google [(Mais informações)](https://developers.google.com/maps/documentation/distance-matrix/overview?hl=pt-br);\n* `MESSAGE_DESTINATION`: Destino da mensagem;\n* `ORIGEM`: Ponto de início da viagem;\n* `DESTINO`: Ponto de término da viagem;\n* `TITULO`: Título da mensagem;\n* `IGNORAR_ABAIXO_DE`: A mensagem não será enviada se o [indicativo do tempo de viagem](#indicativo-do-tempo-de-viagem) for abaixo do valor determinado. Exemplo: `1.25` para ignorar casos em que o trânsito está bom, ou seja, que seria enviado o 🟩.\n\n### Indicativo do tempo de viagem\n\nA API do Google retorna dois indicativos de tempo, o de viagem baseado na velocidade das vias e o de viagem baseado no trânsito atual. É feita a divisão do dos dois valores de tempo, obtendo-se o estado atual das vias.\n\n* 🟩 Para viagens em que o tempo é de até 25% acima do tempo sem trânsito;\n* 🟨 Caso seja entre 25% e 50%;\n* 🟧 Entre 50% e 75%;\n* 🟥 Acima de 75%.\n\n## GitHub Action\n\n\u003e Localizadas em *.github/workflows*\n\nAdicione um novo arquivo usando qualquer outro da mesma pasta como modelo e ajuste as variáveis abaixo:\n\n* `name` (linha 1): Nome da ação. Este valor será o título da mensagem;\n* `cron` (linha ~5): Ajuste do cronjob ([guia](https://crontab.guru/)). Horário em UTC;\n* `ORIGEM` (linha ~27): Origem da viagem. Este valor deve funcionar perfeitamente na busca do Google Maps;\n* `DESTINO` (linha ~28): Destino da viagem. Este valor também deve funcionar na busca.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielrf%2Ftrafficstatus2telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielrf%2Ftrafficstatus2telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielrf%2Ftrafficstatus2telegram/lists"}