• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

theveloped/WhatsBook: WhatsApp chat parser for print using LaTeX

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

theveloped/WhatsBook

开源软件地址(OpenSource Url):

https://github.com/theveloped/WhatsBook

开源编程语言(OpenSource Language):

TeX 81.7%

开源软件介绍(OpenSource Introduction):

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap