core: add __NOT_HPI_MODULE__ flag to mark utility files etc

(more of an intermediate solution perhaps)
This commit is contained in:
Dima Gerasimov 2020-09-29 15:22:30 +01:00 committed by karlicoss
parent 3b9941e9ee
commit fd41caa640
12 changed files with 48 additions and 56 deletions

View file

@ -1,24 +0,0 @@
import sys
from .takeout import logger, get_locations, iter_locations, get_groups
# TODO remove this?
def main():
if len(sys.argv) > 1:
cmd = sys.argv[1]
# TODO ok, update cache makes sense just to refresh in case of code changes...
# TODO don't even need it anymore? cachew handles this..
if cmd == "update_cache":
from .takeout import update_cache, get_locations
update_cache()
else:
raise RuntimeError(f"Unknown command {cmd}")
else:
for p in get_groups():
print(p)
# shit. ok, 4 gigs of ram is def too much for glumov...
# TODO need datetime!
if __name__ == '__main__':
main()