Commit Graph

93 Commits

Author SHA1 Message Date
KnugiHK
db01d05263 Refactor get_chat_condition to increase maintainability 2026-01-24 00:50:06 +08:00
KnugiHK
95a52231be Fix the returning string for empty filter list 2026-01-24 00:03:08 +08:00
KnugiHK
92c325294c Add preflight check to see if the jid_map table exists 2026-01-19 22:53:29 +08:00
KnugiHK
7dbd0dbe3c Add preflight check to see if transciption column exists 2026-01-19 22:46:30 +08:00
KnugiHK
ae7ba3da96 action_type 58 is actually shared with unblocking 2026-01-18 21:53:36 +08:00
KnugiHK
c05e76569b Add more chat type 2026-01-17 13:55:16 +08:00
KnugiHK
a6fe0d93b1 Rename the obj variable to json_obj in telegram_json_format 2026-01-17 13:54:56 +08:00
KnugiHK
064b923cfa Convert time unit for progress 2026-01-17 13:22:56 +08:00
KnugiHK
d200130335 Refactor to use tqdm for showing progress 2026-01-17 13:18:31 +08:00
KnugiHK
aef568b80b Merge branch 'main' into dev 2025-12-27 16:48:47 +08:00
Knugi
1d5bad92a7 Add new IV and DB entry to utility.py
Reported by @silasjelley
2025-11-07 13:13:14 +00:00
glemco
deebd6c87e Changes after code review 2025-06-29 10:49:01 +02:00
glemco
5ed260b0b7 Add support for telegram JSON file format
Add the --telegram command line argument that, combined with a JSON
output, generates a Telegram compatible JSON file [1].

The JSON is per-chat, so the --telegram argument implies the
--json-per-chat setting.

I took a few shortcuts:
* Contact and Ids are inferred from the chat id or phone numbers
* All text is marked as plain (e.g. no markup or different types)
* Only personal chats and private groups supported
* Private groups are defined if the chat has a name
* Various ids try to match the ones in WA but may require bulk edits

[1] - https://core.telegram.org/import-export

Fixes: https://github.com/KnugiHK/WhatsApp-Chat-Exporter/issues/152
2025-06-16 13:01:33 +02:00
KnugiHK
99213503c4 Fix on incorrect rejection by the regex of the size_str
String like '1. MB' should be accepted
2025-06-01 12:17:21 +08:00
KnugiHK
f89f53cf2d Fix test cases 2025-06-01 12:15:54 +08:00
KnugiHK
0ecfe6c59a Cast numeric string in readable_to_bytes 2025-06-01 12:15:15 +08:00
KnugiHK
706466f63b Enforce a tighter check on the input of size_str 2025-06-01 11:54:24 +08:00
KnugiHK
e408c31415 Fix: it is impossible to have 0.1 byte as byte is the smallest unit 2025-05-17 19:26:18 +08:00
KnugiHK
bbb558713f Replace sanitize_filename with safe_name 2025-05-17 18:24:30 +08:00
KnugiHK
ea6e72bf0b Bug fix on incorrectly striping decimal to integer 2025-05-17 17:46:51 +08:00
KnugiHK
d7ded16239 Reimplement the convert_time_unit function to make it more human-readable 2025-05-17 17:35:30 +08:00
KnugiHK
8c2868a60e Fix on missing return in get_status_location 2025-05-17 16:20:11 +08:00
KnugiHK
a53e5a2b3d Update type hint syntax for Python < 3.10 compatibility 2025-05-17 16:18:16 +08:00
KnugiHK
3f88f7fe08 Replacing slugify with a new function 2025-05-17 16:04:31 +08:00
KnugiHK
33149075d3 autopep8 2025-05-11 18:07:51 +08:00
KnugiHK
1eea5fc5c1 Use the new chat importing method from data_model
This commit also fixes #150
2025-05-11 17:29:24 +08:00
KnugiHK
fa41572753 Change print to logger for better logging in the future
This commit also added --debug and --no-banner options, which will enable debug level of logging and supress the default banner
2025-05-11 16:53:46 +08:00
fschuh
dad7666adb Updated to also use shutil for JSON file copying 2025-05-05 12:32:29 -04:00
KnugiHK
a58dd78be8 PEP8 2025-05-05 17:13:43 +08:00
KnugiHK
ed2ec7cb9e Exit if no json is found 2025-05-05 16:14:05 +08:00
KnugiHK
5a9944d14b Respects users' choices on the output JSON 2025-05-05 16:09:53 +08:00
KnugiHK
b8652fcb96 Throwaway variable 2025-05-05 15:22:00 +08:00
KnugiHK
ad267a7226 Quote all paths in output messages 2025-05-05 15:20:46 +08:00
KnugiHK
534aea924d Add docs 2025-05-05 15:20:14 +08:00
fschuh
d0fc620ba6 Added print statement with merging media folder names 2025-05-05 00:41:10 -04:00
fschuh
8d34300ea5 Merged JSON files are now only updated on disk if the contents have actually changed. 2025-05-04 22:55:42 -04:00
fschuh
1207b1e0cc Added support for incremental merging 2025-04-29 01:22:11 -04:00
KnugiHK
e287ccb724 Bug fix on None metadata #148 2025-04-26 17:59:10 +08:00
Knugi
9da1da402b Merge pull request #147 from NicksonYap/main
Add the fileID / SHA-1 for CallHistory.sqlite of WhatsApp for Business
2025-04-19 11:24:56 +08:00
Nickson Yap
7c7260893d Add the fileID / SHA-1 for CallHistory.sqlite of WhatsApp for Business 2025-04-18 03:02:10 +08:00
KnugiHK
4a0be0233c Bug fix on model change for Message 2025-03-02 11:25:01 +08:00
KnugiHK
4d04e51dda Refactor and add docstrings 2025-03-02 00:47:34 +08:00
KnugiHK
431dce7d24 Change package_url_json to a constant 2025-03-02 00:29:03 +08:00
KnugiHK
86cb44ced9 Add more docstrings 2025-03-02 00:28:47 +08:00
KnugiHK
272454c2ce Bug fix on missing _version_ variable, introduced in 0.11.0 2025-03-01 23:59:12 +08:00
KnugiHK
b2bcf36622 Move Android backup decryption to a standalone module 2025-02-26 21:20:11 +08:00
KnugiHK
dd75ec4b87 Implement backward navigation for splited files 2025-02-09 14:47:05 +08:00
KnugiHK
0b2dfa9aba Implement custom headline (#97) 2025-02-09 14:20:11 +08:00
KnugiHK
bf993c5302 Change the column to determine if the chat should be filtered (#112) 2025-02-09 12:47:35 +08:00
KnugiHK
23af55d645 Implement empty chat filtering from SQL #112
This commit also removed the old empty chat filtering logic.
2025-01-04 18:18:34 +08:00