{"id":13611312,"url":"https://github.com/petrinm/tgstats","last_synced_at":"2025-04-13T04:33:52.678Z","repository":{"id":160297966,"uuid":"50500719","full_name":"petrinm/tgstats","owner":"petrinm","description":"Telegram Channel Statistic Generator","archived":false,"fork":false,"pushed_at":"2017-02-23T12:01:15.000Z","size":13,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-01T19:57:14.322Z","etag":null,"topics":["stats","telegram","telegram-cli"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petrinm.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,"roadmap":null,"authors":null}},"created_at":"2016-01-27T10:45:19.000Z","updated_at":"2022-12-06T04:33:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"f50b97bb-9c59-4498-8451-4c86e5e9e250","html_url":"https://github.com/petrinm/tgstats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrinm%2Ftgstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrinm%2Ftgstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrinm%2Ftgstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrinm%2Ftgstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petrinm","download_url":"https://codeload.github.com/petrinm/tgstats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223568170,"owners_count":17166612,"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":["stats","telegram","telegram-cli"],"created_at":"2024-08-01T19:01:54.067Z","updated_at":"2024-11-07T18:30:17.395Z","avatar_url":"https://github.com/petrinm.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\n\nTelegram Channel Statistic Generator\n===\n\nSimple Python script to dump Telegram logs and generate html/png statistics.\n\nDependencies\n---\n* Python3\n* Telegram-cli https://github.com/vysheng/tg/\n* Matplotlib http://matplotlib.org/\n* pytg https://github.com/luckydonald/pytg/\n\n\n\nGetting started\n---\n\n0) Dependencies libevent-dev, libssl-dev... (TODO)\n\n1) Download and compile telegram-cli. Use the test branch!\n```\ngit clone --recursive -b test https://github.com/vysheng/tg.git tg-test \u0026\u0026 cd tg-test\n./configure --disable-liblua\nmake\n```\n\n1½) Install Python dependencies.. etc\n```\nsudo apt-get install python3-matplotlib \npip3 install pytg\netc...\n```\n\n2) Start the client with JSON support (Do the registration!)\n```\n./bin/telegram-cli --json -P 4458\n```\n\n3) Dump dialogs to find correct id for the channel. Copy the id!\n```\n$ ./dump.py --dialogs\n```\n\n4) Start dumping messages.\n\nIf the dump script is terminated it stores it's current offset to \"name_offset\"\nfile and the script tries always to continue from the last position.\nRemove the offset file when you need to start from the beginning or use\n\nNote: When executed the first time initdb is required.\n\n```\n$ ./dump.py test --initdb --id \u003cyour id\u003e\n```\nKill the script with CTRL+C when it starts to complain about empty responses.\n\n\n5) To update or continue dumping without reseting request index\n```\n$ ./dump.py test [--continue]\n```\nKill the scripts with CTRL+C after message id collisions start to occur.\n\n\n6) Generate stats\n```\n$ ./generate.py test\n```\n\n7) View stats at \"test\" folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrinm%2Ftgstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetrinm%2Ftgstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrinm%2Ftgstats/lists"}