- def h(s):
- return re.sub("\s\s+" , " ", s)
-
- p = ArgumentParser(description="Indexing tool for Nominatim.",
- formatter_class=RawDescriptionHelpFormatter)
-
- p.add_argument('-d', '--database',
- dest='dbname', action='store', default='nominatim',
- help='Name of the PostgreSQL database to connect to.')
- p.add_argument('-U', '--username',
- dest='user', action='store',
- help='PostgreSQL user name.')
- p.add_argument('-W', '--password',
- dest='password_prompt', action='store_true',
- help='Force password prompt.')
- p.add_argument('-H', '--host',
- dest='host', action='store',
- help='PostgreSQL server hostname or socket location.')
- p.add_argument('-P', '--port',
- dest='port', action='store',
- help='PostgreSQL server port')
- p.add_argument('-r', '--minrank',
- dest='minrank', type=int, metavar='RANK', default=0,
- help='Minimum/starting rank.')
- p.add_argument('-R', '--maxrank',
- dest='maxrank', type=int, metavar='RANK', default=30,
- help='Maximum/finishing rank.')
- p.add_argument('-t', '--threads',
- dest='threads', type=int, metavar='NUM', default=1,
- help='Number of threads to create for indexing.')
- p.add_argument('-v', '--verbose',
- dest='loglevel', action='count', default=0,
- help='Increase verbosity')
-
- return p
+ parser = ArgumentParser(description="Indexing tool for Nominatim.",
+ formatter_class=RawDescriptionHelpFormatter)
+
+ parser.add_argument('-d', '--database',
+ dest='dbname', action='store', default='nominatim',
+ help='Name of the PostgreSQL database to connect to.')
+ parser.add_argument('-U', '--username',
+ dest='user', action='store',
+ help='PostgreSQL user name.')
+ parser.add_argument('-W', '--password',
+ dest='password_prompt', action='store_true',
+ help='Force password prompt.')
+ parser.add_argument('-H', '--host',
+ dest='host', action='store',
+ help='PostgreSQL server hostname or socket location.')
+ parser.add_argument('-P', '--port',
+ dest='port', action='store',
+ help='PostgreSQL server port')
+ parser.add_argument('-b', '--boundary-only',
+ dest='boundary_only', action='store_true',
+ help='Only index administrative boundaries (ignores min/maxrank).')
+ parser.add_argument('-r', '--minrank',
+ dest='minrank', type=int, metavar='RANK', default=0,
+ help='Minimum/starting rank.')
+ parser.add_argument('-R', '--maxrank',
+ dest='maxrank', type=int, metavar='RANK', default=30,
+ help='Maximum/finishing rank.')
+ parser.add_argument('-t', '--threads',
+ dest='threads', type=int, metavar='NUM', default=1,
+ help='Number of threads to create for indexing.')
+ parser.add_argument('-v', '--verbose',
+ dest='loglevel', action='count', default=0,
+ help='Increase verbosity')
+
+ return parser