dashboard icons upload
This commit is contained in:
20
dashboard-icons-main/config/TEMPLATE.md
Normal file
20
dashboard-icons-main/config/TEMPLATE.md
Normal 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>
|
BIN
dashboard-icons-main/config/banner.png
Normal file
BIN
dashboard-icons-main/config/banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
32
dashboard-icons-main/config/ci.py
Normal file
32
dashboard-icons-main/config/ci.py
Normal 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.")
|
BIN
dashboard-icons-main/config/logo.png
Normal file
BIN
dashboard-icons-main/config/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Reference in New Issue
Block a user