chat-export 0.9.2__tar.gz → 0.9.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chat-export
3
- Version: 0.9.2
3
+ Version: 0.9.3
4
4
  Summary: Convert WhatsApp chat exports to HTML format
5
5
  Author-email: matlon GmbH <software@matlon.ch>
6
6
  License: MIT License
@@ -60,7 +60,7 @@ Dynamic: license-file
60
60
  This tool converts a WhatsApp chat export into two HTML formats: one with inline media (such as images, videos, and audio files) and a compact version with media links.
61
61
 
62
62
 
63
- Video Tutorial (still refers to the previously used tool name instead of `chat-export`):
63
+ Video Tutorial (still refers to the previously used tool name instead of `chat-export`, doesn't cover new features like the non-interactive CLI mode yet):
64
64
  [![YouTube](https://img.youtube.com/vi/s1dMO8pjkC8/0.jpg)](https://www.youtube.com/watch?v=s1dMO8pjkC8)"
65
65
 
66
66
  ## Binary Release Downloads
@@ -101,7 +101,28 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
101
101
 
102
102
  3. **Install and Run the Tool:**
103
103
 
104
- **Option 1: Install via pip (Recommended)**
104
+ ### Option 1: Download Binary Executables: Easy for non-technical users
105
+
106
+ If you don't know what Python is and just want to use the tool without having to deal with technical details, you can download the binary executables.
107
+
108
+ - For Windows, download [chat-export.exe](https://github.com/mtln/chat-export/releases/latest/download/chat-export.exe).
109
+
110
+ Because the .exe is unsigned, you will see a warning, but after clicking on "More Information" you should have the option to run it anyway. An EV code signing certificate for Windows costs a lot. If I get enough donations, I will buy one, so I can release signed exe files.
111
+
112
+ - For Mac, download [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
113
+
114
+ Once installed on Mac:
115
+
116
+ 1. Open the **Terminal** app (e.g. by typing "terminal" in Spotlight Search).
117
+ 2. Type: `chat-export`
118
+
119
+ This will start the chat export tool from anywhere in the terminal.
120
+
121
+ To uninstall `chat-export` from Mac, open the Terminal and run: `sudo rm /usr/local/bin/chat-export`
122
+
123
+ The executables have been built with pyinstaller.
124
+
125
+ ### Option 2: Install via pip
105
126
 
106
127
  If you have Python installed, you can install chat-export as a command-line tool:
107
128
  ```
@@ -122,43 +143,57 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
122
143
  pip install chat-export[windows]
123
144
  ```
124
145
 
125
-
126
-
146
+
127
147
  *Note: Without these optional dependencies, the tool will fall back to command-line input for file selection or use tkinter (if available) for file dialogs. If you're planning to use the tool in non-interactive mode, you don't need to install these dependencies.*
128
148
 
129
149
  After installation, you can run it from anywhere in your terminal:
130
-
150
+
131
151
  ```
132
152
  chat-export
153
+ ```
154
+
155
+ or
156
+ ```
133
157
  chat-export --help
134
158
  ```
135
-
159
+
136
160
  To uninstall:
137
161
  ```
138
162
  pip uninstall chat-export
139
163
  ```
140
164
 
141
- **Option 2: Download Binary Executables**
142
-
143
- - For Windows, download [chat-export.exe](https://github.com/mtln/chat-export/releases/latest/download/chat-export.exe).
144
-
145
- Because the .exe is unsigned, you will see a warning, but after clicking on "More Information" you should have the option to run it anyway. An EV code signing certificate for Windows costs a lot. If I get enough donations, I will buy one, so I can release signed exe files.
165
+ #### Using uv tool instead of pip
166
+ If you have uv installed, you can use `uv tool install` instead of `pip install`. This is perfect for tools like chat-export because it will install the dependencies in a virtual environment and not in the global environment - while still making the tool available globally in your shell / path.
146
167
 
147
- - For Mac, download [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
168
+ ```
169
+ uv tool install chat-export[windows]
170
+ or
171
+ uv tool install chat-export[macos]
172
+ or just
173
+ uv tool install chat-export
174
+
175
+ uninstall with:
176
+ uv tool uninstall chat-export
177
+ ```
148
178
 
149
- Once installed on Mac:
150
- 1. Open the **Terminal** app (e.g. by typing "terminal" in Spotlight Search).
151
- 2. Type: `chat-export`
152
-
153
- This will start the chat export tool from anywhere in the terminal.
179
+ ```
154
180
 
155
- To uninstall `chat-export` from Mac, open the Terminal and run: `sudo rm /usr/local/bin/chat-export`
181
+ #### Using uv tool instead of pip
182
+ If you have uv installed, you can use `uv tool install` instead of `pip install`. This is perfect for tools like chat-export because it will install the dependencies in a virtual environment and not in the global environment - while still making the tool available globally in your shell / path.
156
183
 
157
- The executables have been built with pyinstaller.
184
+
185
+ `uv tool install chat-export[windows]`
186
+ or
187
+ `uv tool install chat-export[macos]`
188
+ or just
189
+ `uv tool install chat-export`
190
+ uninstall with:
191
+ `uv tool uninstall chat-export`
192
+
158
193
 
159
- **Option 3: Run Directly (No Installation)**
194
+ ###Option 3: Run Directly (No Installation)
160
195
 
161
- If Python is installed on your Windows, Mac or Linux computer, run the tool directly (no installation required) with the following command:
196
+ If Python is installed on your Windows, Mac or Linux computer, run the tool directly (no pip installation required, no venv required, no additional dependencies required because it's just vanilla standard lib Python in a single scriptfile, always run the latest up to date version directly from GitHub) with the following command:
162
197
  ```
163
198
  python -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
164
199
  ```
@@ -167,11 +202,14 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
167
202
  python3 -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
168
203
  ```
169
204
 
170
- **Usage**
205
+ ## Usage
171
206
 
172
207
  The tool supports both interactive and non-interactive modes:
173
208
 
174
209
  ### Interactive Mode (Default)
210
+
211
+ Just run `chat-export` in your terminal.
212
+
175
213
  **CLI Parameters:**
176
214
 
177
215
  `-o, --output-dir`: Base directory where the chat folder will be created (optional, default: current directory)
@@ -3,7 +3,7 @@
3
3
  This tool converts a WhatsApp chat export into two HTML formats: one with inline media (such as images, videos, and audio files) and a compact version with media links.
4
4
 
5
5
 
6
- Video Tutorial (still refers to the previously used tool name instead of `chat-export`):
6
+ Video Tutorial (still refers to the previously used tool name instead of `chat-export`, doesn't cover new features like the non-interactive CLI mode yet):
7
7
  [![YouTube](https://img.youtube.com/vi/s1dMO8pjkC8/0.jpg)](https://www.youtube.com/watch?v=s1dMO8pjkC8)"
8
8
 
9
9
  ## Binary Release Downloads
@@ -44,7 +44,28 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
44
44
 
45
45
  3. **Install and Run the Tool:**
46
46
 
47
- **Option 1: Install via pip (Recommended)**
47
+ ### Option 1: Download Binary Executables: Easy for non-technical users
48
+
49
+ If you don't know what Python is and just want to use the tool without having to deal with technical details, you can download the binary executables.
50
+
51
+ - For Windows, download [chat-export.exe](https://github.com/mtln/chat-export/releases/latest/download/chat-export.exe).
52
+
53
+ Because the .exe is unsigned, you will see a warning, but after clicking on "More Information" you should have the option to run it anyway. An EV code signing certificate for Windows costs a lot. If I get enough donations, I will buy one, so I can release signed exe files.
54
+
55
+ - For Mac, download [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
56
+
57
+ Once installed on Mac:
58
+
59
+ 1. Open the **Terminal** app (e.g. by typing "terminal" in Spotlight Search).
60
+ 2. Type: `chat-export`
61
+
62
+ This will start the chat export tool from anywhere in the terminal.
63
+
64
+ To uninstall `chat-export` from Mac, open the Terminal and run: `sudo rm /usr/local/bin/chat-export`
65
+
66
+ The executables have been built with pyinstaller.
67
+
68
+ ### Option 2: Install via pip
48
69
 
49
70
  If you have Python installed, you can install chat-export as a command-line tool:
50
71
  ```
@@ -65,43 +86,57 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
65
86
  pip install chat-export[windows]
66
87
  ```
67
88
 
68
-
69
-
89
+
70
90
  *Note: Without these optional dependencies, the tool will fall back to command-line input for file selection or use tkinter (if available) for file dialogs. If you're planning to use the tool in non-interactive mode, you don't need to install these dependencies.*
71
91
 
72
92
  After installation, you can run it from anywhere in your terminal:
73
-
93
+
74
94
  ```
75
95
  chat-export
96
+ ```
97
+
98
+ or
99
+ ```
76
100
  chat-export --help
77
101
  ```
78
-
102
+
79
103
  To uninstall:
80
104
  ```
81
105
  pip uninstall chat-export
82
106
  ```
83
107
 
84
- **Option 2: Download Binary Executables**
85
-
86
- - For Windows, download [chat-export.exe](https://github.com/mtln/chat-export/releases/latest/download/chat-export.exe).
87
-
88
- Because the .exe is unsigned, you will see a warning, but after clicking on "More Information" you should have the option to run it anyway. An EV code signing certificate for Windows costs a lot. If I get enough donations, I will buy one, so I can release signed exe files.
108
+ #### Using uv tool instead of pip
109
+ If you have uv installed, you can use `uv tool install` instead of `pip install`. This is perfect for tools like chat-export because it will install the dependencies in a virtual environment and not in the global environment - while still making the tool available globally in your shell / path.
89
110
 
90
- - For Mac, download [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
111
+ ```
112
+ uv tool install chat-export[windows]
113
+ or
114
+ uv tool install chat-export[macos]
115
+ or just
116
+ uv tool install chat-export
117
+
118
+ uninstall with:
119
+ uv tool uninstall chat-export
120
+ ```
91
121
 
92
- Once installed on Mac:
93
- 1. Open the **Terminal** app (e.g. by typing "terminal" in Spotlight Search).
94
- 2. Type: `chat-export`
95
-
96
- This will start the chat export tool from anywhere in the terminal.
122
+ ```
97
123
 
98
- To uninstall `chat-export` from Mac, open the Terminal and run: `sudo rm /usr/local/bin/chat-export`
124
+ #### Using uv tool instead of pip
125
+ If you have uv installed, you can use `uv tool install` instead of `pip install`. This is perfect for tools like chat-export because it will install the dependencies in a virtual environment and not in the global environment - while still making the tool available globally in your shell / path.
99
126
 
100
- The executables have been built with pyinstaller.
127
+
128
+ `uv tool install chat-export[windows]`
129
+ or
130
+ `uv tool install chat-export[macos]`
131
+ or just
132
+ `uv tool install chat-export`
133
+ uninstall with:
134
+ `uv tool uninstall chat-export`
135
+
101
136
 
102
- **Option 3: Run Directly (No Installation)**
137
+ ###Option 3: Run Directly (No Installation)
103
138
 
104
- If Python is installed on your Windows, Mac or Linux computer, run the tool directly (no installation required) with the following command:
139
+ If Python is installed on your Windows, Mac or Linux computer, run the tool directly (no pip installation required, no venv required, no additional dependencies required because it's just vanilla standard lib Python in a single scriptfile, always run the latest up to date version directly from GitHub) with the following command:
105
140
  ```
106
141
  python -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
107
142
  ```
@@ -110,11 +145,14 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
110
145
  python3 -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
111
146
  ```
112
147
 
113
- **Usage**
148
+ ## Usage
114
149
 
115
150
  The tool supports both interactive and non-interactive modes:
116
151
 
117
152
  ### Interactive Mode (Default)
153
+
154
+ Just run `chat-export` in your terminal.
155
+
118
156
  **CLI Parameters:**
119
157
 
120
158
  `-o, --output-dir`: Base directory where the chat folder will be created (optional, default: current directory)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chat-export
3
- Version: 0.9.2
3
+ Version: 0.9.3
4
4
  Summary: Convert WhatsApp chat exports to HTML format
5
5
  Author-email: matlon GmbH <software@matlon.ch>
6
6
  License: MIT License
@@ -60,7 +60,7 @@ Dynamic: license-file
60
60
  This tool converts a WhatsApp chat export into two HTML formats: one with inline media (such as images, videos, and audio files) and a compact version with media links.
61
61
 
62
62
 
63
- Video Tutorial (still refers to the previously used tool name instead of `chat-export`):
63
+ Video Tutorial (still refers to the previously used tool name instead of `chat-export`, doesn't cover new features like the non-interactive CLI mode yet):
64
64
  [![YouTube](https://img.youtube.com/vi/s1dMO8pjkC8/0.jpg)](https://www.youtube.com/watch?v=s1dMO8pjkC8)"
65
65
 
66
66
  ## Binary Release Downloads
@@ -101,7 +101,28 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
101
101
 
102
102
  3. **Install and Run the Tool:**
103
103
 
104
- **Option 1: Install via pip (Recommended)**
104
+ ### Option 1: Download Binary Executables: Easy for non-technical users
105
+
106
+ If you don't know what Python is and just want to use the tool without having to deal with technical details, you can download the binary executables.
107
+
108
+ - For Windows, download [chat-export.exe](https://github.com/mtln/chat-export/releases/latest/download/chat-export.exe).
109
+
110
+ Because the .exe is unsigned, you will see a warning, but after clicking on "More Information" you should have the option to run it anyway. An EV code signing certificate for Windows costs a lot. If I get enough donations, I will buy one, so I can release signed exe files.
111
+
112
+ - For Mac, download [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
113
+
114
+ Once installed on Mac:
115
+
116
+ 1. Open the **Terminal** app (e.g. by typing "terminal" in Spotlight Search).
117
+ 2. Type: `chat-export`
118
+
119
+ This will start the chat export tool from anywhere in the terminal.
120
+
121
+ To uninstall `chat-export` from Mac, open the Terminal and run: `sudo rm /usr/local/bin/chat-export`
122
+
123
+ The executables have been built with pyinstaller.
124
+
125
+ ### Option 2: Install via pip
105
126
 
106
127
  If you have Python installed, you can install chat-export as a command-line tool:
107
128
  ```
@@ -122,43 +143,57 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
122
143
  pip install chat-export[windows]
123
144
  ```
124
145
 
125
-
126
-
146
+
127
147
  *Note: Without these optional dependencies, the tool will fall back to command-line input for file selection or use tkinter (if available) for file dialogs. If you're planning to use the tool in non-interactive mode, you don't need to install these dependencies.*
128
148
 
129
149
  After installation, you can run it from anywhere in your terminal:
130
-
150
+
131
151
  ```
132
152
  chat-export
153
+ ```
154
+
155
+ or
156
+ ```
133
157
  chat-export --help
134
158
  ```
135
-
159
+
136
160
  To uninstall:
137
161
  ```
138
162
  pip uninstall chat-export
139
163
  ```
140
164
 
141
- **Option 2: Download Binary Executables**
142
-
143
- - For Windows, download [chat-export.exe](https://github.com/mtln/chat-export/releases/latest/download/chat-export.exe).
144
-
145
- Because the .exe is unsigned, you will see a warning, but after clicking on "More Information" you should have the option to run it anyway. An EV code signing certificate for Windows costs a lot. If I get enough donations, I will buy one, so I can release signed exe files.
165
+ #### Using uv tool instead of pip
166
+ If you have uv installed, you can use `uv tool install` instead of `pip install`. This is perfect for tools like chat-export because it will install the dependencies in a virtual environment and not in the global environment - while still making the tool available globally in your shell / path.
146
167
 
147
- - For Mac, download [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
168
+ ```
169
+ uv tool install chat-export[windows]
170
+ or
171
+ uv tool install chat-export[macos]
172
+ or just
173
+ uv tool install chat-export
174
+
175
+ uninstall with:
176
+ uv tool uninstall chat-export
177
+ ```
148
178
 
149
- Once installed on Mac:
150
- 1. Open the **Terminal** app (e.g. by typing "terminal" in Spotlight Search).
151
- 2. Type: `chat-export`
152
-
153
- This will start the chat export tool from anywhere in the terminal.
179
+ ```
154
180
 
155
- To uninstall `chat-export` from Mac, open the Terminal and run: `sudo rm /usr/local/bin/chat-export`
181
+ #### Using uv tool instead of pip
182
+ If you have uv installed, you can use `uv tool install` instead of `pip install`. This is perfect for tools like chat-export because it will install the dependencies in a virtual environment and not in the global environment - while still making the tool available globally in your shell / path.
156
183
 
157
- The executables have been built with pyinstaller.
184
+
185
+ `uv tool install chat-export[windows]`
186
+ or
187
+ `uv tool install chat-export[macos]`
188
+ or just
189
+ `uv tool install chat-export`
190
+ uninstall with:
191
+ `uv tool uninstall chat-export`
192
+
158
193
 
159
- **Option 3: Run Directly (No Installation)**
194
+ ###Option 3: Run Directly (No Installation)
160
195
 
161
- If Python is installed on your Windows, Mac or Linux computer, run the tool directly (no installation required) with the following command:
196
+ If Python is installed on your Windows, Mac or Linux computer, run the tool directly (no pip installation required, no venv required, no additional dependencies required because it's just vanilla standard lib Python in a single scriptfile, always run the latest up to date version directly from GitHub) with the following command:
162
197
  ```
163
198
  python -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
164
199
  ```
@@ -167,11 +202,14 @@ You can for example save it on Google Drive or Dropbox or send it to yourself wi
167
202
  python3 -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
168
203
  ```
169
204
 
170
- **Usage**
205
+ ## Usage
171
206
 
172
207
  The tool supports both interactive and non-interactive modes:
173
208
 
174
209
  ### Interactive Mode (Default)
210
+
211
+ Just run `chat-export` in your terminal.
212
+
175
213
  **CLI Parameters:**
176
214
 
177
215
  `-o, --output-dir`: Base directory where the chat folder will be created (optional, default: current directory)
@@ -286,7 +286,7 @@ def windows_file_picker():
286
286
 
287
287
 
288
288
 
289
- version = "0.9.2"
289
+ version = "0.9.3"
290
290
 
291
291
  donate_link = "https://donate.stripe.com/3csfZLaIj5JE6dO4gg"
292
292
 
@@ -455,6 +455,44 @@ class MessageParser:
455
455
  except (ValueError, AttributeError):
456
456
  return None
457
457
 
458
+ @staticmethod
459
+ def trim_zero_widths(text: str) -> str:
460
+ """Trim harmless zero-width characters from the start and end of a string.
461
+
462
+ Safe to strip: ZWSP, ZWNJ, ZWJ, BOM.
463
+ Does NOT strip directional controls like LRM, RLM, FSI, PDI, etc.
464
+ """
465
+
466
+ SAFE_ZERO_WIDTHS = "\u200B\u200C\u200D\uFEFF" # ZWSP, ZWNJ, ZWJ, BOM
467
+ return text.strip(SAFE_ZERO_WIDTHS).strip()
468
+
469
+
470
+ @staticmethod
471
+ def mark_invisible_chars(text: str) -> str:
472
+ """Replace zero-width and directional Unicode control chars with ASCII markers."""
473
+
474
+ replacements = {
475
+ "\u200B": ":ZWSP:", # Zero Width Space
476
+ "\u200C": ":ZWNJ:", # Zero Width Non-Joiner
477
+ "\u200D": ":ZWJ:", # Zero Width Joiner
478
+ "\uFEFF": ":BOM:", # Zero Width No-Break Space / BOM
479
+
480
+ "\u200E": ":LRM:", # Left-to-Right Mark
481
+ "\u200F": ":RLM:", # Right-to-Left Mark
482
+ "\u2066": ":LRI:", # Left-to-Right Isolate
483
+ "\u2067": ":RLI:", # Right-to-Left Isolate
484
+ "\u2068": ":FSI:", # First Strong Isolate
485
+ "\u2069": ":PDI:", # Pop Directional Isolate
486
+
487
+ "\u202A": ":LRE:", # Left-to-Right Embedding
488
+ "\u202B": ":RLE:", # Right-to-Left Embedding
489
+ "\u202C": ":PDF:", # Pop Directional Formatting
490
+ "\u202D": ":LRO:", # Left-to-Right Override
491
+ "\u202E": ":RLO:", # Right-to-Left Override
492
+ }
493
+
494
+ return "".join(replacements.get(ch, ch) for ch in text)
495
+
458
496
  def get_senders(self, chat_content):
459
497
  """Extract all unique senders from chat content."""
460
498
  senders = set()
@@ -463,6 +501,8 @@ class MessageParser:
463
501
  match = pattern.match(line)
464
502
  if match:
465
503
  sender = match.group(2)
504
+ sender = self.trim_zero_widths(sender)
505
+ sender = self.mark_invisible_chars(sender)
466
506
  senders.add(sender)
467
507
  return sorted(list(senders))
468
508
 
@@ -585,6 +625,8 @@ class MessageParser:
585
625
 
586
626
  if match:
587
627
  timestamp, sender, content = match.groups()
628
+ sender = self.trim_zero_widths(sender)
629
+ sender = self.mark_invisible_chars(sender)
588
630
  messages.append(Message.create_with_context(
589
631
  timestamp=timestamp,
590
632
  sender=sender,
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "chat-export"
7
- version = "0.9.2"
7
+ version = "0.9.3"
8
8
  description = "Convert WhatsApp chat exports to HTML format"
9
9
  readme = "README.md"
10
10
  license = {file = "LICENSE"}
File without changes
File without changes
File without changes