16 Commits

Author SHA1 Message Date
KnugiHK
f920ca82b4 Refactor the logging facility a bit 2026-01-24 17:05:14 +08:00
KnugiHK
4eed3ca321 Refactor CLEAR_LINE in a more pythonic way
So it is easier for contributor to write a logging line for this project.
2026-01-24 16:48:07 +08:00
KnugiHK
5a80fe189d Add error handling to quoted-printable decoding
Wrapped the decode_quoted_printable function in a try-except block to handle decoding errors gracefully. If decoding fails, a warning is logged and the original value is returned, improving robustness when processing malformed vCard data.
2025-12-14 23:49:10 +08:00
KnugiHK
ddd0ac3143 Refactor vCard parsing to improve decoding and structure
Replaces regex-based vCard parsing with dedicated functions for parsing lines, handling quoted-printable encoding, and extracting fields. Adds support for CHARSET and ENCODING parameters, improves handling of multi-line and encoded values, and centralizes vCard entry processing for better maintainability and accuracy.
2025-12-14 23:00:48 +08:00
KnugiHK
43658a92c4 Replace print with logger in read_vcards_file
Changed the contact import message from a print statement to a logger.info call for better logging consistency.
2025-12-14 21:57:17 +08:00
tomballgithub
8c9c69a536 Print the number of imported vcards 2025-11-29 20:28:51 -06:00
tomballgithub
029700359e Fix vcard decoding errors 2025-11-29 19:34:27 -06:00
KnugiHK
beaf272a63 ignoreUnreadable line in vcard #173
This makes multi line entry in vcard being ignored.
2025-11-26 22:05:42 +08:00
KnugiHK
da4cea6230 Change how contacts are populated from vCards (fix #167)
Enrichment is now performed before message processing to ensure that all contacts are available, regardless of whether they exist in the ChatCollection.
2025-10-12 23:18:55 +08:00
Knugi
2b8af6a2fc Merge pull request #163 from jensb/fix-162-empty-chat-names
Update vcards_contacts.py to handle enrichment of empty chat names (#162)
2025-08-19 22:35:46 +08:00
jensb
f04205cb49 Update vcards_contacts.py to handle enrichment of empty chat names. Fixes #162. 2025-08-17 23:55:32 +02:00
KnugiHK
170a108109 Bug fix on incorrectly normalized number that starts with 0 2025-05-07 21:31:03 +08:00
KnugiHK
df67a549c0 Bug fix on empty contact list when using --enrich-from-vcards 2024-09-11 00:23:13 +08:00
KnugiHK
884ccc4cc0 Bug fix on vobject being a necessary dependency 2024-09-11 00:07:39 +08:00
KnugiHK
ea01a727cf Fixed the wrong boolean value 2024-07-13 18:33:33 +08:00
KnugiHK
0cf113561a Rename variable and files 2024-07-13 14:16:57 +08:00