configure_file(${PROJECT_SOURCE_DIR}/cmake/script.tmpl
${PROJECT_BINARY_DIR}/utils/${script_source})
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()
#-----------------------------------------------------------------------------
--- /dev/null
+#!/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@')
--- /dev/null
+"""
+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.")
+