-
Notifications
You must be signed in to change notification settings - Fork 94
Description
In addition to glyph_urls remote sources and glyphs embedded SVGs, it'd be useful to be able to load SVGs from the local filesystem.
While you could probably pass file:// URLs to glyph_urls (untested), this would only support absolute paths and would still be cached in the same way as remote SVG files.
Motivation
This would be useful to enable users to define a config that has no online dependencies (at runtime), allowing tools like nix to run keymap-drawer during a "pure" build step.
Currently this is only possible if all icons are defined in the yaml config via glyphs.
Implementation
Perhaps allow glyph_urls to also accept path values? Alternatively introduce a new glyph_paths or glyph_dirs to avoid confusion.
It may also be useful to load specific files. One approach might be to allow glyphs to also support path values. Again, this could be a new option (glyph_files?) if preferred.
Relative paths should be resolved relative to the config file, not the current working directory.
SVGs loaded from the local filesystem shouldn't be cached, regardless of use_local_cache.