convoviz 0.3.9__tar.gz → 0.4.0__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 (61) hide show
  1. {convoviz-0.3.9 → convoviz-0.4.0}/PKG-INFO +10 -16
  2. {convoviz-0.3.9 → convoviz-0.4.0}/README.md +8 -14
  3. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/logging_config.py +16 -24
  4. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/pipeline.py +2 -2
  5. {convoviz-0.3.9 → convoviz-0.4.0}/pyproject.toml +2 -2
  6. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/__init__.py +0 -0
  7. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/__main__.py +0 -0
  8. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/analysis/__init__.py +0 -0
  9. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/analysis/graphs.py +1 -1
  10. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/analysis/wordcloud.py +1 -1
  11. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/colormaps.txt +0 -0
  12. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/AmaticSC-Regular.ttf +0 -0
  13. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/ArchitectsDaughter-Regular.ttf +0 -0
  14. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/BebasNeue-Regular.ttf +0 -0
  15. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Borel-Regular.ttf +0 -0
  16. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Courgette-Regular.ttf +0 -0
  17. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/CroissantOne-Regular.ttf +0 -0
  18. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Handjet-Regular.ttf +0 -0
  19. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/IndieFlower-Regular.ttf +0 -0
  20. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Kalam-Regular.ttf +0 -0
  21. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Lobster-Regular.ttf +0 -0
  22. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/MartianMono-Regular.ttf +0 -0
  23. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/MartianMono-Thin.ttf +0 -0
  24. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Montserrat-Regular.ttf +0 -0
  25. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Mooli-Regular.ttf +0 -0
  26. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Pacifico-Regular.ttf +0 -0
  27. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/PlayfairDisplay-Regular.ttf +0 -0
  28. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Raleway-Regular.ttf +0 -0
  29. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/RobotoMono-Regular.ttf +0 -0
  30. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/RobotoMono-Thin.ttf +0 -0
  31. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/RobotoSlab-Regular.ttf +0 -0
  32. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/RobotoSlab-Thin.ttf +0 -0
  33. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Ruwudu-Regular.ttf +0 -0
  34. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Sacramento-Regular.ttf +0 -0
  35. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/SedgwickAveDisplay-Regular.ttf +0 -0
  36. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/ShadowsIntoLight-Regular.ttf +0 -0
  37. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/TitilliumWeb-Regular.ttf +0 -0
  38. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Yellowtail-Regular.ttf +0 -0
  39. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/YsabeauOffice-Regular.ttf +0 -0
  40. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/YsabeauSC-Regular.ttf +0 -0
  41. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/YsabeauSC-Thin.ttf +0 -0
  42. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/fonts/Zeyada-Regular.ttf +0 -0
  43. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/assets/stopwords.txt +0 -0
  44. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/cli.py +2 -2
  45. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/config.py +0 -0
  46. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/exceptions.py +0 -0
  47. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/interactive.py +1 -1
  48. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/io/__init__.py +0 -0
  49. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/io/assets.py +1 -1
  50. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/io/loaders.py +1 -1
  51. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/io/writers.py +1 -1
  52. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/models/__init__.py +0 -0
  53. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/models/collection.py +0 -0
  54. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/models/conversation.py +0 -0
  55. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/models/message.py +0 -0
  56. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/models/node.py +0 -0
  57. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/py.typed +0 -0
  58. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/renderers/__init__.py +0 -0
  59. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/renderers/markdown.py +0 -0
  60. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/renderers/yaml.py +0 -0
  61. {convoviz-0.3.9 → convoviz-0.4.0}/convoviz/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: convoviz
3
- Version: 0.3.9
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/chatgpt-history-export-to-md
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
- First, install [uv](https://github.com/astral-sh/uv) (if you don't have it):
48
+ One command to install everything:
49
49
 
50
- MacOS / Linux:
50
+ **Linux / macOS:**
51
51
 
52
52
  ```bash
53
- curl -LsSf https://astral.sh/uv/install.sh | sh
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
- powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
59
+ irm https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.ps1 | iex
60
60
  ```
61
61
 
62
- Then install convoviz:
62
+ This installs [uv](https://github.com/astral-sh/uv) (if needed) and convoviz with graphs and word clouds.
63
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
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/chatgpt-history-export-to-md/issues))
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
 
@@ -20,29 +20,23 @@ See examples [here](demo).
20
20
 
21
21
  ### 2. Install the tool 🛠
22
22
 
23
- First, install [uv](https://github.com/astral-sh/uv) (if you don't have it):
23
+ One command to install everything:
24
24
 
25
- MacOS / Linux:
25
+ **Linux / macOS:**
26
26
 
27
27
  ```bash
28
- curl -LsSf https://astral.sh/uv/install.sh | sh
28
+ curl -fsSL https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.sh | bash
29
29
  ```
30
30
 
31
- Windows:
31
+ **Windows (PowerShell):**
32
32
 
33
33
  ```powershell
34
- powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
34
+ irm https://raw.githubusercontent.com/mohamed-chs/convoviz/main/install.ps1 | iex
35
35
  ```
36
36
 
37
- Then install convoviz:
37
+ This installs [uv](https://github.com/astral-sh/uv) (if needed) and convoviz with graphs and word clouds.
38
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
39
+ #### Alternative: pip
46
40
 
47
41
  ```bash
48
42
  python3 -m venv .venv
@@ -100,7 +94,7 @@ And that's it! After running the script, head over to the output folder to see y
100
94
 
101
95
  I hope you find this tool useful. I'm continuously looking to improve on this, but I need your help for that.
102
96
 
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))
97
+ 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))
104
98
 
105
99
  And if you've had a great experience, consider giving the project a star ⭐. It keeps me motivated and helps others discover it!
106
100
 
@@ -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.0"
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"]
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