diff --git a/README.md b/README.md index eaf5642..6a4a063 100644 --- a/README.md +++ b/README.md @@ -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 ### diff --git a/roentgen.py b/roentgen.py index 957ef87..f3387f9 100644 --- a/roentgen.py +++ b/roentgen.py @@ -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__":