dashboard icons upload

This commit is contained in:
boris
2023-08-10 00:23:19 +02:00
parent 1cf18d6cfb
commit 581bd43938
2085 changed files with 1176 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<p align="center">
<h2 align="center"> 🟣 Dashboard Icons </h3>
<p align="center">
<a href="https://www.jsdelivr.com/package/gh/walkxcode/dashboard-icons">
<img src="https://img.shields.io/jsdelivr/gh/hy/walkxcode/dashboard-icons?color=%23A020F0" alt="JSdelivr weekly downloads badge">
</a>
</p>
<p align="center">
🚀 The best place to find icons for your dashboards.
<br />
<a href="https://github.com/walkxcode/dashboard-icons/"><strong>⬅️ Back to repo</strong></a><a href="https://shop.walkx.fyi/l/donate" target="_blank"><strong>🙌🏻 Donate</strong></a>
<br />
<br />
</p>
</p>
<div align="center">
<!-- ICONS -->
<!-- END ICONS -->
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

@ -0,0 +1,32 @@
import pathlib
from pathlib import Path
root = pathlib.Path(__file__).parent.resolve()
template_path = root / "TEMPLATE.md"
path = root / "../ICONS.md"
def generate_img_tag(file):
return f'<img src="png/{file.name}" alt="{file.stem}" height="50">'
imgs = sorted(Path("./png").glob("*.png"))
img_tags = [generate_img_tag(x) for x in imgs]
line_number = 0
# Read the template file
with open(template_path, "r", encoding="UTF-8") as f:
lines = f.readlines()
# Find the line that starts with "<!-- ICONS -->"
for line in lines:
if line.startswith("<!-- ICONS -->"):
line_number = lines.index(line)
break
# Insert the icons after the line
lines.insert(line_number + 1, " ".join(img_tags))
# Write the new file
with open(path, "w", encoding="UTF-8") as f:
f.write("".join(lines))
f.write("\n")
print("Done!")
print("Please commit the new ICONS.md file.")

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB