diff --git a/MANIFEST.in b/MANIFEST.in index 0dfaf882..96fc246e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ -graft localtileserver/tileserver/static -graft localtileserver/tileserver/templates +graft localtileserver/web/static +graft localtileserver/web/templates global-exclude *.pyc -graft localtileserver/tileserver/data -exclude localtileserver/tileserver/data/*.aux.xml +graft localtileserver/tiler/data +exclude localtileserver/tiler/data/*.aux.xml diff --git a/flask.env b/flask.env index 8ac42dde..1012befb 100644 --- a/flask.env +++ b/flask.env @@ -1,2 +1,2 @@ -export FLASK_APP=localtileserver/tileserver/__init__.py +export FLASK_APP=localtileserver/web/__init__.py export FLASK_ENV=development diff --git a/localtileserver/tiler/data/__init__.py b/localtileserver/tiler/data/__init__.py index dabaf321..1707a95c 100644 --- a/localtileserver/tiler/data/__init__.py +++ b/localtileserver/tiler/data/__init__.py @@ -19,7 +19,7 @@ def get_building_docs(): def get_data_path(name): if get_building_docs(): - return f"https://github.com/banesullivan/localtileserver/raw/main/localtileserver/tileserver/data/{name}" + return f"https://github.com/banesullivan/localtileserver/raw/main/localtileserver/tiler/data/{name}" else: return DIRECTORY / name diff --git a/localtileserver/tiler/utilities.py b/localtileserver/tiler/utilities.py index 7045f343..f9bda813 100644 --- a/localtileserver/tiler/utilities.py +++ b/localtileserver/tiler/utilities.py @@ -68,6 +68,7 @@ def is_geospatial(source: RasterioFileTileSource) -> bool: def get_tile_source( path: Union[pathlib.Path, str], projection: str = None, style: str = None, encoding: str = "PNG" ) -> RasterioFileTileSource: + path = get_clean_filename(path) return RasterioFileTileSource(str(path), projection=projection, style=style, encoding=encoding)