Skip to content

theveloped/WhatsBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatsBook | WhatsApp chat parser for print using LaTeX

The idea of archiving your WhatsApp conversations in printed form seemed beautiful. I first came across this idea in a blog post by Pelle Beckman. The code below is my take on this beautiful idea.

WhatsBook a photo book styled chat archive

WhatsApp has a little know feature that allows one to export a certain chat to a parsable format. After extracting the resulting export has a single _chat.txt file that contains the entire chat conversation. Additionally the different attachments are present with a simple time stamp and numerical index.

chatExport.zip
  |--  _chat.txt
  |--  2017-04-13-PHOTO-00000001.jpg
  |--  2017-04-13-PHOTO-00000002.jpg
  |--  2017-04-13-AUDIO-00000003.aac
  |--  2017-04-13-AUDIO-00000004.opus
  |--  2017-04-13-VIDEO-00000005.mp4

Usage

To use the WhatsBook.py simply clone the repository and drag the extracted WhatsApp export to the main folder. One can then run the script as a simple oneliner given below or without any arguments to start the guided set-up.

git clone https://github.com/theveloped/WhatsBook.git
cd WhatsBook
python whatsBook.py exportDirectory > content.tex

I then used pdfLaTeX to render the output to pdf. If the output of the script was named content.tex as indicated above, one should be able to build whatsBook.tex without any changes.

Test

There is a tiny example chat to generate the test file that is indicated in the images. Running the script with the -c flag will create the wordclouds for the chapter pages (note this is an expensive process and I thus advise you to run in without while testing on large chats).

git clone https://github.com/theveloped/WhatsBook.git
cd WhatsBook
python whatsBook.py test > content.tex

After building using pdfLaTeX the result should look similar to this and the screenshots shown below:

Page 1 Page 2 Page 3

License

This script is released under MIT License.

About

WhatsApp chat parser for print using LaTeX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published