diff --git a/src/pyvtt/configuration.py b/src/pyvtt/configuration.py index b042e9d..cdcac36 100644 --- a/src/pyvtt/configuration.py +++ b/src/pyvtt/configuration.py @@ -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}")