upgrade to python3
fixed some typos
This commit is contained in:
parent
844f77e8e8
commit
9faf11d0df
@ -1,4 +1,4 @@
|
||||
#! /usr/bin/env python
|
||||
#! /usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
'''
|
||||
@ -8,9 +8,9 @@
|
||||
The output will will be a javascript structure to be included in the
|
||||
SeisObs map service.
|
||||
|
||||
The script should be updated regulary keep the total number of all
|
||||
The script should be updated regularly keep the total number of all
|
||||
AJAX calls to the Nominatim service small, e. g. :
|
||||
curl -s "https://ariadne.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query?minlat=50&maxlat=54&minlon=3&maxlon=10&minmag=1" | mkGeolocationTable.py > geolocationTable.js
|
||||
curl -s "https://fdsnws.geophysik.ruhr-uni-bochum.de/fdsnws/event/1/query?minlat=50&maxlat=54&minlon=3&maxlon=10&minmag=1" | mkGeolocationTable.py > geolocationTable.js
|
||||
|
||||
License
|
||||
Copyright 2020 Kasper D. Fischer <kasper.fischer@rub.de>
|
||||
@ -135,18 +135,15 @@ def mkGeolocationTable(file=''):
|
||||
warnings.warn('Request {0} failed'.format(url))
|
||||
'''
|
||||
# dump json
|
||||
print 'var geolocationTable = '+JSON.dumps(geolocationTable, sort_keys=True)+';'
|
||||
print('var geolocationTable = {0};'.format(JSON.dumps(geolocationTable, sort_keys=True)))
|
||||
|
||||
# __main__
|
||||
if __name__ == "__main__":
|
||||
def printline(line):
|
||||
print line
|
||||
|
||||
# parse arguments
|
||||
import argparse
|
||||
versionText = '$Revision$ ($Date$, $Author$)'.replace('$', '').replace(':','')
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Reverese geocoding lookup of events in xml format (stdin).',
|
||||
description='Reverse geocoding lookup of events in xml format (stdin).',
|
||||
epilog=versionText)
|
||||
parser.add_argument('-v', '-V', '--version', action='version',
|
||||
version=versionText)
|
||||
|
Loading…
Reference in New Issue
Block a user