convoviz 0.3.0__py3-none-any.whl → 0.3.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.
- convoviz/__init__.py +10 -1
- convoviz/analysis/__init__.py +16 -3
- convoviz/pipeline.py +15 -3
- {convoviz-0.3.0.dist-info → convoviz-0.3.2.dist-info}/METADATA +24 -27
- {convoviz-0.3.0.dist-info → convoviz-0.3.2.dist-info}/RECORD +7 -7
- {convoviz-0.3.0.dist-info → convoviz-0.3.2.dist-info}/WHEEL +0 -0
- {convoviz-0.3.0.dist-info → convoviz-0.3.2.dist-info}/entry_points.txt +0 -0
convoviz/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Convoviz - ChatGPT data visualization and export tool."""
|
|
2
2
|
|
|
3
|
-
from convoviz import
|
|
3
|
+
from convoviz import config, io, models, renderers, utils
|
|
4
4
|
from convoviz.config import ConvovizConfig, get_default_config
|
|
5
5
|
from convoviz.models import Conversation, ConversationCollection, Message, Node
|
|
6
6
|
from convoviz.pipeline import run_pipeline
|
|
@@ -23,3 +23,12 @@ __all__ = [
|
|
|
23
23
|
"get_default_config",
|
|
24
24
|
"run_pipeline",
|
|
25
25
|
]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def __getattr__(name: str):
|
|
29
|
+
"""Lazy import for optional submodules like analysis."""
|
|
30
|
+
if name == "analysis":
|
|
31
|
+
from convoviz import analysis
|
|
32
|
+
|
|
33
|
+
return analysis
|
|
34
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
convoviz/analysis/__init__.py
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
"""Data analysis and visualization for convoviz.
|
|
1
|
+
"""Data analysis and visualization for convoviz.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Requires the [viz] extra: uv tool install "convoviz[viz]"
|
|
4
|
+
"""
|
|
5
5
|
|
|
6
6
|
__all__ = [
|
|
7
7
|
"generate_week_barplot",
|
|
8
8
|
"generate_wordcloud",
|
|
9
9
|
]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def __getattr__(name: str):
|
|
13
|
+
"""Lazy import for visualization functions requiring optional dependencies."""
|
|
14
|
+
if name == "generate_week_barplot":
|
|
15
|
+
from convoviz.analysis.graphs import generate_week_barplot
|
|
16
|
+
|
|
17
|
+
return generate_week_barplot
|
|
18
|
+
if name == "generate_wordcloud":
|
|
19
|
+
from convoviz.analysis.wordcloud import generate_wordcloud
|
|
20
|
+
|
|
21
|
+
return generate_wordcloud
|
|
22
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
convoviz/pipeline.py
CHANGED
|
@@ -6,7 +6,7 @@ from shutil import rmtree
|
|
|
6
6
|
from rich.console import Console
|
|
7
7
|
|
|
8
8
|
from convoviz.config import ConvovizConfig, OutputKind
|
|
9
|
-
from convoviz.exceptions import InvalidZipError
|
|
9
|
+
from convoviz.exceptions import ConfigurationError, InvalidZipError
|
|
10
10
|
from convoviz.io.loaders import (
|
|
11
11
|
find_latest_bookmarklet_json,
|
|
12
12
|
load_collection_from_json,
|
|
@@ -122,7 +122,13 @@ def run_pipeline(config: ConvovizConfig) -> None:
|
|
|
122
122
|
# Generate graphs (if selected)
|
|
123
123
|
if OutputKind.GRAPHS in selected_outputs:
|
|
124
124
|
# Lazy import to allow markdown-only usage without matplotlib
|
|
125
|
-
|
|
125
|
+
try:
|
|
126
|
+
from convoviz.analysis.graphs import generate_graphs
|
|
127
|
+
except ModuleNotFoundError as e:
|
|
128
|
+
raise ConfigurationError(
|
|
129
|
+
"Graph generation requires matplotlib. "
|
|
130
|
+
'Reinstall with the [viz] extra: uv tool install "convoviz[viz]"'
|
|
131
|
+
) from e
|
|
126
132
|
|
|
127
133
|
graph_folder = output_folder / "Graphs"
|
|
128
134
|
graph_folder.mkdir(parents=True, exist_ok=True)
|
|
@@ -140,7 +146,13 @@ def run_pipeline(config: ConvovizConfig) -> None:
|
|
|
140
146
|
# Generate word clouds (if selected)
|
|
141
147
|
if OutputKind.WORDCLOUDS in selected_outputs:
|
|
142
148
|
# Lazy import to allow markdown-only usage without wordcloud/nltk
|
|
143
|
-
|
|
149
|
+
try:
|
|
150
|
+
from convoviz.analysis.wordcloud import generate_wordclouds
|
|
151
|
+
except ModuleNotFoundError as e:
|
|
152
|
+
raise ConfigurationError(
|
|
153
|
+
"Word cloud generation requires wordcloud and nltk. "
|
|
154
|
+
'Reinstall with the [viz] extra: uv tool install "convoviz[viz]"'
|
|
155
|
+
) from e
|
|
144
156
|
|
|
145
157
|
wordcloud_folder = output_folder / "Word-Clouds"
|
|
146
158
|
wordcloud_folder.mkdir(parents=True, exist_ok=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: convoviz
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Get analytics and visualizations on your ChatGPT data!
|
|
5
5
|
Keywords: markdown,chatgpt,openai,visualization,analytics,json,export,data-analysis,obsidian
|
|
6
6
|
Author: Mohamed Cheikh Sidiya
|
|
@@ -9,24 +9,23 @@ License-Expression: MIT
|
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
-
Requires-Dist: matplotlib>=3.9.4
|
|
13
|
-
Requires-Dist: nltk>=3.9.2
|
|
14
12
|
Requires-Dist: orjson>=3.11.5
|
|
15
|
-
Requires-Dist: pillow>=11.3.0
|
|
16
13
|
Requires-Dist: pydantic>=2.12.5
|
|
17
14
|
Requires-Dist: pydantic-settings>=2.7.0
|
|
18
15
|
Requires-Dist: questionary>=2.1.1
|
|
19
16
|
Requires-Dist: rich>=14.2.0
|
|
20
17
|
Requires-Dist: tqdm>=4.67.1
|
|
21
18
|
Requires-Dist: typer>=0.21.0
|
|
22
|
-
Requires-Dist:
|
|
19
|
+
Requires-Dist: nltk>=3.9.2 ; extra == 'viz'
|
|
20
|
+
Requires-Dist: wordcloud>=1.9.5 ; extra == 'viz'
|
|
23
21
|
Requires-Python: >=3.12
|
|
24
22
|
Project-URL: Repository, https://github.com/mohamed-chs/chatgpt-history-export-to-md
|
|
23
|
+
Provides-Extra: viz
|
|
25
24
|
Description-Content-Type: text/markdown
|
|
26
25
|
|
|
27
26
|
# Convoviz 📊: Visualize your entire ChatGPT data
|
|
28
27
|
|
|
29
|
-
Convert your ChatGPT history into well-formatted Markdown files.
|
|
28
|
+
Convert your ChatGPT history into well-formatted Markdown files. Visualize your data with word clouds 🔡☁️ and usage graphs 📈.
|
|
30
29
|
|
|
31
30
|

|
|
32
31
|

|
|
@@ -43,29 +42,34 @@ See examples [here](demo).
|
|
|
43
42
|
|
|
44
43
|
### 1. Export Your ChatGPT Data 🗂
|
|
45
44
|
|
|
46
|
-
- Sign in at [
|
|
45
|
+
- Sign in at [chatgpt.com](https://chatgpt.com).
|
|
47
46
|
- Navigate: Profile Name (bottom left) -> **Settings** -> **Data controls** -> **Export** -> **Confirm export**.
|
|
48
47
|
- Await email from OpenAI and download the `.zip` file.
|
|
49
48
|
|
|
50
49
|
### 2. Install the tool 🛠
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
First, install [uv](https://github.com/astral-sh/uv) (if you don't have it):
|
|
52
|
+
|
|
53
|
+
MacOS / Linux:
|
|
53
54
|
|
|
54
55
|
```bash
|
|
55
|
-
|
|
56
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
Windows (PowerShell):
|
|
59
60
|
|
|
60
|
-
```
|
|
61
|
-
|
|
61
|
+
```powershell
|
|
62
|
+
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
Then install convoviz:
|
|
66
|
+
|
|
65
67
|
```bash
|
|
66
|
-
|
|
68
|
+
uv tool install "convoviz[viz]"
|
|
67
69
|
```
|
|
68
70
|
|
|
71
|
+
The `[viz]` extra includes graphs and word clouds. Skip it for a faster markdown-only install.
|
|
72
|
+
|
|
69
73
|
### 3. Run the tool 🏃♂️
|
|
70
74
|
|
|
71
75
|
Simply run the command and follow the prompts:
|
|
@@ -82,22 +86,15 @@ You can provide arguments directly to skip the prompts:
|
|
|
82
86
|
convoviz --input path/to/your/export.zip --output path/to/output/folder
|
|
83
87
|
```
|
|
84
88
|
|
|
85
|
-
##### Selective Output
|
|
89
|
+
##### Selective Output
|
|
86
90
|
|
|
87
|
-
By default,
|
|
91
|
+
By default, all outputs are generated. Use `--outputs` to pick specific ones:
|
|
88
92
|
|
|
89
93
|
```bash
|
|
90
|
-
# Generate only Markdown files (fastest)
|
|
91
|
-
convoviz --input export.zip --outputs markdown
|
|
92
|
-
|
|
93
|
-
# Generate Markdown and graphs (no word clouds)
|
|
94
94
|
convoviz --input export.zip --outputs markdown --outputs graphs
|
|
95
|
-
|
|
96
|
-
# Generate all outputs (default behavior)
|
|
97
|
-
convoviz --input export.zip --outputs markdown --outputs graphs --outputs wordclouds
|
|
98
95
|
```
|
|
99
96
|
|
|
100
|
-
In interactive mode, you'll be prompted
|
|
97
|
+
Options: `markdown`, `graphs`, `wordclouds`. In interactive mode, you'll be prompted.
|
|
101
98
|
|
|
102
99
|
##### Other Notes
|
|
103
100
|
|
|
@@ -137,12 +134,12 @@ It should(?) also work as library, so you can import and use the models and func
|
|
|
137
134
|
|
|
138
135
|
### Offline / reproducible runs
|
|
139
136
|
|
|
140
|
-
|
|
137
|
+
Word clouds use NLTK stopwords. If you're offline and NLTK data isn't installed yet, pre-download it:
|
|
141
138
|
|
|
142
139
|
```bash
|
|
143
|
-
|
|
140
|
+
python -c "import nltk; nltk.download('stopwords')"
|
|
144
141
|
```
|
|
145
142
|
|
|
146
143
|
### Bookmarklet
|
|
147
144
|
|
|
148
|
-
There
|
|
145
|
+
There's also a JavaScript bookmarklet flow under `js/` (experimental) for exporting additional conversation data outside the official ZIP export.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
convoviz/__init__.py,sha256=
|
|
1
|
+
convoviz/__init__.py,sha256=UjwkFEmRXhE-3qhsoGTG9XhtoL2cP0o4h3Sp9fcA2Ic,858
|
|
2
2
|
convoviz/__main__.py,sha256=1qiGW13_SgL7wJi8iioIN-AAHGkNGnEl5q_RcPUrI0s,143
|
|
3
|
-
convoviz/analysis/__init__.py,sha256=
|
|
3
|
+
convoviz/analysis/__init__.py,sha256=1dHjnw88mepSY3Q3U8lEvSqkuWPtkzpyYMgq0CIWoXk,654
|
|
4
4
|
convoviz/analysis/graphs.py,sha256=4uGxVVnbDnBODPlu3g9jZPl6X3JEb4Ri1jXEekhV7-8,29681
|
|
5
5
|
convoviz/analysis/wordcloud.py,sha256=tWQolVTILw40DXLDw6m7O8blDUBRrNG1FqRBA95ISEA,5844
|
|
6
6
|
convoviz/assets/colormaps.txt,sha256=59TSGz428AxY14AEvymAH2IJ2RT9Mlp7Sy0N12NEdXQ,108
|
|
@@ -49,13 +49,13 @@ convoviz/models/collection.py,sha256=L658yKMNC6IZrfxYxZBe-oO9COP_bzVfRznnNon7tfU
|
|
|
49
49
|
convoviz/models/conversation.py,sha256=ssx1Z6LM9kJIx3OucQW8JVoAc8zCdxj1iOLtie2B3ak,5678
|
|
50
50
|
convoviz/models/message.py,sha256=0CJ9hJ1rQiesn1SgHqFgEgKUgS7XAPGtSunQl5q8Pl4,8316
|
|
51
51
|
convoviz/models/node.py,sha256=1vBAtKVscYsUBDnKAOyLxuZaK9KoVF1dFXiKXRHxUnY,1946
|
|
52
|
-
convoviz/pipeline.py,sha256=
|
|
52
|
+
convoviz/pipeline.py,sha256=ClOazQRiOnf4TKogoR1YLam1w7n4k6tznLrEOaB0u8M,6376
|
|
53
53
|
convoviz/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
54
|
convoviz/renderers/__init__.py,sha256=IQgwD9NqtUgbS9zwyPBNZbBIZcFrbZ9C7WMAV-X3Xdg,261
|
|
55
55
|
convoviz/renderers/markdown.py,sha256=55PACkd-F0mmBXWXQ5SrfJr3UNrK_z2spQnePdk1UsQ,7849
|
|
56
56
|
convoviz/renderers/yaml.py,sha256=XG1s4VhDdx-TiqekTkgED87RZ1lVQ7IwrbA-sZHrs7k,4056
|
|
57
57
|
convoviz/utils.py,sha256=IQEKYHhWOnYxlr4GwAHoquG0BXTlVRkORL80oUSaIeQ,3417
|
|
58
|
-
convoviz-0.3.
|
|
59
|
-
convoviz-0.3.
|
|
60
|
-
convoviz-0.3.
|
|
61
|
-
convoviz-0.3.
|
|
58
|
+
convoviz-0.3.2.dist-info/WHEEL,sha256=XV0cjMrO7zXhVAIyyc8aFf1VjZ33Fen4IiJk5zFlC3g,80
|
|
59
|
+
convoviz-0.3.2.dist-info/entry_points.txt,sha256=HYsmsw5vt36yYHB05uVU48AK2WLkcwshly7m7KKuZMY,54
|
|
60
|
+
convoviz-0.3.2.dist-info/METADATA,sha256=tU6PUYA9oaH9stGsmhq404ba7uWbD8-mJJ0s_dYERMs,4930
|
|
61
|
+
convoviz-0.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|