Package: whatsapp-converter
whatsapp-converterIntroductionUse the whatsapp-converter to convert your exported WhatsApp chat to a CSV, XLS, XLSX or an ODS file.The conversion is done locally. No data is shared with the internet!The resultset is a CSV file which you can import into your favorite calculation application such as Excel or LibreOffice. You can also directly export to a spreadsheet file and do create a pivot table.DependenciesIf you want to install the dependencies manually, use pip. On some computers you might need to replace pip by pip3.pipinstalltqdmpyexcelpyexcel-xlsxwpyexcel-ods3xlwtUsageUse the following command on the command line to get an overview of the available arguments.pythonwhatsapp-converter.py-hConvert WhatsApp TXT to CSV (Default Use Case)The easy start is just to provide the filename of the exported WhatsApp chat. The application will process the chat and create a CSV file namedresultset.csv.pythonwhatsapp-converter.pywhatsapp-export.txtConvert WhatsApp to Excel XLS or XLSXIf you want to export to an Excel spreadsheet file instead, make sure to add the filename at the end, e.g.resultset.xls.pythonwhatsapp-converter.pywhatsapp-export.txtresultset.xlsorpythonwhatsapp-converter.pywhatsapp-export.txtresultset.xlsxConvert WhatsApp to LibreOffice ODSIf you want to export to a LibreOffice spreadsheet file, make sure to add the filename at the end, e.g.resultset.ods.
Please note that the export takes some time. The script did not crash.pythonwhatsapp-converter.pywhatsapp-export.txtresultset.odsHere is the list of all available options:whatsapp-converter.py[-h][-v][-d]filename[resultset.csv|resultset.xls]Commandline ArgumentsMandatory ArgumentsfilenameTheWhatsAppfilecontainingtheexportedchat
resultsetFilenameoftheresultset,defaultresultset.csv.Use.csvtowriteacommaseparatedfile.Use.xlstowritetoanExcelspreadsheetfileOptional Arguments-h,--helpshowthishelpmessageandexit-n--newlinecreateanewline(samedateandtime)intheresultsetforeverymultilinechatmessage-v,--verboseincreaseoutputverbosity-d,--debugincreaseoutputverbositytodebugExample Newline ArgumentConsider this chat exported chat message18.05.19,11:50:00:AlanSmith:Itstartshere
ThisisanewlineBy default the resultset will merge the two lines.2019-05-1811:50|2019-05-18|11:50|AlanSmith|ItstartshereThisisanewlineIf you start the application with the -n argument, a new line will be added and the date and time of the multiline message taken.2019-05-1811:50|2019-05-18|11:50|AlanSmith|Itstartshere2019-05-1811:50|2019-05-18|11:50|AlanSmith|ThisisanewlineConversion from toEach line of the dataset will be converted to structured data which can be imported into your Excel or LibreOffice sheet.21/8/19,11:28:51PM:JonDoe:Wasteoutofwealth😂21.12.16,23:29-AlanSmith:LikeaRolex30.11.18,10:57-NachrichtenindiesemChatsowieAnrufesindjetztmitEnde-zu-Ende-Verschlüsselunggeschützt.TippefürmehrInfos.30.11.18,10:57-Snoopy:Hallo:)30.11.18,10:58-Snoopy:JetztbinichgespanntaufdeineAntwort;)1/26/19,00:07-JonDoe:Sleepwell18.05.19,11:50:00:AlanSmith:Itstartshere
ThisisanewlineThe resultset file looks like this. In the default configuration new lines get the same date and time stamp and sender name as the previous line:DateandTime|Date|Time|Name|Message2019-8-2123:28|2019-8-21|23:28|JonDoe|Wasteoutofwealth😂2016-12-2123:29|2016-12-21|23:29|AlanSmith|LikeaRolex2018-11-3010:57|2018-11-30|10:57|Snoopy|Hallo:)2018-11-3010:58|2018-11-30|10:58|Snoopy|JetztbinichgespanntaufdeineAntwort;)2019-01-2600:07|2019-01-26|00:07|JonDoe|Sleepwell2019-05-1811:50|2019-05-18|11:50|AlanSmith|ItstartshereThisisanewline