From c7a85b2278b91e01ad56aa1bcc8fc16b46eb75f7 Mon Sep 17 00:00:00 2001
From: Bjorn Lammers
Date: Sun, 16 Apr 2023 15:30:48 +0200
Subject: [PATCH] :twisted_rightwards_arrows: Final merge into main (#364)
(#367)
Co-authored-by: Bjorn Lammers
Co-authored-by: Prakash Palanisamy
Co-authored-by: Prakash Palanisamy <51423001+itsprakashp@users.noreply.github.com>
Co-authored-by: Dashboard Icons Bot
---
.github/workflows/_readme_generator.yml | 8 ++++----
ICONS.md | 21 +++++++++++++++++++++
README.md | 13 ++++++++-----
_ICONS_TEMPLATE.md | 20 ++++++++++++++++++++
_ci.py | 10 +++++-----
5 files changed, 58 insertions(+), 14 deletions(-)
create mode 100644 ICONS.md
create mode 100644 _ICONS_TEMPLATE.md
diff --git a/.github/workflows/_readme_generator.yml b/.github/workflows/_readme_generator.yml
index c45153b6..c44d9a91 100644
--- a/.github/workflows/_readme_generator.yml
+++ b/.github/workflows/_readme_generator.yml
@@ -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
diff --git a/ICONS.md b/ICONS.md
new file mode 100644
index 00000000..c9a68a44
--- /dev/null
+++ b/ICONS.md
@@ -0,0 +1,21 @@
+
+
🟣 Dashboard Icons
+
+
+
+
+
+
+ 🚀 The best place to find icons for your dashboards.
+
+ ⬅️ Back to repo • 🙌🏻 Donate
+
+
+
+
+
+
diff --git a/README.md b/README.md
index ac856a34..8858f18a 100644
--- a/README.md
+++ b/README.md
@@ -59,11 +59,14 @@ $ wget https://raw.githubusercontent.com/walkxcode/dashboard-icons/master/png/ex
```
## 🎨 Icons
-
- Click to display all icons 👀
-
-
-
+**⚠️ Warning!** Going to this page will load every single icon in the repository. This might cause:
+- 📉 An excessive amount of data use.
+- 💻 System slowdowns.
+ - 🌐 Browser crashes.
+
+*If your device cannot handle loading more than 1000 images, we advice to not go to this page.*
+
+➡️ Click [**here**](ICONS.md) to display all icons.
## 🎉 Contributing Guidelines
Please read the [Contributing Guidelines](CONTRIBUTING.md) before contributing to this project.
diff --git a/_ICONS_TEMPLATE.md b/_ICONS_TEMPLATE.md
new file mode 100644
index 00000000..b1a04b15
--- /dev/null
+++ b/_ICONS_TEMPLATE.md
@@ -0,0 +1,20 @@
+
+
🟣 Dashboard Icons
+
+
+
+
+
+
+ 🚀 The best place to find icons for your dashboards.
+
+ ⬅️ Back to repo • 🙌🏻 Donate
+
+
+
+
+
+
+
+
+
diff --git a/_ci.py b/_ci.py
index 3feb22de..d0efaa23 100644
--- a/_ci.py
+++ b/_ci.py
@@ -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 ""
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.")