chat-export 0.9.2__py3-none-any.whl

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.
@@ -0,0 +1,264 @@
1
+ Metadata-Version: 2.4
2
+ Name: chat-export
3
+ Version: 0.9.2
4
+ Summary: Convert WhatsApp chat exports to HTML format
5
+ Author-email: matlon GmbH <software@matlon.ch>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 mtln
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://chat-export.click
29
+ Project-URL: Repository, https://github.com/mtln/chat-export
30
+ Project-URL: Issues, https://github.com/mtln/chat-export/issues
31
+ Project-URL: Donate, https://donate.stripe.com/3csfZLaIj5JE6dO4gg
32
+ Keywords: whatsapp,chat,export,html,conversion,archive
33
+ Classifier: Development Status :: 5 - Production/Stable
34
+ Classifier: Intended Audience :: End Users/Desktop
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Operating System :: OS Independent
37
+ Classifier: Programming Language :: Python :: 3
38
+ Classifier: Programming Language :: Python :: 3.7
39
+ Classifier: Programming Language :: Python :: 3.8
40
+ Classifier: Programming Language :: Python :: 3.9
41
+ Classifier: Programming Language :: Python :: 3.10
42
+ Classifier: Programming Language :: Python :: 3.11
43
+ Classifier: Programming Language :: Python :: 3.12
44
+ Classifier: Programming Language :: Python :: 3.13
45
+ Classifier: Topic :: Communications :: Chat
46
+ Classifier: Topic :: Text Processing :: Markup :: HTML
47
+ Classifier: Topic :: Utilities
48
+ Classifier: Topic :: System :: Archiving
49
+ Requires-Python: >=3.7
50
+ Description-Content-Type: text/markdown
51
+ License-File: LICENSE
52
+ Provides-Extra: macos
53
+ Requires-Dist: pyobjc-framework-Cocoa>=9.0; extra == "macos"
54
+ Provides-Extra: windows
55
+ Requires-Dist: pywin32>=306; extra == "windows"
56
+ Dynamic: license-file
57
+
58
+ # chat-export: Convert WhatsApp Chats to HTML
59
+
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
+
62
+
63
+ Video Tutorial (still refers to the previously used tool name instead of `chat-export`):
64
+ [![YouTube](https://img.youtube.com/vi/s1dMO8pjkC8/0.jpg)](https://www.youtube.com/watch?v=s1dMO8pjkC8)"
65
+
66
+ ## Binary Release Downloads
67
+ * Windows: [chat-export.exe](https://github.com/mtln/chat-export/releases/latest/download/chat-export.exe)
68
+ * Mac: [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
69
+
70
+
71
+ ## Why is this useful?
72
+ The HTML export is:
73
+
74
+ * **Printable:** You can print the chat or save as a PDF.
75
+ * **Searchable:** You can search for specific messages in the browser.
76
+ * **Shareable:** You can share the chat with others, but make sure to get consent from all other participants first.
77
+ * **Durable:** You can keep the chat as a record for years to come. Apps come and go. Plain HTML is here to stay.
78
+ * **Automatable:** With the non-interactive CLI mode, you can script batch processing of multiple chat exports or integrate the tool into other workflows.
79
+
80
+ Maybe you want to:
81
+
82
+ * keep a record of a conversation with a former loved one, friend, or business partner. You want to delete the chat from your phone, but you don’t want to lose the memories.
83
+ * save a chat with important information, such as addresses, phone numbers, or other data.
84
+ * keep a chat with a person who has passed away.
85
+ * export just an excerpt of a chat from a specific date range.
86
+ * archive a chat before freeing up space on your phone by deleting photos, videos, and other documents that were part of the chat.
87
+ * ask another chat participant who still has a complete version of the chat (including all pictures) on his or her phone to send you a chat export, so you can convert and archive it.
88
+ * batch process multiple chat exports automatically using the CLI mode.
89
+ * integrate chat conversion into backup or archival scripts.
90
+ * process chat exports on headless servers or in automated workflows.
91
+
92
+ Furthermore, the tool is [open-source](https://github.com/mtln/chat-export) and runs offline on your computer, so you can be sure that your data is not being sent to any server.
93
+ And by the way, it’s free! If you find it useful, you can [donate](https://donate.stripe.com/3csfZLaIj5JE6dO4gg).
94
+
95
+ ## Instructions
96
+
97
+ 1. **Export the Chat:** Begin by exporting a chat from the WhatsApp app, preferably with media included. For detailed instructions, refer to [WhatsApp FAQ](https://faq.whatsapp.com/search?helpref=search&query=%20export%20chat).
98
+ You can for example save it on Google Drive or Dropbox or send it to yourself with WhatsApp.
99
+
100
+ 2. **Transfer the File:** Move the exported ZIP file to your computer. If you have sent it to yourself with WhatsApp, you can download it with WhatsApp Web or with the WhatsApp App on your computer. Delete the WhatsApp message afterwards to save space.
101
+
102
+ 3. **Install and Run the Tool:**
103
+
104
+ **Option 1: Install via pip (Recommended)**
105
+
106
+ If you have Python installed, you can install chat-export as a command-line tool:
107
+ ```
108
+ pip install chat-export
109
+ ```
110
+
111
+ **Optional: Install with platform-specific dependencies for native file dialogs**
112
+
113
+ For better user experience with native file picker dialogs, you can install platform-specific dependencies:
114
+
115
+ **On macOS:**
116
+ ```
117
+ pip install chat-export[macos]
118
+ ```
119
+
120
+ **On Windows:**
121
+ ```
122
+ pip install chat-export[windows]
123
+ ```
124
+
125
+
126
+
127
+ *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
+
129
+ After installation, you can run it from anywhere in your terminal:
130
+
131
+ ```
132
+ chat-export
133
+ chat-export --help
134
+ ```
135
+
136
+ To uninstall:
137
+ ```
138
+ pip uninstall chat-export
139
+ ```
140
+
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.
146
+
147
+ - For Mac, download [chat-export-installer.pkg](https://github.com/mtln/chat-export/releases/latest/download/chat-export-installer.pkg)
148
+
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.
154
+
155
+ To uninstall `chat-export` from Mac, open the Terminal and run: `sudo rm /usr/local/bin/chat-export`
156
+
157
+ The executables have been built with pyinstaller.
158
+
159
+ **Option 3: Run Directly (No Installation)**
160
+
161
+ If Python is installed on your Windows, Mac or Linux computer, run the tool directly (no installation required) with the following command:
162
+ ```
163
+ python -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
164
+ ```
165
+ or
166
+ ```
167
+ python3 -c "import urllib.request; exec(urllib.request.urlopen('https://raw.githubusercontent.com/mtln/chat-export/refs/heads/main/main.py').read().decode())"
168
+ ```
169
+
170
+ **Usage**
171
+
172
+ The tool supports both interactive and non-interactive modes:
173
+
174
+ ### Interactive Mode (Default)
175
+ **CLI Parameters:**
176
+
177
+ `-o, --output-dir`: Base directory where the chat folder will be created (optional, default: current directory)
178
+
179
+
180
+ * After starting the tool, a file picker dialog will open. Select the ZIP file of the chat export you want to convert. If your installation does not support file dialogs, you will be prompted for the path to the ZIP file.
181
+ * You can enter start and end dates to export only a specific date range. If you leave the fields empty, the entire chat will be exported. **If the terminal window doesn't accept your keyboard input, click with your mouse right after the colon in `Enter the number corresponding to your name:`** to set the focus to the terminal window.
182
+ * A list of chat participants will appear. Select your name so that your messages are displayed in green chat bubbles, just like on WhatsApp.
183
+ * Once the conversion completes, you can choose to open the HTML files immediately in your browser (just hit enter). From there, you can save the chat as a PDF or print it if needed.
184
+
185
+ ### Command Line Interface (Non-Interactive Mode)
186
+
187
+ For automation, scripting, or when you know all parameters in advance, you can use the non-interactive CLI mode. This mode processes the chat without any prompts and is perfect for batch processing or integration into other tools.
188
+
189
+ **Basic Usage:**
190
+ ```
191
+ chat-export -n -z "path/to/chat.zip" -p "Your Name"
192
+ ```
193
+
194
+ **CLI Parameters:**
195
+
196
+ - `-n, --non-interactive`: Enable non-interactive mode (required)
197
+ - `-z, --zip-file`: Path to WhatsApp chat export ZIP file (required)
198
+ - `-p, --participant`: Your name exactly as it appears in the chat (required)
199
+ - `--from-date`: Optional start date for filtering (formats: DD.MM.YYYY, MM/DD/YYYY, DD.MM.YY, MM/DD/YY)
200
+ - `--until-date`: Optional end date for filtering
201
+ - `-o, --output-dir`: Base directory where the chat folder will be created (default: current directory)
202
+
203
+
204
+ **Examples:**
205
+
206
+ Basic conversion:
207
+ ```
208
+ chat-export -n -z "WhatsApp Chat with John.zip" -p "Your Name"
209
+ ```
210
+ With absolute path to ZIP file (Windows):
211
+ ```
212
+ chat-export -n -z "c:\temp\WhatsApp Chat with John.zip" -p "Your Name"
213
+ ```
214
+
215
+ With date filtering:
216
+ ```
217
+ chat-export -n -z "chat.zip" -p "Your Name" --from-date "01.01.2024" --until-date "31.12.2024"
218
+ ```
219
+
220
+ Custom output directory (creates chat folder in /tmp instead of current directory):
221
+ ```
222
+ chat-export -n -z "chat.zip" -p "Your Name" -o "/tmp"
223
+ ```
224
+
225
+ Windows paths (important: no trailing backslash):
226
+ ```
227
+ chat-export -n -z "chat.zip" -p "Your Name" -o "C:\temp"
228
+ ```
229
+
230
+ **Important Notes:**
231
+ - The participant name must match exactly as it appears in the chat (case-sensitive)
232
+ - If the participant name is not found, the tool will display all available participants and exit
233
+
234
+
235
+ * When printing an HTML page, most web browsers are set by default to exclude background colors to save ink or toner. If you want to include them, you need to enable background graphics in your browser settings. See the section below for instructions.
236
+ * **In Google Chrome**: Go to `Print` → `More settings` → Check `Background graphics`.
237
+ * **In Mozilla Firefox**: Go to `File` → `Print` → `Page Setup` → Check `Print Background (colors & images)`.
238
+ * **In Microsoft Edge**: Go to `Print` → `More settings` → Check `Background graphics`.
239
+
240
+
241
+ ## Supported languages
242
+ WhatsApp chat exports vary depending on your phone’s system language.
243
+
244
+ chat-export has been tested with many languages and regional settings.
245
+
246
+ If it doesn't work for your language, please let me know.
247
+
248
+ ## Supported Operating Systems
249
+
250
+ * Windows
251
+ * Mac
252
+ * Linux
253
+
254
+ ## Limitations
255
+ There is information in chats, that is not included in the export.zip created by WhatsApp. As a consequence, this information cannot be rendered by chat-export.
256
+
257
+ This includes:
258
+
259
+ * Reactions (thumbs up and other emojis that are not a stand-alone message, but created by long tapping a previous message)
260
+ * Message relations (in WhatsApp, you can right-swipe a previous message and then write a message in relation to this)
261
+ * Chat group metadata (e.g. list of all members, admins, ...)
262
+
263
+ ## Disclaimer
264
+ chat-export comes with no warranty. Use it responsibly and respect the privacy of other chat participants. The tool is not affiliated with WhatsApp or Meta.
@@ -0,0 +1,7 @@
1
+ main.py,sha256=PB5ne3mRoMTAruJTaj01WCahVrxZ4wDvE_EOeYJFH_Y,51061
2
+ chat_export-0.9.2.dist-info/licenses/LICENSE,sha256=7b3yA-zEQNXQ6nAKtcZMYmr4PiR5EwHTw-gTt3CA7vI,1082
3
+ chat_export-0.9.2.dist-info/METADATA,sha256=F4i1zfJKMUzRm2x3nOibKAleTy4pmejUj5gXRNMYQ3E,12915
4
+ chat_export-0.9.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ chat_export-0.9.2.dist-info/entry_points.txt,sha256=DnUhZ4Gw8H5jR3a8RI4IcdMPf-3umNLUizHMbA1aruA,42
6
+ chat_export-0.9.2.dist-info/top_level.txt,sha256=ZAMgPdWghn6xTRBO6Kc3ML1y3ZrZLnjZlqbboKXc_AE,5
7
+ chat_export-0.9.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ chat-export = main:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 mtln
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ main