convoviz 0.3.9__tar.gz → 0.4.1__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.
Files changed (63) hide show
  1. convoviz-0.4.1/PKG-INFO +215 -0
  2. convoviz-0.4.1/README.md +190 -0
  3. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/logging_config.py +16 -24
  4. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/pipeline.py +2 -2
  5. {convoviz-0.3.9 → convoviz-0.4.1}/pyproject.toml +2 -2
  6. convoviz-0.3.9/PKG-INFO +0 -152
  7. convoviz-0.3.9/README.md +0 -127
  8. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/__init__.py +0 -0
  9. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/__main__.py +0 -0
  10. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/analysis/__init__.py +0 -0
  11. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/analysis/graphs.py +1 -1
  12. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/analysis/wordcloud.py +1 -1
  13. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/colormaps.txt +0 -0
  14. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/AmaticSC-Regular.ttf +0 -0
  15. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/ArchitectsDaughter-Regular.ttf +0 -0
  16. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/BebasNeue-Regular.ttf +0 -0
  17. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Borel-Regular.ttf +0 -0
  18. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Courgette-Regular.ttf +0 -0
  19. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/CroissantOne-Regular.ttf +0 -0
  20. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Handjet-Regular.ttf +0 -0
  21. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/IndieFlower-Regular.ttf +0 -0
  22. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Kalam-Regular.ttf +0 -0
  23. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Lobster-Regular.ttf +0 -0
  24. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/MartianMono-Regular.ttf +0 -0
  25. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/MartianMono-Thin.ttf +0 -0
  26. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Montserrat-Regular.ttf +0 -0
  27. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Mooli-Regular.ttf +0 -0
  28. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Pacifico-Regular.ttf +0 -0
  29. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/PlayfairDisplay-Regular.ttf +0 -0
  30. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Raleway-Regular.ttf +0 -0
  31. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/RobotoMono-Regular.ttf +0 -0
  32. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/RobotoMono-Thin.ttf +0 -0
  33. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/RobotoSlab-Regular.ttf +0 -0
  34. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/RobotoSlab-Thin.ttf +0 -0
  35. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Ruwudu-Regular.ttf +0 -0
  36. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Sacramento-Regular.ttf +0 -0
  37. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/SedgwickAveDisplay-Regular.ttf +0 -0
  38. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/ShadowsIntoLight-Regular.ttf +0 -0
  39. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/TitilliumWeb-Regular.ttf +0 -0
  40. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Yellowtail-Regular.ttf +0 -0
  41. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/YsabeauOffice-Regular.ttf +0 -0
  42. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/YsabeauSC-Regular.ttf +0 -0
  43. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/YsabeauSC-Thin.ttf +0 -0
  44. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/fonts/Zeyada-Regular.ttf +0 -0
  45. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/assets/stopwords.txt +0 -0
  46. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/cli.py +2 -2
  47. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/config.py +0 -0
  48. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/exceptions.py +0 -0
  49. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/interactive.py +1 -1
  50. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/io/__init__.py +0 -0
  51. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/io/assets.py +1 -1
  52. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/io/loaders.py +1 -1
  53. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/io/writers.py +1 -1
  54. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/models/__init__.py +0 -0
  55. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/models/collection.py +0 -0
  56. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/models/conversation.py +0 -0
  57. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/models/message.py +0 -0
  58. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/models/node.py +0 -0
  59. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/py.typed +0 -0
  60. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/renderers/__init__.py +0 -0
  61. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/renderers/markdown.py +0 -0
  62. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/renderers/yaml.py +0 -0
  63. {convoviz-0.3.9 → convoviz-0.4.1}/convoviz/utils.py +0 -0
@@ -0,0 +1,215 @@
1
+ Metadata-Version: 2.4
2
+ Name: convoviz
3
+ Version: 0.4.1
4
+ Summary: Get analytics and visualizations on your ChatGPT data!
5
+ Keywords: markdown,chatgpt,openai,visualization,analytics,json,export,data-analysis,obsidian
6
+ Author: Mohamed Cheikh Sidiya
7
+ Author-email: Mohamed Cheikh Sidiya <mohamedcheikhsidiya77@gmail.com>
8
+ License-Expression: MIT
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Requires-Dist: orjson>=3.11.5
13
+ Requires-Dist: pydantic>=2.12.5
14
+ Requires-Dist: pydantic-settings>=2.7.0
15
+ Requires-Dist: questionary>=2.1.1
16
+ Requires-Dist: rich>=14.2.0
17
+ Requires-Dist: tqdm>=4.67.1
18
+ Requires-Dist: typer>=0.21.0
19
+ Requires-Dist: nltk>=3.9.2 ; extra == 'viz'
20
+ Requires-Dist: wordcloud>=1.9.5 ; extra == 'viz'
21
+ Requires-Python: >=3.12
22
+ Project-URL: Repository, https://github.com/mohamed-chs/convoviz
23
+ Provides-Extra: viz
24
+ Description-Content-Type: text/markdown
25
+
26
+ <p align="center">
27
+ <h1 align="center">Convoviz 📊</h1>
28
+ <p align="center"><strong>Visualize your entire ChatGPT data</strong></p>
29
+ <p align="center">
30
+ Convert your ChatGPT history into well-formatted Markdown files.<br>
31
+ Visualize your data with word clouds 🔡☁️ and usage graphs 📈.
32
+ </p>
33
+ </p>
34
+
35
+ <p align="center">
36
+ <a href="https://pypi.org/project/convoviz/"><img src="https://img.shields.io/pypi/v/convoviz?style=flat-square&logo=pypi&logoColor=white&label=PyPI" alt="PyPI Version"></a>
37
+ <a href="https://pepy.tech/projects/convoviz"><img src="https://static.pepy.tech/personalized-badge/convoviz?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=GREEN&left_text=Downloads" alt="PyPI Downloads"></a>
38
+ <a href="https://github.com/mohamed-chs/convoviz/blob/main/LICENSE"><img src="https://img.shields.io/github/license/mohamed-chs/convoviz?style=flat-square" alt="License"></a>
39
+ </p>
40
+
41
+ ---
42
+
43
+ ## ✨ Features
44
+
45
+ | Feature | Description |
46
+ |---------|-------------|
47
+ | 📝 **Markdown Export** | Clean, well-formatted Markdown with optional YAML headers |
48
+ | 🖼️ **Inline Images** | Media attachments rendered directly in your Markdown files |
49
+ | ☁️ **Word Clouds** | Visual breakdowns of your most-used words and phrases |
50
+ | 📈 **Usage Graphs** | Bar plots and charts showing your conversation patterns |
51
+
52
+ > 💡 **See examples in the [`demo/`](demo) folder!**
53
+
54
+ ---
55
+
56
+ ## 📖 How to Use
57
+
58
+ ### Step 1: Export Your ChatGPT Data
59
+
60
+ 1. Sign in at [chatgpt.com](https://chatgpt.com)
61
+ 2. Navigate to: **Profile Name** (bottom left) → **Settings** → **Data controls** → **Export**
62
+ 3. Click **Confirm export**
63
+ 4. Wait for the email from OpenAI, then download the `.zip` file
64
+
65
+ ---
66
+
67
+ ### Step 2: Install Convoviz
68
+
69
+ <details open>
70
+ <summary><strong>🚀 Quick Install (Recommended)</strong></summary>
71
+
72
+ One command installs everything you need — [uv](https://github.com/astral-sh/uv) (a fast Python package manager) and convoviz with graphs and word clouds.
73
+
74
+ **Linux / macOS:**
75
+
76
+ ```bash
77
+ curl -fsSL https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.sh | bash
78
+ ```
79
+
80
+ **Windows (PowerShell):**
81
+
82
+ ```powershell
83
+ irm https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.ps1 | iex
84
+ ```
85
+
86
+ </details>
87
+
88
+ <details>
89
+ <summary><strong>📦 Alternative: Install with pip</strong></summary>
90
+
91
+ If you prefer using `pip` directly:
92
+
93
+ ```bash
94
+ # Create a virtual environment (keeps your system Python clean)
95
+ python3 -m venv .venv
96
+
97
+ # Activate the virtual environment
98
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
99
+
100
+ # Install convoviz with visualization extras
101
+ pip install "convoviz[viz]"
102
+ ```
103
+
104
+ </details>
105
+
106
+ ---
107
+
108
+ ### Step 3: Run Convoviz
109
+
110
+ The simplest way is to run the command and follow the interactive prompts:
111
+
112
+ ```bash
113
+ convoviz
114
+ ```
115
+
116
+ Or, provide arguments directly to skip the prompts:
117
+
118
+ ```bash
119
+ convoviz --input path/to/your/export.zip --output path/to/output/folder
120
+ ```
121
+
122
+ <details>
123
+ <summary><strong>⚙️ Command Line Options</strong></summary>
124
+
125
+ #### Selective Output
126
+
127
+ By default, all outputs (Markdown, graphs, word clouds) are generated. Use `--outputs` to pick specific ones:
128
+
129
+ ```bash
130
+ convoviz --input export.zip --outputs markdown --outputs graphs
131
+ ```
132
+
133
+ Available options: `markdown`, `graphs`, `wordclouds`
134
+
135
+ > In interactive mode, you'll be prompted to choose which outputs to generate.
136
+
137
+ #### Other Useful Flags
138
+
139
+ | Flag | Description |
140
+ |------|-------------|
141
+ | `--zip` / `-z` | Alias for `--input` (for convenience) |
142
+ | `--no-interactive` | Force non-interactive mode |
143
+ | `--flat` | Put all Markdown files in a single folder (instead of organizing by date) |
144
+ | `--verbose` / `-v` | Enable detailed logging (use `-vv` for debug logs) |
145
+ | `--log-file PATH` | Specify a custom log file location |
146
+
147
+ For a complete list of options:
148
+
149
+ ```bash
150
+ convoviz --help
151
+ ```
152
+
153
+ </details>
154
+
155
+ ---
156
+
157
+ ### Step 4: Check the Output 🎉
158
+
159
+ After running the script, head to your output folder to see:
160
+ - 📝 Neatly formatted Markdown files
161
+ - 📊 Visualizations and graphs
162
+
163
+ ![wordcloud example](demo/wordcloud-example.png)
164
+
165
+ ---
166
+
167
+ ## 💌 Share Your Feedback!
168
+
169
+ I hope you find this tool useful. I'm continuously looking to improve on this, but I need your help for that.
170
+
171
+ Whether you're a tech wizard or you're new to all this, I'd love to hear about your journey with the tool. Found a quirk? Have a suggestion? Or just want to send some good vibes? I'm all ears!
172
+
173
+ 👉 **[Open an Issue](https://github.com/mohamed-chs/convoviz/issues)**
174
+
175
+ And if you've had a great experience, consider giving the project a ⭐ **star**! It keeps me motivated and helps others discover it!
176
+
177
+ ---
178
+
179
+ ## 📝 Notes
180
+
181
+ <details>
182
+ <summary><strong>About This Project</strong></summary>
183
+
184
+ This is just a small thing I coded to help me see my convos in beautiful markdown. It was originally built with [Obsidian](https://obsidian.md/) (my go-to note-taking app) in mind, but the default output is standard Markdown.
185
+
186
+ I wasn't a fan of the clunky, and sometimes paid, browser extensions.
187
+
188
+ It was also a great opportunity to learn more about Python and type annotations. I had mypy, pyright, and ruff all on strict mode, 'twas fun.
189
+
190
+ </details>
191
+
192
+ <details>
193
+ <summary><strong>Using as a Library</strong></summary>
194
+
195
+ It should also work as a library, so you can import and use the models and functions. I need to add more documentation for that though. Feel free to reach out if you need help.
196
+
197
+ </details>
198
+
199
+ <details>
200
+ <summary><strong>Offline / Reproducible Runs</strong></summary>
201
+
202
+ Word clouds use NLTK stopwords. If you're offline and NLTK data isn't installed yet, pre-download it:
203
+
204
+ ```bash
205
+ python -c "import nltk; nltk.download('stopwords')"
206
+ ```
207
+
208
+ </details>
209
+
210
+ <details>
211
+ <summary><strong>Bookmarklet (Experimental)</strong></summary>
212
+
213
+ There's also a JavaScript bookmarklet flow under `js/` for exporting additional conversation data outside the official ZIP export. This is experimental.
214
+
215
+ </details>
@@ -0,0 +1,190 @@
1
+ <p align="center">
2
+ <h1 align="center">Convoviz 📊</h1>
3
+ <p align="center"><strong>Visualize your entire ChatGPT data</strong></p>
4
+ <p align="center">
5
+ Convert your ChatGPT history into well-formatted Markdown files.<br>
6
+ Visualize your data with word clouds 🔡☁️ and usage graphs 📈.
7
+ </p>
8
+ </p>
9
+
10
+ <p align="center">
11
+ <a href="https://pypi.org/project/convoviz/"><img src="https://img.shields.io/pypi/v/convoviz?style=flat-square&logo=pypi&logoColor=white&label=PyPI" alt="PyPI Version"></a>
12
+ <a href="https://pepy.tech/projects/convoviz"><img src="https://static.pepy.tech/personalized-badge/convoviz?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=GREEN&left_text=Downloads" alt="PyPI Downloads"></a>
13
+ <a href="https://github.com/mohamed-chs/convoviz/blob/main/LICENSE"><img src="https://img.shields.io/github/license/mohamed-chs/convoviz?style=flat-square" alt="License"></a>
14
+ </p>
15
+
16
+ ---
17
+
18
+ ## ✨ Features
19
+
20
+ | Feature | Description |
21
+ |---------|-------------|
22
+ | 📝 **Markdown Export** | Clean, well-formatted Markdown with optional YAML headers |
23
+ | 🖼️ **Inline Images** | Media attachments rendered directly in your Markdown files |
24
+ | ☁️ **Word Clouds** | Visual breakdowns of your most-used words and phrases |
25
+ | 📈 **Usage Graphs** | Bar plots and charts showing your conversation patterns |
26
+
27
+ > 💡 **See examples in the [`demo/`](demo) folder!**
28
+
29
+ ---
30
+
31
+ ## 📖 How to Use
32
+
33
+ ### Step 1: Export Your ChatGPT Data
34
+
35
+ 1. Sign in at [chatgpt.com](https://chatgpt.com)
36
+ 2. Navigate to: **Profile Name** (bottom left) → **Settings** → **Data controls** → **Export**
37
+ 3. Click **Confirm export**
38
+ 4. Wait for the email from OpenAI, then download the `.zip` file
39
+
40
+ ---
41
+
42
+ ### Step 2: Install Convoviz
43
+
44
+ <details open>
45
+ <summary><strong>🚀 Quick Install (Recommended)</strong></summary>
46
+
47
+ One command installs everything you need — [uv](https://github.com/astral-sh/uv) (a fast Python package manager) and convoviz with graphs and word clouds.
48
+
49
+ **Linux / macOS:**
50
+
51
+ ```bash
52
+ curl -fsSL https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.sh | bash
53
+ ```
54
+
55
+ **Windows (PowerShell):**
56
+
57
+ ```powershell
58
+ irm https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.ps1 | iex
59
+ ```
60
+
61
+ </details>
62
+
63
+ <details>
64
+ <summary><strong>📦 Alternative: Install with pip</strong></summary>
65
+
66
+ If you prefer using `pip` directly:
67
+
68
+ ```bash
69
+ # Create a virtual environment (keeps your system Python clean)
70
+ python3 -m venv .venv
71
+
72
+ # Activate the virtual environment
73
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
74
+
75
+ # Install convoviz with visualization extras
76
+ pip install "convoviz[viz]"
77
+ ```
78
+
79
+ </details>
80
+
81
+ ---
82
+
83
+ ### Step 3: Run Convoviz
84
+
85
+ The simplest way is to run the command and follow the interactive prompts:
86
+
87
+ ```bash
88
+ convoviz
89
+ ```
90
+
91
+ Or, provide arguments directly to skip the prompts:
92
+
93
+ ```bash
94
+ convoviz --input path/to/your/export.zip --output path/to/output/folder
95
+ ```
96
+
97
+ <details>
98
+ <summary><strong>⚙️ Command Line Options</strong></summary>
99
+
100
+ #### Selective Output
101
+
102
+ By default, all outputs (Markdown, graphs, word clouds) are generated. Use `--outputs` to pick specific ones:
103
+
104
+ ```bash
105
+ convoviz --input export.zip --outputs markdown --outputs graphs
106
+ ```
107
+
108
+ Available options: `markdown`, `graphs`, `wordclouds`
109
+
110
+ > In interactive mode, you'll be prompted to choose which outputs to generate.
111
+
112
+ #### Other Useful Flags
113
+
114
+ | Flag | Description |
115
+ |------|-------------|
116
+ | `--zip` / `-z` | Alias for `--input` (for convenience) |
117
+ | `--no-interactive` | Force non-interactive mode |
118
+ | `--flat` | Put all Markdown files in a single folder (instead of organizing by date) |
119
+ | `--verbose` / `-v` | Enable detailed logging (use `-vv` for debug logs) |
120
+ | `--log-file PATH` | Specify a custom log file location |
121
+
122
+ For a complete list of options:
123
+
124
+ ```bash
125
+ convoviz --help
126
+ ```
127
+
128
+ </details>
129
+
130
+ ---
131
+
132
+ ### Step 4: Check the Output 🎉
133
+
134
+ After running the script, head to your output folder to see:
135
+ - 📝 Neatly formatted Markdown files
136
+ - 📊 Visualizations and graphs
137
+
138
+ ![wordcloud example](demo/wordcloud-example.png)
139
+
140
+ ---
141
+
142
+ ## 💌 Share Your Feedback!
143
+
144
+ I hope you find this tool useful. I'm continuously looking to improve on this, but I need your help for that.
145
+
146
+ Whether you're a tech wizard or you're new to all this, I'd love to hear about your journey with the tool. Found a quirk? Have a suggestion? Or just want to send some good vibes? I'm all ears!
147
+
148
+ 👉 **[Open an Issue](https://github.com/mohamed-chs/convoviz/issues)**
149
+
150
+ And if you've had a great experience, consider giving the project a ⭐ **star**! It keeps me motivated and helps others discover it!
151
+
152
+ ---
153
+
154
+ ## 📝 Notes
155
+
156
+ <details>
157
+ <summary><strong>About This Project</strong></summary>
158
+
159
+ This is just a small thing I coded to help me see my convos in beautiful markdown. It was originally built with [Obsidian](https://obsidian.md/) (my go-to note-taking app) in mind, but the default output is standard Markdown.
160
+
161
+ I wasn't a fan of the clunky, and sometimes paid, browser extensions.
162
+
163
+ It was also a great opportunity to learn more about Python and type annotations. I had mypy, pyright, and ruff all on strict mode, 'twas fun.
164
+
165
+ </details>
166
+
167
+ <details>
168
+ <summary><strong>Using as a Library</strong></summary>
169
+
170
+ It should also work as a library, so you can import and use the models and functions. I need to add more documentation for that though. Feel free to reach out if you need help.
171
+
172
+ </details>
173
+
174
+ <details>
175
+ <summary><strong>Offline / Reproducible Runs</strong></summary>
176
+
177
+ Word clouds use NLTK stopwords. If you're offline and NLTK data isn't installed yet, pre-download it:
178
+
179
+ ```bash
180
+ python -c "import nltk; nltk.download('stopwords')"
181
+ ```
182
+
183
+ </details>
184
+
185
+ <details>
186
+ <summary><strong>Bookmarklet (Experimental)</strong></summary>
187
+
188
+ There's also a JavaScript bookmarklet flow under `js/` for exporting additional conversation data outside the official ZIP export. This is experimental.
189
+
190
+ </details>
@@ -1,30 +1,29 @@
1
1
  """Logging configuration for convoviz."""
2
2
 
3
3
  import logging
4
- import sys
5
4
  import tempfile
6
5
  from pathlib import Path
7
- from typing import Optional
8
6
 
9
7
  from rich.logging import RichHandler
10
8
 
9
+
11
10
  def setup_logging(
12
11
  verbosity: int = 0,
13
- log_file: Optional[Path] = None,
12
+ log_file: Path | None = None,
14
13
  ) -> Path:
15
14
  """Set up logging configuration.
16
-
15
+
17
16
  Args:
18
17
  verbosity: Level of verbosity (0=WARNING, 1=INFO, 2=DEBUG)
19
18
  log_file: Path to log file. If None, a temporary file is created.
20
-
19
+
21
20
  Returns:
22
21
  Path to the log file used.
23
22
  """
24
23
  # clear existing handlers
25
24
  root_logger = logging.getLogger()
26
25
  root_logger.handlers.clear()
27
-
26
+
28
27
  # Determine log level for console
29
28
  if verbosity >= 2:
30
29
  console_level = logging.DEBUG
@@ -32,7 +31,7 @@ def setup_logging(
32
31
  console_level = logging.INFO
33
32
  else:
34
33
  console_level = logging.WARNING
35
-
34
+
36
35
  # Console handler (Rich)
37
36
  console_handler = RichHandler(
38
37
  rich_tracebacks=True,
@@ -41,37 +40,30 @@ def setup_logging(
41
40
  show_path=False,
42
41
  )
43
42
  console_handler.setLevel(console_level)
44
-
43
+
45
44
  # File handler
46
45
  if log_file is None:
47
46
  # Create temp file if not specified
48
- tf = tempfile.NamedTemporaryFile(
49
- prefix="convoviz_",
50
- suffix=".log",
51
- delete=False
52
- )
53
- log_file = Path(tf.name)
54
- tf.close()
55
-
47
+ with tempfile.NamedTemporaryFile(prefix="convoviz_", suffix=".log", delete=False) as tf:
48
+ log_file = Path(tf.name)
49
+
56
50
  # Ensure parent dir exists
57
51
  if not log_file.parent.exists():
58
52
  log_file.parent.mkdir(parents=True, exist_ok=True)
59
-
53
+
60
54
  file_handler = logging.FileHandler(log_file, encoding="utf-8")
61
- file_handler.setLevel(logging.DEBUG) # Always log DEBUG to file
62
- file_formatter = logging.Formatter(
63
- "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
64
- )
55
+ file_handler.setLevel(logging.DEBUG) # Always log DEBUG to file
56
+ file_formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
65
57
  file_handler.setFormatter(file_formatter)
66
-
58
+
67
59
  # Configure root logger
68
60
  # We set root level to DEBUG so that the handlers can filter as they please
69
61
  root_logger.setLevel(logging.DEBUG)
70
62
  root_logger.addHandler(console_handler)
71
63
  root_logger.addHandler(file_handler)
72
-
64
+
73
65
  # Reduce noise from explicit libraries if necessary
74
66
  logging.getLogger("matplotlib").setLevel(logging.WARNING)
75
67
  logging.getLogger("PIL").setLevel(logging.WARNING)
76
-
68
+
77
69
  return log_file
@@ -1,8 +1,8 @@
1
1
  """Main processing pipeline for convoviz."""
2
2
 
3
+ import logging
3
4
  from pathlib import Path
4
5
  from shutil import rmtree
5
- import logging
6
6
 
7
7
  from rich.console import Console
8
8
 
@@ -180,5 +180,5 @@ def run_pipeline(config: ConvovizConfig) -> None:
180
180
  f"Explore the full gallery [bold yellow]🖼️[/bold yellow] at: {_safe_uri(output_folder)} 🔗\n\n"
181
181
  "I hope you enjoy the outcome 🤞.\n\n"
182
182
  "If you appreciate it, kindly give the project a star 🌟 on GitHub:\n\n"
183
- "➡️ https://github.com/mohamed-chs/chatgpt-history-export-to-md 🔗\n\n"
183
+ "➡️ https://github.com/mohamed-chs/convoviz 🔗\n\n"
184
184
  )
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "convoviz"
3
- version = "0.3.9"
3
+ version = "0.4.1"
4
4
  description = "Get analytics and visualizations on your ChatGPT data!"
5
5
  license = "MIT"
6
6
  keywords = [
@@ -34,7 +34,7 @@ viz = [
34
34
  ]
35
35
 
36
36
  [project.urls]
37
- Repository = "https://github.com/mohamed-chs/chatgpt-history-export-to-md"
37
+ Repository = "https://github.com/mohamed-chs/convoviz"
38
38
 
39
39
  [build-system]
40
40
  requires = ["uv_build"]
convoviz-0.3.9/PKG-INFO DELETED
@@ -1,152 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: convoviz
3
- Version: 0.3.9
4
- Summary: Get analytics and visualizations on your ChatGPT data!
5
- Keywords: markdown,chatgpt,openai,visualization,analytics,json,export,data-analysis,obsidian
6
- Author: Mohamed Cheikh Sidiya
7
- Author-email: Mohamed Cheikh Sidiya <mohamedcheikhsidiya77@gmail.com>
8
- License-Expression: MIT
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.12
12
- Requires-Dist: orjson>=3.11.5
13
- Requires-Dist: pydantic>=2.12.5
14
- Requires-Dist: pydantic-settings>=2.7.0
15
- Requires-Dist: questionary>=2.1.1
16
- Requires-Dist: rich>=14.2.0
17
- Requires-Dist: tqdm>=4.67.1
18
- Requires-Dist: typer>=0.21.0
19
- Requires-Dist: nltk>=3.9.2 ; extra == 'viz'
20
- Requires-Dist: wordcloud>=1.9.5 ; extra == 'viz'
21
- Requires-Python: >=3.12
22
- Project-URL: Repository, https://github.com/mohamed-chs/chatgpt-history-export-to-md
23
- Provides-Extra: viz
24
- Description-Content-Type: text/markdown
25
-
26
- # Convoviz 📊: Visualize your entire ChatGPT data
27
-
28
- Convert your ChatGPT history into well-formatted Markdown files. Visualize your data with word clouds 🔡☁️ and usage graphs 📈.
29
-
30
- ## Features
31
-
32
- - **YAML Headers**: Optional and included by default.
33
- - **Inline Images**: Media attachments rendered directly in Markdown.
34
- - **Data Visualizations**: Word clouds, graphs, and more.
35
-
36
- See examples [here](demo).
37
-
38
- ## How to Use 📖
39
-
40
- ### 1. Export Your ChatGPT Data 🗂
41
-
42
- - Sign in at [chatgpt.com](https://chatgpt.com).
43
- - Navigate: Profile Name (bottom left) -> **Settings** -> **Data controls** -> **Export** -> **Confirm export**.
44
- - Await email from OpenAI and download the `.zip` file.
45
-
46
- ### 2. Install the tool 🛠
47
-
48
- First, install [uv](https://github.com/astral-sh/uv) (if you don't have it):
49
-
50
- MacOS / Linux:
51
-
52
- ```bash
53
- curl -LsSf https://astral.sh/uv/install.sh | sh
54
- ```
55
-
56
- Windows:
57
-
58
- ```powershell
59
- powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
60
- ```
61
-
62
- Then install convoviz:
63
-
64
- ```bash
65
- uv tool install "convoviz[viz]"
66
- ```
67
-
68
- The `[viz]` extra includes graphs and word clouds. Skip it for a faster markdown-only install.
69
-
70
- ### Alternative: pip
71
-
72
- ```bash
73
- python3 -m venv .venv
74
- source .venv/bin/activate # Windows: .venv\Scripts\activate
75
- pip install "convoviz[viz]"
76
- ```
77
-
78
- ### 3. Run the tool 🏃‍♂️
79
-
80
- Simply run the command and follow the prompts:
81
-
82
- ```bash
83
- convoviz
84
- ```
85
-
86
- #### Command Line Arguments
87
-
88
- You can provide arguments directly to skip the prompts:
89
-
90
- ```bash
91
- convoviz --input path/to/your/export.zip --output path/to/output/folder
92
- ```
93
-
94
- ##### Selective Output
95
-
96
- By default, all outputs are generated. Use `--outputs` to pick specific ones:
97
-
98
- ```bash
99
- convoviz --input export.zip --outputs markdown --outputs graphs
100
- ```
101
-
102
- Options: `markdown`, `graphs`, `wordclouds`. In interactive mode, you'll be prompted.
103
-
104
- ##### Other Notes
105
-
106
- - `--zip` / `-z` is kept as an alias for `--input` for convenience.
107
- - You can force non-interactive mode with `--no-interactive`.
108
- - Use `--flat` to put all Markdown files in a single folder instead of organizing by date.
109
- - Use `--verbose` or `-v` for detailed logging (use `-vv` for debug logs).
110
- - Use `--log-file` to specify a custom log file (logs default to a temporary file if not specified).
111
-
112
- For more options, run:
113
-
114
- ```bash
115
- convoviz --help
116
- ```
117
-
118
- ### 4. Check the Output 🎉
119
-
120
- And that's it! After running the script, head over to the output folder to see your neatly formatted Markdown files and visualizations.
121
-
122
- ![wordcloud example](demo/wordcloud-example.png)
123
-
124
- ## Share Your Feedback! 💌
125
-
126
- I hope you find this tool useful. I'm continuously looking to improve on this, but I need your help for that.
127
-
128
- Whether you're a tech wizard or you're new to all this, I'd love to hear about your journey with the tool. Found a quirk? Have a suggestion? Or just want to send some good vibes? I'm all ears! (see [issues](https://github.com/mohamed-chs/chatgpt-history-export-to-md/issues))
129
-
130
- And if you've had a great experience, consider giving the project a star ⭐. It keeps me motivated and helps others discover it!
131
-
132
- ## Notes
133
-
134
- This is just a small thing I coded to help me see my convos in beautiful markdown. It was originally built with [Obsidian](https://obsidian.md/) (my go-to note-taking app) in mind, but the default output is standard Markdown.
135
-
136
- I wasn't a fan of the clunky, and sometimes paid, browser extensions.
137
-
138
- It was also a great opportunity to learn more about Python and type annotations. I had mypy, pyright, and ruff all on strict mode, 'twas fun.
139
-
140
- It should(?) also work as library, so you can import and use the models and functions. I need to add more documentation for that tho. Feel free to reach out if you need help.
141
-
142
- ### Offline / reproducible runs
143
-
144
- Word clouds use NLTK stopwords. If you're offline and NLTK data isn't installed yet, pre-download it:
145
-
146
- ```bash
147
- python -c "import nltk; nltk.download('stopwords')"
148
- ```
149
-
150
- ### Bookmarklet
151
-
152
- There's also a JavaScript bookmarklet flow under `js/` (experimental) for exporting additional conversation data outside the official ZIP export.
convoviz-0.3.9/README.md DELETED
@@ -1,127 +0,0 @@
1
- # Convoviz 📊: Visualize your entire ChatGPT data
2
-
3
- Convert your ChatGPT history into well-formatted Markdown files. Visualize your data with word clouds 🔡☁️ and usage graphs 📈.
4
-
5
- ## Features
6
-
7
- - **YAML Headers**: Optional and included by default.
8
- - **Inline Images**: Media attachments rendered directly in Markdown.
9
- - **Data Visualizations**: Word clouds, graphs, and more.
10
-
11
- See examples [here](demo).
12
-
13
- ## How to Use 📖
14
-
15
- ### 1. Export Your ChatGPT Data 🗂
16
-
17
- - Sign in at [chatgpt.com](https://chatgpt.com).
18
- - Navigate: Profile Name (bottom left) -> **Settings** -> **Data controls** -> **Export** -> **Confirm export**.
19
- - Await email from OpenAI and download the `.zip` file.
20
-
21
- ### 2. Install the tool 🛠
22
-
23
- First, install [uv](https://github.com/astral-sh/uv) (if you don't have it):
24
-
25
- MacOS / Linux:
26
-
27
- ```bash
28
- curl -LsSf https://astral.sh/uv/install.sh | sh
29
- ```
30
-
31
- Windows:
32
-
33
- ```powershell
34
- powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
35
- ```
36
-
37
- Then install convoviz:
38
-
39
- ```bash
40
- uv tool install "convoviz[viz]"
41
- ```
42
-
43
- The `[viz]` extra includes graphs and word clouds. Skip it for a faster markdown-only install.
44
-
45
- ### Alternative: pip
46
-
47
- ```bash
48
- python3 -m venv .venv
49
- source .venv/bin/activate # Windows: .venv\Scripts\activate
50
- pip install "convoviz[viz]"
51
- ```
52
-
53
- ### 3. Run the tool 🏃‍♂️
54
-
55
- Simply run the command and follow the prompts:
56
-
57
- ```bash
58
- convoviz
59
- ```
60
-
61
- #### Command Line Arguments
62
-
63
- You can provide arguments directly to skip the prompts:
64
-
65
- ```bash
66
- convoviz --input path/to/your/export.zip --output path/to/output/folder
67
- ```
68
-
69
- ##### Selective Output
70
-
71
- By default, all outputs are generated. Use `--outputs` to pick specific ones:
72
-
73
- ```bash
74
- convoviz --input export.zip --outputs markdown --outputs graphs
75
- ```
76
-
77
- Options: `markdown`, `graphs`, `wordclouds`. In interactive mode, you'll be prompted.
78
-
79
- ##### Other Notes
80
-
81
- - `--zip` / `-z` is kept as an alias for `--input` for convenience.
82
- - You can force non-interactive mode with `--no-interactive`.
83
- - Use `--flat` to put all Markdown files in a single folder instead of organizing by date.
84
- - Use `--verbose` or `-v` for detailed logging (use `-vv` for debug logs).
85
- - Use `--log-file` to specify a custom log file (logs default to a temporary file if not specified).
86
-
87
- For more options, run:
88
-
89
- ```bash
90
- convoviz --help
91
- ```
92
-
93
- ### 4. Check the Output 🎉
94
-
95
- And that's it! After running the script, head over to the output folder to see your neatly formatted Markdown files and visualizations.
96
-
97
- ![wordcloud example](demo/wordcloud-example.png)
98
-
99
- ## Share Your Feedback! 💌
100
-
101
- I hope you find this tool useful. I'm continuously looking to improve on this, but I need your help for that.
102
-
103
- Whether you're a tech wizard or you're new to all this, I'd love to hear about your journey with the tool. Found a quirk? Have a suggestion? Or just want to send some good vibes? I'm all ears! (see [issues](https://github.com/mohamed-chs/chatgpt-history-export-to-md/issues))
104
-
105
- And if you've had a great experience, consider giving the project a star ⭐. It keeps me motivated and helps others discover it!
106
-
107
- ## Notes
108
-
109
- This is just a small thing I coded to help me see my convos in beautiful markdown. It was originally built with [Obsidian](https://obsidian.md/) (my go-to note-taking app) in mind, but the default output is standard Markdown.
110
-
111
- I wasn't a fan of the clunky, and sometimes paid, browser extensions.
112
-
113
- It was also a great opportunity to learn more about Python and type annotations. I had mypy, pyright, and ruff all on strict mode, 'twas fun.
114
-
115
- It should(?) also work as library, so you can import and use the models and functions. I need to add more documentation for that tho. Feel free to reach out if you need help.
116
-
117
- ### Offline / reproducible runs
118
-
119
- Word clouds use NLTK stopwords. If you're offline and NLTK data isn't installed yet, pre-download it:
120
-
121
- ```bash
122
- python -c "import nltk; nltk.download('stopwords')"
123
- ```
124
-
125
- ### Bookmarklet
126
-
127
- There's also a JavaScript bookmarklet flow under `js/` (experimental) for exporting additional conversation data outside the official ZIP export.
File without changes
File without changes
@@ -8,11 +8,11 @@ Goals:
8
8
 
9
9
  from __future__ import annotations
10
10
 
11
+ import logging
11
12
  from collections import defaultdict
12
13
  from collections.abc import Callable, Iterable
13
14
  from datetime import UTC, datetime
14
15
  from pathlib import Path
15
- import logging
16
16
 
17
17
  import matplotlib.dates as mdates
18
18
  import matplotlib.font_manager as fm
@@ -1,10 +1,10 @@
1
1
  """Word cloud generation for conversation text."""
2
2
 
3
+ import logging
3
4
  import os
4
5
  from concurrent.futures import ProcessPoolExecutor
5
6
  from functools import lru_cache
6
7
  from pathlib import Path
7
- import logging
8
8
 
9
9
  from nltk import download as nltk_download
10
10
  from nltk.corpus import stopwords as nltk_stopwords
@@ -1,5 +1,6 @@
1
1
  """Command-line interface for convoviz."""
2
2
 
3
+ import logging
3
4
  from pathlib import Path
4
5
 
5
6
  import typer
@@ -10,10 +11,9 @@ from convoviz.config import FolderOrganization, OutputKind, get_default_config
10
11
  from convoviz.exceptions import ConfigurationError, InvalidZipError
11
12
  from convoviz.interactive import run_interactive_config
12
13
  from convoviz.io.loaders import find_latest_zip
14
+ from convoviz.logging_config import setup_logging
13
15
  from convoviz.pipeline import run_pipeline
14
16
  from convoviz.utils import default_font_path
15
- from convoviz.logging_config import setup_logging
16
- import logging
17
17
 
18
18
  app = typer.Typer(
19
19
  add_completion=False,
File without changes
@@ -1,12 +1,12 @@
1
1
  """Interactive configuration prompts using questionary."""
2
2
 
3
+ import logging
3
4
  from pathlib import Path
4
5
  from typing import Literal, Protocol, cast
5
6
 
6
7
  from questionary import Choice, Style, checkbox, select
7
8
  from questionary import path as qst_path
8
9
  from questionary import text as qst_text
9
- import logging
10
10
 
11
11
  from convoviz.config import ConvovizConfig, OutputKind, get_default_config
12
12
  from convoviz.io.loaders import find_latest_zip, validate_zip
@@ -1,8 +1,8 @@
1
1
  "Asset management functions."
2
2
 
3
+ import logging
3
4
  import shutil
4
5
  from pathlib import Path
5
- import logging
6
6
 
7
7
  logger = logging.getLogger(__name__)
8
8
 
@@ -1,8 +1,8 @@
1
1
  """Loading functions for conversations and collections."""
2
2
 
3
+ import logging
3
4
  from pathlib import Path, PurePosixPath
4
5
  from zipfile import ZipFile
5
- import logging
6
6
 
7
7
  from orjson import loads
8
8
 
@@ -1,5 +1,6 @@
1
1
  """Writing functions for conversations and collections."""
2
2
 
3
+ import logging
3
4
  from os import utime as os_utime
4
5
  from pathlib import Path
5
6
  from urllib.parse import quote
@@ -12,7 +13,6 @@ from convoviz.io.assets import copy_asset, resolve_asset_path
12
13
  from convoviz.models import Conversation, ConversationCollection
13
14
  from convoviz.renderers import render_conversation
14
15
  from convoviz.utils import sanitize
15
- import logging
16
16
 
17
17
  logger = logging.getLogger(__name__)
18
18
 
File without changes
File without changes