]> git.openstreetmap.org Git - nominatim.git/commitdiff
add script for in-source execution
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 18 May 2024 12:04:06 +0000 (14:04 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 26 Jun 2024 09:52:47 +0000 (11:52 +0200)
nominatim-cli.py [new file with mode: 0755]

diff --git a/nominatim-cli.py b/nominatim-cli.py
new file mode 100755 (executable)
index 0000000..1f3c121
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of Nominatim. (https://nominatim.org)
+#
+# Copyright (C) 2024 by the Nominatim developer community.
+# For a full list of authors see the git log.
+"""
+Helper script for development to run nominatim from the source directory.
+"""
+from pathlib import Path
+import sys
+
+sys.path.insert(1, str((Path(__file__) / '..' / 'src').resolve()))
+
+from nominatim_db import cli
+
+exit(cli.nominatim(module_dir=None, osm2pgsql_path=None))