mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-23 22:16:25 +02:00
Black and white icon border; options.
This commit is contained in:
parent
15edfc8088
commit
128ad8f8e8
3 changed files with 60 additions and 26 deletions
30
ui.py
30
ui.py
|
@ -7,6 +7,36 @@ Author: Sergey Vartanov (me@enzet.ru).
|
|||
import sys
|
||||
|
||||
|
||||
def parse_options(args):
|
||||
options = {'draw_nodes': True, 'draw_ways': False, 'overlap': 12,
|
||||
'show_missed_tags': False}
|
||||
args = iter(args[1:])
|
||||
for arg in args:
|
||||
if arg in ['-i', '--input']:
|
||||
options['input_file_name'] = next(args)
|
||||
elif arg in ['-o', '--output']:
|
||||
options['output_file_name'] = next(args)
|
||||
elif arg in ['-bbox', '--boundary-box']:
|
||||
arg = next(args)
|
||||
options['boundary_box'] = map(lambda x: float(x), arg.split(','))
|
||||
elif arg in ['-n', '--draw-nodes']:
|
||||
options['draw_nodes'] = True
|
||||
elif arg in ['-w', '--draw-ways']:
|
||||
options['draw_ways'] = True
|
||||
elif arg in ['-nn', '--no-draw-nodes']:
|
||||
options['draw_nodes'] = False
|
||||
elif arg in ['-nw', '--no-draw-ways']:
|
||||
options['draw_ways'] = False
|
||||
elif arg in ['--show-missed-tags']:
|
||||
options['show_missed_tags'] = True
|
||||
elif arg in ['--overlap']:
|
||||
options['overlap'] = int(next(args))
|
||||
else:
|
||||
print 'Unknown option: ' + arg
|
||||
return None
|
||||
return options
|
||||
|
||||
|
||||
def write_line(number, total):
|
||||
length = 20
|
||||
parts = length * 8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue