Add config system with TFL_DATA_DIR and CACHE_DIR
config/default.py holds defaults using ~/lib/data/tfl (expanduser, so safe to commit). app.py loads it then overlays config/local.py if present, pushing paths into cache and circle_line modules. config/local.py is gitignored for machine-specific absolute paths (e.g. on the server where www-data runs). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c215456620
commit
cd37f0619b
6 changed files with 24 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ from datetime import datetime, timedelta
|
|||
_PAD_STOP = '9400ZZLUPAH1' # Paddington (H&C Line)
|
||||
_KXP_STOP = '9400ZZLUKSX3' # King's Cross St Pancras
|
||||
|
||||
_TXC_XML = os.path.join(os.path.dirname(__file__), 'output_txc_01CIR_.xml')
|
||||
from config.default import CIRCLE_LINE_XML as _TXC_XML # overridden by app config after import
|
||||
_NS = {'t': 'http://www.transxchange.org.uk/'}
|
||||
|
||||
# Populated on first call to next_service(); maps day-type -> sorted list of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue