Compare commits
2 Commits
5b343b68cf
...
d91440aded
| Author | SHA1 | Date | |
|---|---|---|---|
|
d91440aded
|
|||
|
a569bb6206
|
@@ -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" }
|
||||
|
||||
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user