1
0
Fork 0

🔀 Final merge into main (#364) (#367)

Co-authored-by: Bjorn Lammers <walkxnl@gmail.com>
Co-authored-by: Prakash Palanisamy <prakash_gitea@itsprakash.in>
Co-authored-by: Prakash Palanisamy <51423001+itsprakashp@users.noreply.github.com>
Co-authored-by: Dashboard Icons Bot <noreply@walkx.fyi>
This commit is contained in:
Bjorn Lammers 2023-04-16 15:30:48 +02:00 committed by GitHub
parent 65be446af5
commit c7a85b2278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 14 deletions

View File

@ -1,4 +1,4 @@
name: 🚀 Generates README
name: 🚀 Generates ICONS
on:
push:
@ -17,10 +17,10 @@ jobs:
python-version: "3.9"
architecture: "x64"
- name: Readme Generator
- name: ICONS Generator
run: |-
python _ci.py
cat README.md
cat ICONS.md
- name: Load to GitHub
run: |-
@ -28,5 +28,5 @@ jobs:
git config --global user.email "noreply@walkx.fyi"
git config --global user.name "Dashboard Icons Bot"
git add -A
git commit -m "🚀 Generates README" || exit 0
git commit -m "🚀 Generates ICONS" || exit 0
git push

21
ICONS.md Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

20
_ICONS_TEMPLATE.md Normal file
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>

10
_ci.py
View File

@ -2,8 +2,8 @@ import pathlib
from pathlib import Path
root = pathlib.Path(__file__).parent.resolve()
template_path = root / "_TEMPLATE.md"
readme_path = root / "README.md"
icons_template_path = root / "_ICONS_TEMPLATE.md"
icons_path = root / "ICONS.md"
def generate_img_tag(file):
@ -15,7 +15,7 @@ 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:
with open(icons_template_path, "r", encoding="UTF-8") as f:
lines = f.readlines()
# Find the line that starts with "<!-- ICONS -->"
for line in lines:
@ -25,8 +25,8 @@ for line in lines:
# Insert the icons after the line
lines.insert(line_number + 1, " ".join(img_tags))
# Write the new file
with open(readme_path, "w", encoding="UTF-8") as f:
with open(icons_path, "w", encoding="UTF-8") as f:
f.write("".join(lines))
f.write("\n")
print("Done!")
print("Please commit the new README.md file.")
print("Please commit the new ICONS.md file.")