Parser to the What's App log file. Feel free to fork and modify :-)
A Whatsapp chat history file and an optional list of regular expression patterns.
python chat.py -f chat.txt -p WhatsApp -n "Nikolas Moya" -r [regex. patterns]
python chat.py -f chat.txt -p WhatsApp -n "Nikolas Moya" -r sleepy yes
--PROPORTIONS
total_messages -> 32773
total_words -> 172760
total_chars -> 899435
messages
Marilia Ferreira -> 16234
Nikolas Moya -> 16539
words
Nikolas Moya -> 72797
Marilia Ferreira -> 99963
chars
Nikolas Moya -> 379642
Marilia Ferreira -> 519793
--SHIFTS
morning -> 2581
afternoon -> 6593
evening -> 9736
latenight -> 13863
--WEEKDAY
Wednesday -> 4155
Thursday -> 4319
Monday -> 4638
Saturday -> 4650
Tuesday -> 4730
Friday -> 4874
Sunday -> 5407
--AVERAGE MESSAGE LENGTH
Nikolas Moya -> 4.40153576395
Marilia Ferreira -> 6.1576321301
--PATTERNS
sleepy
Nikolas Moya -> 10
Marilia Ferreira -> 5
yes
Nikolas Moya -> 98
Marilia Ferreira -> 87
--TOP 15 MOST USED WORDS (length >= 3)
não
amor
mais
hahaha
sim
muito
isso
amo
para
tudo
hahah
acho
agora
aqui
tava
./logs/Chat.txt.json