convoviz 0.3.9__py3-none-any.whl → 0.4.0__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/analysis/graphs.py +1 -1
- convoviz/analysis/wordcloud.py +1 -1
- convoviz/cli.py +2 -2
- convoviz/interactive.py +1 -1
- convoviz/io/assets.py +1 -1
- convoviz/io/loaders.py +1 -1
- convoviz/io/writers.py +1 -1
- convoviz/logging_config.py +16 -24
- convoviz/pipeline.py +2 -2
- {convoviz-0.3.9.dist-info → convoviz-0.4.0.dist-info}/METADATA +10 -16
- {convoviz-0.3.9.dist-info → convoviz-0.4.0.dist-info}/RECORD +13 -13
- {convoviz-0.3.9.dist-info → convoviz-0.4.0.dist-info}/WHEEL +1 -1
- {convoviz-0.3.9.dist-info → convoviz-0.4.0.dist-info}/entry_points.txt +0 -0
convoviz/analysis/graphs.py
CHANGED
|
@@ -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
|
convoviz/analysis/wordcloud.py
CHANGED
|
@@ -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
|
convoviz/cli.py
CHANGED
|
@@ -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,
|
convoviz/interactive.py
CHANGED
|
@@ -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
|
convoviz/io/assets.py
CHANGED
convoviz/io/loaders.py
CHANGED
convoviz/io/writers.py
CHANGED
|
@@ -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
|
|
convoviz/logging_config.py
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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)
|
|
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
|
convoviz/pipeline.py
CHANGED
|
@@ -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/
|
|
183
|
+
"➡️ https://github.com/mohamed-chs/convoviz 🔗\n\n"
|
|
184
184
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: convoviz
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
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
|
|
@@ -19,7 +19,7 @@ Requires-Dist: typer>=0.21.0
|
|
|
19
19
|
Requires-Dist: nltk>=3.9.2 ; extra == 'viz'
|
|
20
20
|
Requires-Dist: wordcloud>=1.9.5 ; extra == 'viz'
|
|
21
21
|
Requires-Python: >=3.12
|
|
22
|
-
Project-URL: Repository, https://github.com/mohamed-chs/
|
|
22
|
+
Project-URL: Repository, https://github.com/mohamed-chs/convoviz
|
|
23
23
|
Provides-Extra: viz
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
|
|
@@ -45,29 +45,23 @@ See examples [here](demo).
|
|
|
45
45
|
|
|
46
46
|
### 2. Install the tool 🛠
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
One command to install everything:
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
**Linux / macOS:**
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
curl -
|
|
53
|
+
curl -fsSL https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.sh | bash
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Windows
|
|
56
|
+
**Windows (PowerShell):**
|
|
57
57
|
|
|
58
58
|
```powershell
|
|
59
|
-
|
|
59
|
+
irm https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.ps1 | iex
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
This installs [uv](https://github.com/astral-sh/uv) (if needed) and convoviz with graphs and word clouds.
|
|
63
63
|
|
|
64
|
-
|
|
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
|
|
64
|
+
#### Alternative: pip
|
|
71
65
|
|
|
72
66
|
```bash
|
|
73
67
|
python3 -m venv .venv
|
|
@@ -125,7 +119,7 @@ And that's it! After running the script, head over to the output folder to see y
|
|
|
125
119
|
|
|
126
120
|
I hope you find this tool useful. I'm continuously looking to improve on this, but I need your help for that.
|
|
127
121
|
|
|
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/
|
|
122
|
+
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/convoviz/issues))
|
|
129
123
|
|
|
130
124
|
And if you've had a great experience, consider giving the project a star ⭐. It keeps me motivated and helps others discover it!
|
|
131
125
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
convoviz/__init__.py,sha256=UjwkFEmRXhE-3qhsoGTG9XhtoL2cP0o4h3Sp9fcA2Ic,858
|
|
2
2
|
convoviz/__main__.py,sha256=1qiGW13_SgL7wJi8iioIN-AAHGkNGnEl5q_RcPUrI0s,143
|
|
3
3
|
convoviz/analysis/__init__.py,sha256=1dHjnw88mepSY3Q3U8lEvSqkuWPtkzpyYMgq0CIWoXk,654
|
|
4
|
-
convoviz/analysis/graphs.py,sha256=
|
|
5
|
-
convoviz/analysis/wordcloud.py,sha256=
|
|
4
|
+
convoviz/analysis/graphs.py,sha256=OGLkyKx9Fq7r4jK-A46oy1NWttQ5F2MLxO4mfW6wkfc,29796
|
|
5
|
+
convoviz/analysis/wordcloud.py,sha256=3MfBg_Aq7-nz0Zc-FhkxEvTljImIQU0rmXZv81WUBDM,6178
|
|
6
6
|
convoviz/assets/colormaps.txt,sha256=59TSGz428AxY14AEvymAH2IJ2RT9Mlp7Sy0N12NEdXQ,108
|
|
7
7
|
convoviz/assets/fonts/AmaticSC-Regular.ttf,sha256=83clh7a3urnTLud0_yZofuIb6BdyC2LMI9jhE6G2LvU,142696
|
|
8
8
|
convoviz/assets/fonts/ArchitectsDaughter-Regular.ttf,sha256=fnrj5_N_SlY2Lj3Ehqz5aKECPZVJlJAflgsOU94_qIM,37756
|
|
@@ -36,27 +36,27 @@ convoviz/assets/fonts/YsabeauSC-Regular.ttf,sha256=G4lkq34KKqZOaoomtxFz_KlwVmxg5
|
|
|
36
36
|
convoviz/assets/fonts/YsabeauSC-Thin.ttf,sha256=hZGOZNTRrxbiUPE2VDeLbtnaRwkMOBaVQbq7Fwx-34c,116932
|
|
37
37
|
convoviz/assets/fonts/Zeyada-Regular.ttf,sha256=fKhkrp9VHt_3Aw8JfkfkPeC2j3CilLWuPUudzBeawPQ,57468
|
|
38
38
|
convoviz/assets/stopwords.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
39
|
-
convoviz/cli.py,sha256=
|
|
39
|
+
convoviz/cli.py,sha256=vD4SnS3xthKwNBniWNUy9x1maloBs-xRgcsPHfXzwm4,4888
|
|
40
40
|
convoviz/config.py,sha256=qo4JPkJRx1UgvVN_x-XmycxdjU9XwPlqoZWJLsDMSAs,3592
|
|
41
41
|
convoviz/exceptions.py,sha256=bQpIKls48uOQpagEJAxpXf5LF7QoagRRfbD0MjWC7Ak,1476
|
|
42
|
-
convoviz/interactive.py,sha256=
|
|
42
|
+
convoviz/interactive.py,sha256=Xq55VJJ4OQ9NlY4nlb2NRLzxmA5-ot521N8tGqyPix4,8691
|
|
43
43
|
convoviz/io/__init__.py,sha256=y70TYypJ36_kaEA04E2wa1EDaKQVjprKItoKR6MMs4M,471
|
|
44
|
-
convoviz/io/assets.py,sha256=
|
|
45
|
-
convoviz/io/loaders.py,sha256=
|
|
46
|
-
convoviz/io/writers.py,sha256
|
|
47
|
-
convoviz/logging_config.py,sha256=
|
|
44
|
+
convoviz/io/assets.py,sha256=5zcZPlQa9niDw9o-sqJIKgLc0OJ9auzd6KAve5WfBkQ,3459
|
|
45
|
+
convoviz/io/loaders.py,sha256=SqmBWUBqT5lsCf01yy-FUhwIxbiKTFMQnj4k213DsGI,5891
|
|
46
|
+
convoviz/io/writers.py,sha256=-HTvj7D9sqM8M-RsGwd44AquxCVmcDVHgta22QlfNzU,7068
|
|
47
|
+
convoviz/logging_config.py,sha256=PRuOKij8UD6sKdg3lAsu9lUsTUZ3O6_6uffnyg07M1U,2060
|
|
48
48
|
convoviz/models/__init__.py,sha256=6gAfrk6KJT2QxdvX_v15mUdfIqEw1xKxwQlKSfyA5eI,532
|
|
49
49
|
convoviz/models/collection.py,sha256=L658yKMNC6IZrfxYxZBe-oO9COP_bzVfRznnNon7tfU,4467
|
|
50
50
|
convoviz/models/conversation.py,sha256=ssx1Z6LM9kJIx3OucQW8JVoAc8zCdxj1iOLtie2B3ak,5678
|
|
51
51
|
convoviz/models/message.py,sha256=0CJ9hJ1rQiesn1SgHqFgEgKUgS7XAPGtSunQl5q8Pl4,8316
|
|
52
52
|
convoviz/models/node.py,sha256=1vBAtKVscYsUBDnKAOyLxuZaK9KoVF1dFXiKXRHxUnY,1946
|
|
53
|
-
convoviz/pipeline.py,sha256=
|
|
53
|
+
convoviz/pipeline.py,sha256=1kLtsNDN3LYNudyPBlyKwQZ8zWCmRKveP3VWfIgichw,6765
|
|
54
54
|
convoviz/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
convoviz/renderers/__init__.py,sha256=IQgwD9NqtUgbS9zwyPBNZbBIZcFrbZ9C7WMAV-X3Xdg,261
|
|
56
56
|
convoviz/renderers/markdown.py,sha256=55PACkd-F0mmBXWXQ5SrfJr3UNrK_z2spQnePdk1UsQ,7849
|
|
57
57
|
convoviz/renderers/yaml.py,sha256=XG1s4VhDdx-TiqekTkgED87RZ1lVQ7IwrbA-sZHrs7k,4056
|
|
58
58
|
convoviz/utils.py,sha256=IQEKYHhWOnYxlr4GwAHoquG0BXTlVRkORL80oUSaIeQ,3417
|
|
59
|
-
convoviz-0.
|
|
60
|
-
convoviz-0.
|
|
61
|
-
convoviz-0.
|
|
62
|
-
convoviz-0.
|
|
59
|
+
convoviz-0.4.0.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
|
|
60
|
+
convoviz-0.4.0.dist-info/entry_points.txt,sha256=HYsmsw5vt36yYHB05uVU48AK2WLkcwshly7m7KKuZMY,54
|
|
61
|
+
convoviz-0.4.0.dist-info/METADATA,sha256=3bFkn8R1Onbowe0MxMFUiUzXsrzxOEF_Fenlm1ssZQQ,4958
|
|
62
|
+
convoviz-0.4.0.dist-info/RECORD,,
|
|
File without changes
|