mirror of
https://github.com/walkxhub/dashboard-icons.git
synced 2025-12-06 07:06:59 -05:00
Merge pull request #9 from GaaH/generate-readme
script generating the readme file based on available icons
This commit is contained in:
commit
38359774ec
14
scripts/generate_readme.py
Normal file
14
scripts/generate_readme.py
Normal file
@ -0,0 +1,14 @@
|
||||
from pathlib import Path
|
||||
|
||||
def generate_img_tag(file):
|
||||
return f'<img src="{file.name}" alt="{file.stem}" width="50">'
|
||||
|
||||
if __name__ == "__main__":
|
||||
imgs = sorted(Path(".").glob("*.png"))
|
||||
img_tags = [generate_img_tag(x) for x in imgs]
|
||||
|
||||
with open("README.md", "wt", encoding="UTF-8") as f:
|
||||
f.write("# Homer Icons\n\n")
|
||||
f.write("[Homer Dashboard](https://github.com/bastienwirtz/homer)\n\n")
|
||||
f.write(" ".join(img_tags))
|
||||
f.write("\n")
|
||||
Loading…
Reference in New Issue
Block a user