mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Extract config into yaml
This commit is contained in:
13
core/config.py
Normal file
13
core/config.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
import yaml
|
||||
|
||||
# Check you have a config file
|
||||
if not os.path.isfile("config.yml"):
|
||||
logging.error("Your config file is missing. Ensure you have copied config-example.yml to config.yml and updated it according to your needs.")
|
||||
exit()
|
||||
|
||||
# Load config
|
||||
config = yaml.safe_load(open("config.yml"))
|
||||
logging.info("Loaded config.")
|
||||
@@ -4,11 +4,6 @@ from data.band import Band
|
||||
SOFTWARE_NAME = "Metaspot by M0TRT"
|
||||
SOFTWARE_VERSION = "0.1"
|
||||
|
||||
# Todo make configurable
|
||||
SERVER_OWNER_CALLSIGN = "M0TRT"
|
||||
WEB_SERVER_PORT = 8080
|
||||
MAX_SPOT_AGE_SEC = 3600
|
||||
|
||||
# Modes
|
||||
CW_MODES = ["CW"]
|
||||
PHONE_MODES = ["PHONE", "SSB", "USB", "LSB", "AM", "FM", "DV", "DMR", "DSTAR", "C4FM", "M17"]
|
||||
|
||||
Reference in New Issue
Block a user