Use whatsapp-converter to convert your exported WhatsApp chat to a CSV or XLS (Excel spreadsheet) file.
Project description
whatsapp-converter
Introduction
Use 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.
Dependencies
If you want to install the dependencies manually, use pip. On some computers you might need to replace pip by pip3.
pip install tqdm pyexcel pyexcel-xlsxw pyexcel-ods3 xlwt
Usage
Use the following command on the command line to get an overview of the available arguments.
python whatsapp-converter.py -h
Convert 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 named resultset.csv.
python whatsapp-converter.py whatsapp-export.txt
Convert WhatsApp to Excel XLS or XLSX
If you want to export to an Excel spreadsheet file instead, make sure to add the filename at the end, e.g. resultset.xls.
python whatsapp-converter.py whatsapp-export.txt resultset.xls
or
python whatsapp-converter.py whatsapp-export.txt resultset.xlsx
Convert WhatsApp to LibreOffice ODS
If 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.
python whatsapp-converter.py whatsapp-export.txt resultset.ods
Here is the list of all available options:
whatsapp-converter.py [-h] [-v] [-d] filename [resultset.csv|resultset.xls]
Commandline Arguments
Mandatory Arguments
filename The WhatsApp file containing the exported chat
resultset Filename of the resultset, default resultset.csv. Use .csv to write a comma separated file. Use .xls to write to an Excel spreadsheet file
Optional Arguments
-h, --help show this help message and exit
-n --newline create a new line (same date and time) in the resultset for every multiline chat message
-v, --verbose increase output verbosity
-d, --debug increase output verbosity to debug
Example Newline Argument
Consider this chat exported chat message
18.05.19, 11:50:00: Alan Smith: It starts here
This is a new line
By default the resultset will merge the two lines.
2019-05-18 11:50|2019-05-18|11:50|Alan Smith|It starts here This is a new line
If 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-18 11:50|2019-05-18|11:50|Alan Smith|It starts here
2019-05-18 11:50|2019-05-18|11:50|Alan Smith|This is a new line
Conversion from to
Each 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:51 PM: Jon Doe: Waste out of wealth 😂
21.12.16, 23:29 - Alan Smith: Like a Rolex
30.11.18, 10:57 - Nachrichten in diesem Chat sowie Anrufe sind jetzt mit Ende-zu-Ende-Verschlüsselung geschützt. Tippe für mehr Infos.
30.11.18, 10:57 - Snoopy: Hallo :)
30.11.18, 10:58 - Snoopy: Jetzt bin ich gespannt auf deine Antwort ;)
1/26/19, 00:07 - Jon Doe: Sleep well
18.05.19, 11:50:00: Alan Smith: It starts here
This is a new line
The 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:
Date and Time|Date|Time|Name|Message
2019-8-21 23:28|2019-8-21|23:28|Jon Doe|Waste out of wealth 😂
2016-12-21 23:29|2016-12-21|23:29|Alan Smith|Like a Rolex
2018-11-30 10:57|2018-11-30|10:57|Snoopy|Hallo :)
2018-11-30 10:58|2018-11-30|10:58|Snoopy|Jetzt bin ich gespannt auf deine Antwort ;)
2019-01-26 00:07|2019-01-26|00:07|Jon Doe|Sleep well
2019-05-18 11:50|2019-05-18|11:50|Alan Smith|It starts here This is a new line
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file whatsapp-converter-0.6.4.tar.gz
.
File metadata
- Download URL: whatsapp-converter-0.6.4.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35ecb2c56faae0d4164b7cbdaddbbcaecba07606ce1a0da0f7455ce405fff196 |
|
MD5 | d6a16b7aec9568f524686c77023ffeb2 |
|
BLAKE2b-256 | 1401a390aaf02bceeef8e02989cd6c655ba73211a4d4bd99db78c3edd109d4cd |
File details
Details for the file whatsapp_converter-0.6.4-py3-none-any.whl
.
File metadata
- Download URL: whatsapp_converter-0.6.4-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 074e87aa5abfdbc616091771a83045ce5e51d2dce4ba47c466992f1816f3b1f3 |
|
MD5 | 4072209b3811908834cf524b074e3889 |
|
BLAKE2b-256 | d275d2e6ce61c01abbe170fcfffcbfb928c3487efadd19ca12570f4079b62049 |