Skip to content

Instantly share code, notes, and snippets.

@bamarch
bamarch / WhatsAppCleaner.py
Created January 14, 2017 14:13 — forked from keskarnitish/WhatsAppCleaner.py
Clean WhatsApp Generated Text File for Image Cloud Scripts
#Extremely simple script to cleanup the conversation data that WhatsApp generates
#You can email yourself the conversation from your WhatsApp mobile application, run this script and use any popular word cloud generator like http://www.wordle.net/create.
#TO DO: Include code to create wordcloud as well. Possibly https://github.com/atizo/PyTagCloud or https://github.com/amueller/word_cloud
#Usage: python WhatsAppCleaner.py Foo.txt
from sys import argv
script, filename = argv
f = open(filename,'r')
for line in f:
try: