core.config.paths
- File:
EuljiroBible/core/config/paths.py
- Author:
Benjamin Jaedon Choi - https://github.com/saintbenjamin
- Affiliated Church:
The Eulji-ro Presbyterian Church [대한예수교장로회(통합) 을지로교회]
- Address:
The Eulji-ro Presbyterian Church, 24-10, Eulji-ro 20-gil, Jung-gu, Seoul 04549, South Korea
- Telephone:
+82-2-2266-3070
- E-mail:
euljirochurch [at] G.M.A.I.L. (replace [at] with @ and G.M.A.I.L as you understood.)
- License:
MIT License with Attribution Requirement (see LICENSE file for details); Copyright (c) 2025 The Eulji-ro Presbyterian Church.
Centralizes and defines file and directory paths used throughout the EuljiroBible project.
This module handles resource resolution regardless of whether the app is run from source or as a frozen PyInstaller executable. It provides standardized access to Bible data files, icon files, JSON configuration files, language translation files, logs, and settings.
- Usage scenarios include:
Loading Bible text and name metadata
Locating translation JSON files for GUI language switching
Resolving the appropriate application icon per platform
Saving and loading user settings
Logging runtime errors and memory diagnostics
- Platform-aware behaviors:
On Windows, selects .ico icons; on other systems, .svg
Dynamically computes BASE_DIR based on the runtime context
- core.config.paths.BASE_DIR = '/home/runner/work/EuljiroBible/EuljiroBible'
Absolute path to the project root directory.
This path is resolved differently depending on the execution context:
When running as a frozen PyInstaller executable, this is set to the directory containing the executable.
When running from source (CLI or GUI), this is dynamically determined by traversing upward from the current file location until a directory containing
core/is found.
All other project paths are derived from this base directory.
- core.config.paths.RESOURCE_DIR = '/home/runner/work/EuljiroBible/EuljiroBible'
Base directory for bundled resources.
When frozen (PyInstaller), this points to the extracted resource directory (
sys._MEIPASS). Otherwise, it is the same asBASE_DIR.
- core.config.paths.ICON_DIR = '/home/runner/work/EuljiroBible/EuljiroBible/gui/resources/svg'
Icon resource directory.
On Windows, this uses
.../gui/resources/icons(.icofiles). On other systems, it uses.../gui/resources/svg(.svgfiles).
- core.config.paths.BIBLE_DATA_DIR = '/home/runner/work/EuljiroBible/EuljiroBible/data'
Directory containing Bible version JSON data files (typically
data/).
- core.config.paths.JSON_DIR = '/home/runner/work/EuljiroBible/EuljiroBible/json'
Directory containing JSON configs and settings (typically
json/).
- core.config.paths.BIBLE_NAME_DIR = '/home/runner/work/EuljiroBible/EuljiroBible/json/bible'
Directory containing Bible name/version alias JSON files (typically
json/bible/).
- core.config.paths.TRANSLATION_DIR = '/home/runner/work/EuljiroBible/EuljiroBible/json/translations'
Directory containing translation JSON files (typically
json/translations/).
- core.config.paths.ICON_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/gui/resources/svg/thepck.svg'
Application icon file path.
On Windows, this is typically
thepck.ico; on other systems,thepck.svg.
- core.config.paths.SETTINGS_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/json/settings.json'
Main application settings JSON file (typically
json/settings.json).
- core.config.paths.LOG_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/error_log.txt'
Runtime error log file path (typically
BASE_DIR/error_log.txt).
- core.config.paths.MEMORY_LOG_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/memory_log.txt'
Memory diagnostics log file path (typically
BASE_DIR/memory_log.txt).
- core.config.paths.ALIASES_VERSION_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/json/bible/aliases_version.json'
GUI Bible version alias mapping JSON file.
- core.config.paths.ALIASES_VERSION_CLI_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/json/bible/aliases_version_cli.json'
CLI Bible version alias mapping JSON file (simplified aliases for CLI parsing).
- core.config.paths.ALIASES_BOOK_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/json/bible/aliases_book.json'
Book name alias mapping JSON file.
- core.config.paths.STANDARD_BOOK_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/json/bible/standard_book.json'
Canonical book list JSON file used as the standard reference.
- core.config.paths.SORT_ORDER_FILE = '/home/runner/work/EuljiroBible/EuljiroBible/json/bible/your_sort_order.json'
Custom book sort order JSON file.