fix(config): Add missing defaults

This commit is contained in:
Daniel S. 2019-10-23 11:28:32 +02:00
parent 38acfc7e78
commit 30dbd24bf4
2 changed files with 9 additions and 6 deletions

View File

@ -16,7 +16,7 @@ from _ed_lrr import find_sys
CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
stars_path = os.path.join(cfg["folders.data_dir"], "stars.csv")
for folder in cfg["history.out_path"]:
for folder in cfg["history.stars_csv_path"]:
file = os.path.join(folder, "stars.csv")
if os.path.isfile(file):
stars_path = file

View File

@ -11,22 +11,22 @@ config_file.touch()
cfg = profig.Config(str(config_file), strict=True)
cfg.init("history.bodies_url", [], "path_list", comment="history of bodies.json urls")
cfg.init("history.systems_url", [], "path_list", comment="history of systems.json urls")
cfg.init("history.bodies_url", ["https://www.edsm.net/dump/bodies.json"], "path_list", comment="history of bodies.json urls")
cfg.init("history.systems_url", ["https://www.edsm.net/dump/systemsWithCoordinates.json"], "path_list", comment="history of systems.json urls")
cfg.init(
"history.bodies_path",
[],
[os.path.join(config_dir, "data","bodies.json")],
"path_list",
comment="history of bodies.json download paths",
)
cfg.init(
"history.systems_path",
[],
[os.path.join(config_dir, "data","systemsWithCoordinates.json")],
"path_list",
comment="history of systems.json download paths",
)
cfg.init(
"history.stars_csv_path", [], "path_list", comment="history of paths for stars.csv"
"history.stars_csv_path", [os.path.join(config_dir, "data","stars.csv")], "path_list", comment="history of paths for stars.csv"
)
cfg.init("route.range", 7.56, comment="jump range")
cfg.init("route.primary", False, comment="only route through primary stars")
@ -40,4 +40,7 @@ cfg.init("route.prune.steps", 5, comment="number of steps before path gets prune
cfg.init("route.greediness", 0.5, comment="A* greediness")
cfg.init("folders.data_dir", os.path.join(config_dir, "data"), comment="Data directory")
cfg.init("GUI.theme", 'dark', comment="GUI theme to use")
cfg.sync()