mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-06 21:01:53 +02:00
Issue #24: fix script command.
This commit is contained in:
parent
079a04afdf
commit
42040c8082
2 changed files with 5 additions and 2 deletions
|
@ -71,7 +71,7 @@ If tag is drawable it is displayed using icon combination and colors. All icons
|
|||
|
||||
Feel free to request new icons via issues for whatever you want to see on the map. No matter how frequently the tag is used in OpenStreetMap since final goal is to cover all tags. However, common used tags have priority, other things being equal.
|
||||
|
||||
Generate icon grid and individual icons with `python roentgen.py icons`. It will create `icon_grid.svg` file, and SVG files in `icon_set/ids` directory where files are named using shape identifiers (e.g. `power_tower_portal_2_level.svg`) and in `icon_set/names` directory where files are named using shape names (e.g. `Röntgen portal two-level transmission tower.svg`). Files from the last directory are used in OpenStreetMap wiki (e.g. [`File:R%C3%B6ntgen_portal_two-level_transmission_tower.svg`](https://wiki.openstreetmap.org/wiki/File:R%C3%B6ntgen_portal_two-level_transmission_tower.svg)).
|
||||
Generate icon grid and individual icons with `python roentgen.py icons`. It will create `icon_grid.svg` file, and SVG files in `icon_set/ids` directory where files are named using shape identifiers (e.g. `power_tower_portal_2_level.svg`) and in `icon_set/names` directory where files are named using shape names (e.g. `Röntgen portal two-level transmission tower.svg`). Files from the last directory are used in OpenStreetMap wiki (e.g. [`File:Röntgen_portal_two-level_transmission_tower.svg`](https://wiki.openstreetmap.org/wiki/File:R%C3%B6ntgen_portal_two-level_transmission_tower.svg)).
|
||||
|
||||
### Icon combination ###
|
||||
|
||||
|
|
|
@ -165,13 +165,16 @@ def draw_icons() -> None:
|
|||
individual SVG files.
|
||||
"""
|
||||
os.makedirs("icon_set", exist_ok=True)
|
||||
os.makedirs("icon_set/ids", exist_ok=True)
|
||||
os.makedirs("icon_set/names", exist_ok=True)
|
||||
scheme: Scheme = Scheme(Path("scheme/default.yml"))
|
||||
extractor: ShapeExtractor = ShapeExtractor(
|
||||
Path("icons/icons.svg"), Path("icons/config.json")
|
||||
)
|
||||
collection: IconCollection = IconCollection.from_scheme(scheme, extractor)
|
||||
collection.draw_grid(Path("icon_grid.svg"))
|
||||
collection.draw_icons(Path("icon_set"))
|
||||
collection.draw_icons(Path("icon_set/ids"))
|
||||
collection.draw_icons(Path("icon_set/names"), by_name=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue