Package: tgnize
tgnizeHow about another exported Telegram Chat analyzer ? :wink:nomenclatureTelegram +( Chat )Analyze = tgnizemotivationI'm always interested in learning more about data, which is why I thought about taking a deeper look into Telegram Chats( mostly groups ), I participate in.I exported chat data( excluding audios, videos and images etc. ), ofDevs Chatgroup, using Telegram Desktop Client, which are nothing but some HTML, CSS & JS filesI created an object model, into which I populated parsed Chat data, so that I can manipulate it wellThen I started plotting animated charts & much more( a lot of work remaining though ), to depict how participants contributed to chatIt also lets me understand my chat activity pattern(s) i.e. in which hour of the day I'm mostly active / inactive in ChatOr how another peer is spending their time is ChatWhat's mostly used words / mostly used bots / mostly used Emoji etc. in ChatcautionThis project doesn't expect you to use any exported Chat for manipulating any participant or use extracted data( sleep patterns, daily activity pattern of participants )for doing some harmful activity to any participant.If users use it for malicious purpose(s), it's not author's responsibility !!!I suggest you not to use it for manipulating someone else. Thank you for understanding :wink:data sourceHere I'm usingDevs Chat's, exported Chat data set for testing these scripts. So all plots ( to be :wink: ) generated, present in this repository, are result of application of scripts onDevs Chat's exported Chat data.Template data set is presenthere. It holds all messages ofDevs Chatupto03/11/2019from initialization of group.For respecting privacy of all users, I'm removing that data source from this public repo. Export chat data for your own need.exporting chatFor exporting chat data forDevs Chatgroup of Telegram, I used Official Telegram Desktop Client. Exporting was done, while only including text messages( no images, videos or audios ), which are nothing but a bunch of HTML files.If you want to run these scripts on your machine, make sure you've Telegram Desktop Client installed.$sudosnapinstalltelegram-desktop# run on your linux terminalLog into your account and choose which chat to export. Well this expoting procedure can take some time, depending upon age & activeness of Chat.usageDownload this zip fromhereUnzip it into a suitable directory on your machineGet intotgnizedirectory$cdtgnize
$tree-h
.
├──[4.2K]app.py
├──[4.0K]docs
│└──[1.8K]minuteBasedAccumulatedTraffic.md
├──[227]install
├──[1.0K]LICENSE
├──[4.0K]model
│├──[245]activity.py
│├──[9.8K]chat.py
│├──[332]event.py
│├──[100]__init__.py
│├──[1.3K]message.py
│├──[515]plotDataRange.py
│└──[1.1K]user.py
├──[4.0K]plotting_scripts
│├──[100]__init__.py
│├──[169]messageCount.py
│└──[11K]minuteBasedAccumulatedTraffic.py
├──[2.7K]README.md
├──[56]requirements.txt
├──[47]tgnize
└──[4.4K]util.py3directories,18filesMake sure you'vepython3-pipinstalled, which will be required for installing python modules ( i.e. beautifulsoup4, matplotlib etc. )Runinstallscript ( BASH script ), which will download all required dependencies into your machine$./installFor generating animated plots, you'll need to haveimagemagickinstalled on your machine. Install it using your system package manager.$sudoapt-getinstallimagemagick# for debian based distros$sudodnfinstallimagemagick# for fedoraNow you need to add installation path oftgnize, into yourPATHvariable$pwd# copy itIf you're on BASH, find.bashrcunder your home directory, if not found create a file with that nameAdd follwing line at end of that file, while replacingpaste-heresection with installation path oftgnizeexportPATH="$PATH:paste-here"Now close this terminal window & open a new oneYou'll havetgnize, executable BASH script present under downloaded zip, on your path. Simply invoketgnizedirectly, to be sure things are working as they're supposed to be$cd# get to home directory$tgnize[+]tgnizev0.1.0-HowaboutanotherTelegramChatAnalyzer?$tgnize`path-to-exported-chat-dir``path-to-sink-dir`[+]Author:AnjanRoy<anjanroy@yandex.com>[+]Source:https://github.com/itzmeanjan/tgnize(MITLicensed)[!]Error:ImproperInvocationof`tgnize`It's asking you to properly invoke script, by giving source directory( holding exported telegram chat, of a single Chat, may be a lot of files in case of large Chats )& sink directory( will hold generated plots / charts )If you've already exported some Telegram chat, consider invoking this script, to understand how you spent your time in ChatprogressThis project is in its infancy, a lot of features to be added. If you've something in your mind, don't hesitate to create an issue or make a PRDepiction of Accumulated Chat Traffic( for whole Chat along with top'X'chat participants )with minute level detailsTop'X'Active Chat Participant(s) Over TimeContribution of Chat Participants to ChatOverall Activity of Chat( for a specified period of time )Emoji AnalysisText AnalysisGot some new idea ? Make a PR:wink:Work in Progress-coming with more details soon