mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-26 06:22:13 +03:00
add skeleton for new Nominatim executables
This commit is contained in:
parent
a74e736283
commit
612fd50612
@ -111,6 +111,17 @@ if (BUILD_IMPORTER)
|
|||||||
configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl
|
||||||
${PROJECT_BINARY_DIR}/utils/${script_source})
|
${PROJECT_BINARY_DIR}/utils/${script_source})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
set(NOMINATIM_TOOLS
|
||||||
|
setup
|
||||||
|
update
|
||||||
|
admin
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach (tool_name ${NOMINATIM_TOOLS})
|
||||||
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/tool.tmpl
|
||||||
|
${PROJECT_BINARY_DIR}/nominatim-${tool_name})
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
11
cmake/tool.tmpl
Executable file
11
cmake/tool.tmpl
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import sys
|
||||||
|
|
||||||
|
sys.path.insert(1, '@CMAKE_SOURCE_DIR@')
|
||||||
|
|
||||||
|
from nominatim import tools
|
||||||
|
|
||||||
|
tools.@tool_name@(module_dir='@CMAKE_BINARY_DIR@/module',
|
||||||
|
osm2pgsql_path='@CMAKE_BINARY_DIR@/osm2pgsql/osm2pgsql',
|
||||||
|
phplib_dir='@CMAKE_SOURCE_DIR@/lib',
|
||||||
|
data_dir='@CMAKE_SOURCE_DIR@')
|
0
nominatim/__init__.py
Normal file
0
nominatim/__init__.py
Normal file
14
nominatim/tools.py
Normal file
14
nominatim/tools.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
"""
|
||||||
|
Provides the fronting for the Nominatim tools, command line and environment
|
||||||
|
parsing.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def setup(**kwargs):
|
||||||
|
print("Functions for creating a Nominatim database and importing data.")
|
||||||
|
|
||||||
|
def update(**kwargs):
|
||||||
|
print("Functions for updating a Nominatim database.")
|
||||||
|
|
||||||
|
def admin(**kwargs):
|
||||||
|
print("Functions for maintaining a Nomiantim database.")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user