pixel3rr0r / whatsapp_chat_dump

A small script for listing and exporting WhatsApp chats
MIT License
12 stars 2 forks source link

export to HTML including Media #1

Open zdavatz opened 4 years ago

zdavatz commented 4 years ago

I have a WhatsApp Dir, that would like to convert to either PDF or HTML, including all media.

At the moment I try:

I do not really need it to go into a mySQL DB. Just a HTML file is fine.

/tmp/corona> /home/zeno/.software/whatsapp_chat_dump/wad.py
/home/zeno/.software/whatsapp_chat_dump/wad.py: Zeile 22:                  _
                | |
 _ _ _ _____  __| |  ____  _   _
| | | (____ |/ _  | |  _ \| | | |
| | | / ___ ( (_| |_| |_| | |_| |
 \___/\_____|\____(_)  __/ \__  |
                    |_|   (____/

A small script for listing and exporting WhatsApp chat sessions.
Exporting group chats is not supported (yet).
The ChatStorage.sqlite must be in the same directory.

Usage:
    wad.py dump_chats [--cd | <output>] [--all | --custom <sid>...]
    wad.py sessions [(find (--name <name> | --number <number>))] [--sort]
    wad.py -h | --help

Examples:
    wad.py dump_chats --custom 7 11 420
    wad.py dump_chats C:/Users/pixel3rr0r/Documents/Exported: Datei oder Verzeichnis nicht gefunden
/home/zeno/.software/whatsapp_chat_dump/wad.py: Zeile 34: $'\r': Kommando nicht gefunden.
from: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
import: unable to open X server `' @ error/import.c/ImportImageCommand/359.
import: unable to open X server `' @ error/import.c/ImportImageCommand/359.
from: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
from: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
/home/zeno/.software/whatsapp_chat_dump/wad.py: Zeile 40: $'\r': Kommando nicht gefunden.
/home/zeno/.software/whatsapp_chat_dump/wad.py: Zeile 41: $'\r': Kommando nicht gefunden.
/home/zeno/.software/whatsapp_chat_dump/wad.py: Zeile 45: $'\r': Kommando nicht gefunden.
/home/zeno/.software/whatsapp_chat_dump/wad.py: Zeile 46: Syntaxfehler beim unerwarteten Wort `('
'home/zeno/.software/whatsapp_chat_dump/wad.py: Zeile 46: `def get_df(table):
pixel3rr0r commented 4 years ago

I'll be looking into it. For now, what type of file are you using the script on?

zdavatz commented 4 years ago

my WhatsApp Export Directory. Would be really great to show all the media files as well, including working Hyperlinks.

pixel3rr0r commented 4 years ago

Alright, I'm working on a rewrite, I'll get back to you, as soon as I have an update. What exactly do you mean with hyperlinks? Something like a main page with links to each chat?

zdavatz commented 4 years ago

If you look at my group chat, then the group chat contains many links, Videos, Youtube-URLs, images, Links to News-Paper articles. These links should all work and if possible the media should be embedded in the PDF.

pixel3rr0r commented 4 years ago

I see. I'll definitely add this, as this is something I wanted to implement as well. Apart from that, I'm working on other export formats like JSON etc. Apart from that, I still have to find a way to properly export group chats, since they are quite messed up.

zdavatz commented 4 years ago

why are Group-Chats messed up? The media Files are all exported. What is most important is, that the Hyperlinks work and the images show inline.

pixel3rr0r commented 4 years ago

What I mean, is that WhatsApp stores group chats in a way that is a bit harder to extract than DMs. Nevertheless I might have found a fix for it, which will be implemented along with the other feature requests.

zdavatz commented 4 years ago

this would be really great, as I have so far not found a functioning OpenSource Software that does a good job visualising exported WhatsApp Group chats.