whatsapp-chat-parser-website icon indicating copy to clipboard operation
whatsapp-chat-parser-website copied to clipboard

Right-to-left languages, media limitations and fixed chat constants

Open reembar opened this issue 1 year ago • 3 comments

As I'm not a programmer, I'm not sure if I should post the issues here or on whatsapp-chat-parser itself. I wanted to use the program to display a single fixed chat on my website, and ran into the following issues:

  1. when Hebrew or Arabic text is mixed with English words, the text become garbled. This is because the parser can not handle right-to-left languages. It also does not align them to the right.
  2. I wanted to display my chat with the original full-sized images and not those reduced by whatsapp (or omitted altogether). I found that the parser does not recognize png images as media, can not handle large movies (as they are converted to base64 instead of being downloaded directly from the file) and does not understand different media syntax in the filename (if you want to give the images more descriptive names).
  3. I'm missing an option to have the chat's filename and parameters defined as fixed constants without user intervention.

Thank you for your great project!

reembar avatar Jul 23 '22 08:07 reembar

Hi @reembar,

Point number 2 and 3 apply to whatsapp-chat-parser-website so I'll address them here:

What you need seems to be some html that you can include in your own website right? And you want to have full control of the output.
For this I'm afraid that you will have to code it yourself, using the whatsapp-chat-parser library to generate the html that you need.

This project was initially just inteded to showcase an example usage of the library whatsapp-chat-parser, so your request is out of scope for it at the moment.

PS: about the png files not being recognized as media, that is very strange. Do they just not show up? Screenshots or a sample image would be helpful to understand the issue here. Thanks


Related: https://github.com/Pustur/whatsapp-chat-parser/issues/243

Pustur avatar Jul 23 '22 13:07 Pustur

Thanks for replying here and on whatsapp-chat-parser! When testing the example chat, the PNGs displayed fine - so I guess I did something wrong when editing the file before, and it's not the program's fault.

reembar avatar Jul 23 '22 14:07 reembar

Ok based on all the info gathered from the other linked issue here's the summary:

There is indeed a problem with the display of RTL languages. To address this I could look at the first character in the message to determine the alignment of the text.

Unfortunately this is still out of scope for this project, as I never intended it to be anything more than a fancy demo. So for now I'll mark this as an enhancement that could come in the future, but I have no plans to work on it for now.

I'll also add the label help wanted, in case anyone takes an interest. Feel free to contribute a solution :)

Pustur avatar Jul 25 '22 18:07 Pustur