Visualize statistics from your Telegram chat dump!
- Python 100%
| tgplot | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
tgplot
tgplot is a small utility for plotting statistics from your Telegram chat dump.
Here are some example plots:
Word cloud |
Top of users by number of messages |
Number of messages per week day |
Number of messages per hour of the day |
Installing
Instal via pip:
pip install git+https://codeberg.org/arslee07/tgplot.git
Alternatively, you can install tgplot manually:
- Clone the repo:
git clone https://codeberg.org/arslee07/tgplot - Go to repository directory:
cd tgplot - Install via pip:
pip install .
Dumping a chat
-
Go to the chat, click on the title, click on the three dots and select "Export chat history":
-
Uncheck all media, set the size limit and select the export format "Machine-readable JSON":
-
Click "Export"
Usage
From tgplot --help:
usage: tgplot [-h] [--timezone TIMEZONE] [--language {ru,en}] [--normal-form] path
positional arguments:
path JSON dump file path
options:
-h, --help show this help message and exit
--timezone, --tz, -t TIMEZONE
Timezone identifier (e.g. Europe/Moscow)
--language, --lang, -l {ru,en}
Plots language
--normal-form, --norm, -n
Whether to normalize words for a word cloud
Example:
tgplot ./mydump.json --tz "Europe/Moscow" --lang ru
This will generate plots from mydump.json, with Moscow timezone and Russian labels.
Contributing
Contributions are welcome! Suggest new interesting statistics and plots (or make one by yourself!), fix some bugs, improve code readability.
License
tgplot is licensed under MIT license.





