Issue #63: add options for MapCSS generation.

This commit is contained in:
Sergey Vartanov 2021-08-15 09:55:46 +03:00
parent e5671fcf8f
commit 87facc7299
6 changed files with 114 additions and 65 deletions

View file

@ -31,7 +31,7 @@ def parse_options(args) -> argparse.Namespace:
render = subparser.add_parser("render")
subparser.add_parser("icons")
subparser.add_parser("mapcss")
mapcss = subparser.add_parser("mapcss")
subparser.add_parser("taginfo")
tile = subparser.add_parser("tile")
element = subparser.add_parser("element")
@ -41,6 +41,7 @@ def parse_options(args) -> argparse.Namespace:
add_tile_arguments(tile)
add_server_arguments(server)
add_element_arguments(element)
add_mapcss_arguments(mapcss)
arguments: argparse.Namespace = parser.parse_args(args[1:])
@ -171,6 +172,27 @@ def add_render_arguments(render) -> None:
)
def add_mapcss_arguments(mapcss) -> None:
mapcss.add_argument(
"--icons",
action=argparse.BooleanOptionalAction,
default=True,
help="add icons for nodes and areas",
)
mapcss.add_argument(
"--ways",
action=argparse.BooleanOptionalAction,
default=True,
help="add style for ways and relations",
)
mapcss.add_argument(
"--lifecycle",
action=argparse.BooleanOptionalAction,
default=True,
help="add icons for lifecycle tags",
)
def progress_bar(
number: int, total: int, length: int = 20, step: int = 1000, text: str = ""
) -> None: