diff options
-rw-r--r-- | pyproject.toml | 1 | ||||
-rwxr-xr-x | src/osm_where.py | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml index 7b190cb..c63ec7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ license = { file="LICENSE" } readme = "README.md" dependencies = [ "OSMPythonTools", + "pyxdg", ] classifiers = [ "Programming Language :: Python :: 3", diff --git a/src/osm_where.py b/src/osm_where.py index e0b7022..52e7b9b 100755 --- a/src/osm_where.py +++ b/src/osm_where.py @@ -1,7 +1,13 @@ #!/usr/bin/env python3 import argparse + +import xdg.BaseDirectory + +from OSMPythonTools.cachingStrategy import CachingStrategy, JSON from OSMPythonTools.overpass import Overpass +CachingStrategy.use(JSON, cacheDir=xdg.BaseDirectory.save_cache_path('osm_where')) + import logging logging.getLogger("OSMPythonTools").setLevel(logging.ERROR) |