Compare commits

...

2 Commits

Author SHA1 Message Date
d91440aded chore: bump version to 0.2.0
All checks were successful
Build and Publish / build-and-publish (push) Successful in 18s
- Update project version from 0.1.0 to 0.2.0 in pyproject.toml.
- Reflects progress or new features added since the previous version.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-04-30 15:04:16 +02:00
a569bb6206 refactor(configuration): use pathlib for config path handling
- Replace `os` with `pathlib` for defining the default config path.
- Simplify configuration file path management for readability.
- Improve code maintainability by centralizing the default path.

Signed-off-by: Max P. <Mail@MPassarello.de>
2025-04-30 15:03:51 +02:00
2 changed files with 5 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
[project]
name = "pyvtt"
version = "0.1.0"
version = "0.2.0"
description = "Python Voice to Text + LLMA"
authors = [{ name = "Max P.", email = "Mail@MPassarello.de" }]
license = { text = "MIT" }

View File

@@ -1,5 +1,8 @@
import json
import os
from pathlib import Path
DEFAULT_CONFIG_PATH = Path.home() / ".pyvtt.json"
def read_configurations():
"""
@@ -13,10 +16,8 @@ def read_configurations():
Exception: If there is an error reading or parsing the JSON file,
an exception is raised with the error details.
"""
script_dir = os.path.dirname(os.path.abspath(__file__))
settings_path = os.path.join(script_dir, "pyvtt.settings.json")
try:
with open(settings_path) as f:
with open(DEFAULT_CONFIG_PATH) as f:
return json.load(f)
except Exception as e:
print(f"Error reading configurations: {e}")