Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaltsoon/telegram-analytics
Command line tool for analysing messages in a Telegram chat
https://github.com/kaltsoon/telegram-analytics
Last synced: about 1 month ago
JSON representation
Command line tool for analysing messages in a Telegram chat
- Host: GitHub
- URL: https://github.com/kaltsoon/telegram-analytics
- Owner: Kaltsoon
- License: mit
- Created: 2021-01-27T16:16:39.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-17T07:28:00.000Z (almost 4 years ago)
- Last Synced: 2023-04-06T05:12:20.509Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram Analytics
Command line tool for analysing messages in a Telegram chat. Originally implemented for analysing messages in the [Full Stack Open](https://fullstackopen.com/) course's Telegram channel.
## What does it do?
The tool works in two steps:
1. **Process messages**. This step reads the messages from a JSON file and extracts "tags" from the messages. Tag is anything with a category and text, for example `(keyword, algorithm)`. Tag extranction is handled by the [tag extractors](./src/tag_extractors). Once the tags have been extracted, messages and tags are saved into a SQLite database.
2. **Analyse messages**. This step analyses the messages. You can for example list most frequent tags in the messages.
## Requirements
[Poetry](https://python-poetry.org/) and Python version `>= 3.9`.
## How to use?
1. Install dependencies by running `poetry install`.
2. Export chat history as JSON from Telegram and store the JSON file into the `data` directory.
3. Process messages by running `poetry run python src/process.py --input-file ` where `` is the name of the export file in the `data` directory.
4. Analyse messages. Check available commands by running `poetry run python src/analyse.py --help`.