Skip to content

Commit

Permalink
🔀 Final merge into main (Lissy93#364) (Lissy93#367)
Browse files Browse the repository at this point in the history
Co-authored-by: Bjorn Lammers <[email protected]>
Co-authored-by: Prakash Palanisamy <[email protected]>
Co-authored-by: Prakash Palanisamy <[email protected]>
Co-authored-by: Dashboard Icons Bot <[email protected]>
  • Loading branch information
4 people authored Apr 16, 2023
1 parent 65be446 commit c7a85b2
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/_readme_generator.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🚀 Generates README
name: 🚀 Generates ICONS

on:
push:
Expand All @@ -17,16 +17,16 @@ 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: |-
git diff
git config --global user.email "[email protected]"
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 changes: 21 additions & 0 deletions ICONS.md

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions README.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions _ICONS_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 5 deletions _ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
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):
Expand All @@ -15,7 +15,7 @@ def generate_img_tag(file):
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:
Expand All @@ -25,8 +25,8 @@ def generate_img_tag(file):
# 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.")

0 comments on commit c7a85b2

Please sign in to comment.