summaryrefslogtreecommitdiff
path: root/s2-index.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-11-03 01:13:49 +0100
committerJules Laplace <julescarbon@gmail.com>2018-11-03 01:13:49 +0100
commitc2f4665dbe5ff1225f90afbaf590975057dc5026 (patch)
tree48109101798b42018540deff7ac6873a067c937e /s2-index.py
parent683a20d4d29958132fd49ddaeebf3d4f672085b7 (diff)
s2 dump scripts...
Diffstat (limited to 's2-index.py')
-rw-r--r--s2-index.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/s2-index.py b/s2-index.py
deleted file mode 100644
index 779f63a5..00000000
--- a/s2-index.py
+++ /dev/null
@@ -1,24 +0,0 @@
-import click
-import ijson.backends.yajl2_cffi as ijson
-
-@click.command()
-@click.option('--index', '-n', default=0, help='Index of CSV.')
-def build_index():
- pass
-
-def index_file(fn):
- with open(fn, 'r') as f:
- parser = ijson.parse(urlopen('http://.../'))
- stream.write('<geo>')
- for prefix, event, value in parser:
- if (prefix, event) == ('earth', 'map_key'):
- stream.write('<%s>' % value)
- continent = value
- elif prefix.endswith('.name'):
- stream.write('<object name="%s"/>' % value)
- elif (prefix, event) == ('earth.%s' % continent, 'end_map'):
- stream.write('</%s>' % continent)
- stream.write('</geo>')
-
-if __name__ == '__main__':
- build_index()