-
Notifications
You must be signed in to change notification settings - Fork 135
/
generate-mapping-graph
executable file
·39 lines (31 loc) · 1.2 KB
/
generate-mapping-graph
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
"""
Usage:
generate-mapping-graph <tileset-or-layer-file> <output-path> [<compare-path>] [--keep]
[--format <format>]...
generate-mapping-graph --help
generate-mapping-graph --version
<tileset-or-layer-file> If tileset file is given, will create one dir per layer
in the output directory.
<compare-path> If set, compares generated graphs with graphs that already
exist at this location, and exit with non-zero code
if they are not the same.
Options:
-k --keep If set, do not delete generated .dot file
-f --format <format> Specify which format(s) to output. [default: png]
--help Show this screen.
--version Show version.
"""
from docopt import docopt
import openmaptiles
from openmaptiles.diagram import MappingGraph
def main(args):
exit(MappingGraph(
args['<tileset-or-layer-file>'],
args['<output-path>'],
args['<compare-path>'],
not args['--keep'],
args['--format'],
).run())
if __name__ == '__main__':
main(docopt(__doc__, version=openmaptiles.__version__))