initial
This commit is contained in:
parent
f0b748804e
commit
2e0e8ef82a
3 changed files with 75 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
from location import get_logger
|
||||
from location import get_logger, get_locations, iter_locations
|
||||
|
||||
logger = get_logger()
|
||||
|
||||
|
@ -6,5 +6,18 @@ from kython.logging import setup_logzero
|
|||
|
||||
setup_logzero(logger)
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
cmd = sys.argv[1]
|
||||
if cmd == "update_cache":
|
||||
from location import update_cache, get_locations
|
||||
update_cache()
|
||||
get_locations(cached=True)
|
||||
else:
|
||||
raise RuntimeError(f"Unknown command {cmd}")
|
||||
else:
|
||||
for p in iter_locations():
|
||||
pass
|
||||
# TODO need datetime!
|
||||
# print(p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue