Skip to content

Command line tool for analysing messages in a Telegram chat

License

Notifications You must be signed in to change notification settings

abstraction/telegram-analytics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Analytics

Command line tool for analysing messages in a Telegram chat. Originally implemented for analysing messages in the Full Stack Open 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. 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 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 <filename> where <filename> 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.

About

Command line tool for analysing messages in a Telegram chat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%