-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] Import contact names from exported google vcards and more #106
Conversation
Hi! Thanks for your contribution. I will make changes to the PR so that the commits look more Pythonic. |
Sure, feel free to edit/remove stuff |
The added code should be placed above any platform specific code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some changes. Please confirm if the features added are still working as expected.
Co-authored-by: Bnaya Peretz <me@bnaya.net>
I've pushed 13904ea I don't have merge permission |
LGTM. |
Hi, There is a simpler way to implement the filtering of empty chats (this commit), that only involves two lines of SQL code and no other changes to the code base. That is, no new functions would be required (e.g. is_chat_empty() not needed, _is_message_empty() etc), and no changes to the various functions (e.g. create_html() stays the same) and no need to change the way the json exporting works. It operates on the basis that chat.sort_timestamp is NULL if there is no chat content in a chat -- the exception seems to be broadcasts (which is easily dealt with). Specifically then, using the v0.10.0 code base, inside the messages() function at line 255 in android_handler.py, you have the SQL query:
I have tested this on my databases, and it filters out all the @lid chats, all phone numbers that have no chat content, etc. |
Hi! As we discussed in another issue, I've noticed that the |
Hey
first thank you very much for this utility!
I've made some modifications for my own use cases, that i think could be useful for more users.
I would like to receive preliminarily feedback before i finalize things, and write some docs about it.
I am not a python developer, so it's very possible i did thinks in a very not "python way"
Main features:
"--enrich-names-from-vcards"
I had the empty contact issue, and not over come it, i wrote an option to load exported vcards file exported from google contact.
I had to also add --default-country-code-for-enrich-names-from-vcards
But maybe there is a robust way to infer it?
More features:
--filter-empty
Will filter chats that are only system messages like the "chat is end to end encrypted"
In my case that but the number of chats from 16K to 2.6K
--avoidJSONEnsureAscii
see code--prettyPrintJson
I tried to be very carful to not make any breaking change