Skip to content

Commit 44d7ceb

Browse files
committed
Icon folder restructure, improved few icons, added some actions and timeline
1 parent e841aad commit 44d7ceb

File tree

379 files changed

+805
-2441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

379 files changed

+805
-2441
lines changed

.github/workflows/generate-readme.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Generate README
2+
3+
on:
4+
push:
5+
paths:
6+
- 'Icons/**'
7+
- 'readmehead.md'
8+
workflow_dispatch:
9+
10+
jobs:
11+
generate-readme:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Install dependencies
22+
run: pip install PyGithub
23+
24+
- name: Generate README
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
python - <<EOF
29+
import os
30+
import re
31+
from github import Github
32+
33+
def get_icon_url(repo, path):
34+
return f"https://github.com/{repo.full_name}/blob/main/{path}"
35+
36+
def generate_table(icons):
37+
table = "| Icon | Name | Category |\n|------|------|----------|\n"
38+
for icon in sorted(icons, key=lambda x: (x['category'], x['subcategory'], x['name'])):
39+
table += f"| ![{icon['name']}]({icon['path']}) | [{icon['name']}]({icon['url']}) | {icon['category']}/{icon['subcategory']} |\n"
40+
return table
41+
42+
# Initialize GitHub client
43+
g = Github(os.environ['GITHUB_TOKEN'])
44+
repo = g.get_repo(os.environ['GITHUB_REPOSITORY'])
45+
46+
# Get all icon files
47+
icons = []
48+
contents = repo.get_contents("Icons")
49+
while contents:
50+
file_content = contents.pop(0)
51+
if file_content.type == "dir":
52+
contents.extend(repo.get_contents(file_content.path))
53+
else:
54+
if file_content.name.endswith('.png') and '@4x' not in file_content.name:
55+
match = re.match(r'(.+)=(.+)\.png', file_content.name)
56+
if match:
57+
subcategory, name = match.groups()
58+
category = os.path.basename(os.path.dirname(file_content.path))
59+
icons.append({
60+
'name': name,
61+
'path': file_content.path,
62+
'url': get_icon_url(repo, file_content.path),
63+
'category': category,
64+
'subcategory': subcategory
65+
})
66+
67+
# Generate README content
68+
with open('readmehead.md', 'r') as f:
69+
readme_content = f.read()
70+
71+
readme_content += "\n\n## Icons\n\n"
72+
readme_content += generate_table(icons)
73+
74+
# Update README.md
75+
readme_file = repo.get_contents("README.md")
76+
repo.update_file(
77+
path="README.md",
78+
message="Update README with latest icons",
79+
content=readme_content,
80+
sha=readme_file.sha
81+
)
82+
83+
print("README.md has been updated successfully.")
84+
EOF
85+
86+
- name: Commit changes
87+
run: |
88+
git config --local user.email "action@github.com"
89+
git config --local user.name "GitHub Action"
90+
git add README.md
91+
git commit -m "Update README with latest icons" || echo "No changes to commit"
92+
git push

Icons/Actions/Action=AddActor.png

-730 Bytes
Loading

Icons/Actions/Action=AddActor@4x.png

-2.05 KB
Loading

Icons/Actions/Action=AddActorsvg.svg

+3-28
Loading

Icons/Actions/Action=Duplicate.png

992 Bytes
Loading

Icons/Actions/Action=Duplicate@4x.png

1.55 KB
Loading

Icons/Actions/Action=Duplicatesvg.svg

+5
Loading
516 Bytes
Loading

Icons/Actions/Animation=Mute.png

990 Bytes
Loading

Icons/Actions/Animation=Pause.png

315 Bytes
Loading

Icons/Actions/Animation=Play.png

807 Bytes
Loading

Icons/Actions/Animation=Record.png

866 Bytes
Loading

Icons/Actions/Animation=Solo.png

908 Bytes
Loading
708 Bytes
Loading
677 Bytes
Loading

Icons/Actions/Generic=Add.png

-3 Bytes
Loading

Icons/Actions/Generic=Add@4x.png

-70 Bytes
Loading

Icons/Actions/Generic=Addsvg.svg

+2-19
Loading

Icons/Actions/Generic=Backward.png

665 Bytes
Loading

Icons/Actions/Generic=Backward@4x.png

1.21 KB
Loading

Icons/Actions/Generic=Backwardsvg.svg

+3
Loading

Icons/Actions/Generic=Down.png

828 Bytes
Loading

Icons/Actions/Generic=Down@4x.png

1.4 KB
Loading

Icons/Actions/Generic=Downsvg.svg

+3
Loading

Icons/Actions/Generic=Forward.png

669 Bytes
Loading

Icons/Actions/Generic=Forward@4x.png

1.18 KB
Loading

Icons/Actions/Generic=Forwardsvg.svg

+3
Loading

Icons/Actions/Generic=Hammer.png

-489 Bytes
Loading

Icons/Actions/Generic=Hammer@4x.png

-1.33 KB
Loading

Icons/Actions/Generic=HammerBox.png

-900 Bytes
Loading
-2.75 KB
Loading

0 commit comments

Comments
 (0)