feat(weather): new weather icons
This commit is contained in:
22
static/src/lib/weather-icons/build.py
Normal file
22
static/src/lib/weather-icons/build.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from pathlib import Path
|
||||
from string import Template
|
||||
|
||||
LIST_ITEM = Template(
|
||||
""".$name {
|
||||
mask-image: url(./svg/$name.svg);
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
def generate():
|
||||
work_dir = Path(__file__).parent
|
||||
data = ""
|
||||
for item in (work_dir / "svg").glob("*.svg"):
|
||||
data += LIST_ITEM.substitute({"name": item.stem})
|
||||
target = work_dir / "classes-list.scss"
|
||||
target.write_text(data)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate()
|
||||
Reference in New Issue
Block a user