KnugiHK / WhatsApp-Chat-Exporter

A customizable Android and iOS/iPadOS WhatsApp database parser that will give you the history of your WhatsApp conversations in HTML and JSON. Android Backup Crypt12, Crypt14, Crypt15, and new schema supported.
https://wts.knugi.dev/
MIT License
521 stars 76 forks source link

Fixed JSON export #26

Closed GoComputing closed 1 year ago

GoComputing commented 1 year ago

Added serialization to the classes 'ChatStore' and 'Messages' so that they can be JSON serialized.

velecto1 commented 1 year ago

Hey, how can I try this, please?

I've just noticed this pull request after making the issue https://github.com/KnugiHK/Whatsapp-Chat-Exporter/issues/37.

I've already put your new lines into my repository and I've run sudo pip install '.[android_backup]' but I am still getting the same error message when running wtsexporter :(

GoComputing commented 1 year ago

Hello Tomáš,

When cloning my fork (where the updates are done, https://github.com/GoComputing/Whatsapp-Chat-Exporter), change the the 'dev' branch. After that, execute the command (change the paths when needed)

wtsexporter -a -w ../Decrypted/wa.db -o HTML -j -d ../Decrypted/msgstore.db

Hope it helps.

Regards, Carlos.

On Fri, Mar 24, 2023 at 4:59 PM Tomáš Velecký @.***> wrote:

Hey, how can I try this, please?

I've just noticed this pull request after making the issue #37 https://github.com/KnugiHK/Whatsapp-Chat-Exporter/issues/37.

I've already put your new lines into my repository and I've run sudo pip install '.[android_backup]' but I am still getting the same error message when running wtsexporter :(

— Reply to this email directly, view it on GitHub https://github.com/KnugiHK/Whatsapp-Chat-Exporter/pull/26#issuecomment-1483042436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKTHN5UT2ZZGPRNTS4SKCTW5XAF5ANCNFSM6AAAAAAUJZ7HY4 . You are receiving this because you authored the thread.Message ID: @.***>

velecto1 commented 1 year ago

Thank you, Carlos. Apparently, I was installing the original code GitHub repository as I left its URL i setup.py.

KnugiHK commented 1 year ago

I've checked that the bugfix works; thank you, Carlos!

I don't really understand the purpose of commenting out create_html(...) on line 187 in __main__.py, but everything seems to work, including the creation of HTML files.

You mean even if create_html() is commented, the creation of HTML files still works?

GoComputing commented 1 year ago

I am so sorry, I shouldn't. I did when testing, and I forgot to remove it. How can I make it correct? Should I create a new pull request?

On Fri, Mar 24, 2023, 7:27 PM Knugi @.***> wrote:

@.**** commented on this pull request.

In Whatsapp_Chat_Exporter/main.py https://github.com/KnugiHK/Whatsapp-Chat-Exporter/pull/26#discussion_r1147929984 :

@@ -184,7 +184,7 @@ def main(): messages(db, data) media(db, data, options.media) vcard(db, data)

  • create_html(data, options.output, options.template, options.embedded)
  • create_html(data, options.output, options.template, options.embedded)

Should this be uncommented?

— Reply to this email directly, view it on GitHub https://github.com/KnugiHK/Whatsapp-Chat-Exporter/pull/26#pullrequestreview-1357237070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKTHN67TYEY2BYKN3JTO6DW5XRQBANCNFSM6AAAAAAUJZ7HY4 . You are receiving this because you authored the thread.Message ID: @.***>

KnugiHK commented 1 year ago

I am so sorry, I shouldn't. I did when testing, and I forgot to remove it. How can I make it correct? Should I create a new pull request?

I am not really sure, but I requested change and maybe you can uncomment it in your branch and maybe the new commit will be reflected in this pull?

GoComputing commented 1 year ago

I am so sorry, I shouldn't. I did when testing, and I forgot to remove it. How can I make it correct? Should I create a new pull request?

I am not really sure, but I requested change and maybe you can uncomment it in your branch and maybe the new commit will be reflected in this pull?

I uncommented the line and pushed. Now it is visible in the fix. Hope this is it.

KnugiHK commented 1 year ago

I also added a check before serialize the latest data model, so that the it is compatible with old model.