Skip to content

Commit 69cf753

Browse files
committed
chore: give i a try 3
1 parent dea48d6 commit 69cf753

2 files changed

Lines changed: 28 additions & 21 deletions

File tree

.github/scripts/generate-icon-prompts.py

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ def generate_icon_prompt(name, platform, description):
115115
# Clean up description
116116
clean_description = description.strip().replace('\n', ' ')
117117

118-
# Generate prompt
119-
prompt = f"""Create a professional flat design icon for the meshcloud Building Block ecosystem.
118+
# Generate AI prompt
119+
ai_prompt = f"""Create a professional flat design icon for the meshcloud Building Block ecosystem.
120120
121121
Purpose: {clean_description}
122122
123123
Visual Style:
124124
- Plain white background (#FFFFFF) for easy removal in post-processing
125-
- Background will be converted to transparent (see steps below)
125+
- Background will be converted to transparent (see post-processing steps)
126126
- Use meshcloud blue (#2563eb) as primary color
127127
- Use {color_scheme} as accent colors
128128
- Maximum 2-3 colors total
@@ -138,10 +138,10 @@ def generate_icon_prompt(name, platform, description):
138138
- Platform-appropriate symbol for {platform.upper()} (e.g., cloud, container, database, server, etc.)
139139
140140
Style: Enterprise professional, instantly recognizable at small sizes, similar to app icons or logos.
141-
Target specs: 800x800px PNG with transparent background, under 100KB
142-
---
143-
144-
AFTER GENERATION - POST-PROCESSING STEPS:
141+
Dimensions: 800x800 pixels"""
142+
143+
# Generate post-processing instructions
144+
post_processing = """AFTER GENERATION - POST-PROCESSING STEPS:
145145
146146
Step 1: Remove white background with GIMP (free):
147147
a) Open image in GIMP
@@ -152,16 +152,23 @@ def generate_icon_prompt(name, platform, description):
152152
f) File → Export As → logo.png
153153
g) Set Compression level to 9 → Export
154154
155-
Step 2: Resize to 800x800 pixels:
155+
Step 2: Resize to 800x800 pixels if needed:
156156
- GIMP: Image → Scale Image → 800x800px
157157
- Or use any image editor
158158
159159
Step 3: Compress with pngquant (free command line tool):
160160
- Install: brew install pngquant (Mac) or apt install pngquant (Linux)
161161
- Run: pngquant --quality=70-85 logo.png --ext .png --force
162-
- This reduces file size by 60-80% while maintaining quality"""
162+
- This reduces file size by 60-80% while maintaining quality
163+
164+
Alternative online tool (no install): https://tinypng.com/
165+
166+
Target specs: 800x800px PNG with transparent background, under 100KB"""
163167

164-
return prompt
168+
return {
169+
'ai_prompt': ai_prompt,
170+
'post_processing': post_processing
171+
}
165172

166173

167174
def find_missing_logos(modules_dir):
@@ -215,7 +222,7 @@ def main():
215222
# Generate prompts for each missing logo
216223
results = []
217224
for item in missing_logos:
218-
prompt = generate_icon_prompt(
225+
prompt_data = generate_icon_prompt(
219226
item['name'],
220227
item['platform'] or 'generic',
221228
item['description']
@@ -226,7 +233,8 @@ def main():
226233
'platform': item['platform'],
227234
'path': item['path'],
228235
'logo_path': item['logo_path'],
229-
'prompt': prompt
236+
'ai_prompt': prompt_data['ai_prompt'],
237+
'post_processing': prompt_data['post_processing']
230238
})
231239

232240
# Output as JSON for GitHub Action to consume

.github/workflows/icon-prompts.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,25 @@ jobs:
5858
5959
let comment = '## 🎨 Missing Building Block Icons\n\n';
6060
comment += `Found **${prompts.length}** building block(s) without \`logo.png\` files.\n\n`;
61-
comment += 'Copy the prompts below and use them with your favorite AI image generator (DALL-E, Midjourney, Stable Diffusion, etc.) to create consistent icons.\n\n';
62-
comment += '### Requirements\n';
63-
comment += '- **Size:** 128x128 pixels\n';
64-
comment += '- **Format:** PNG\n';
65-
comment += '- **Max file size:** 100KB\n\n';
61+
comment += 'Copy the **AI Prompts** below and use them with your favorite AI image generator (Gemini, DALL-E, Midjourney, Stable Diffusion, etc.).\n\n';
62+
comment += 'Then follow the **Post-Processing Steps** to prepare the icons for upload.\n\n';
6663
comment += '---\n\n';
6764
6865
for (const item of prompts) {
6966
comment += `### ${item.name}\n\n`;
7067
comment += `**Platform:** \`${item.platform}\`\n\n`;
7168
comment += `**Path:** \`${item.logo_path}\`\n\n`;
72-
comment += '**Prompt:**\n\n';
69+
comment += '#### AI Prompt (copy this to image generator)\n\n';
7370
comment += '```\n';
74-
comment += item.prompt;
71+
comment += item.ai_prompt;
72+
comment += '\n```\n\n';
73+
comment += '#### Post-Processing Instructions\n\n';
74+
comment += '```\n';
75+
comment += item.post_processing;
7576
comment += '\n```\n\n';
7677
comment += '---\n\n';
7778
}
7879
79-
comment += '\n\n💡 **Tip:** After generating the icon, optimize it with tools like [TinyPNG](https://tinypng.com/) or [ImageOptim](https://imageoptim.com/) to ensure it\'s under 100KB.\n';
80-
8180
return comment;
8281
8382
- name: Find existing comment

0 commit comments

Comments
 (0)