AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
Remove emoji output from scripts
hugohe3013e806cfdc4
diff --git a/skills/ppt-master/scripts/finalize_svg.py b/skills/ppt-master/scripts/finalize_svg.pyindex b6d24a90..ae40a916 100644--- a/skills/ppt-master/scripts/finalize_svg.py+++ b/skills/ppt-master/scripts/finalize_svg.py@@ -45,8 +45,17 @@ def safe_print(text: str) -> None:try:print(text)except UnicodeEncodeError:- text = text.replace('✅', '[OK]').replace('❌', '[ERROR]')- text = text.replace('📁', '[DIR]').replace('📄', '[FILE]')+ replacements = {+ chr(0x23F3): "[..]",+ chr(0x2705): "[DONE]",+ chr(0x274C): "[ERROR]",+ chr(0x26A0) + chr(0xFE0F): "[WARN]",+ chr(0x1F4C1): "[DIR]",+ chr(0x1F4C4): "[FILE]",+ chr(0x1F4E6): "[OK]",+ }+ for source, target in replacements.items():+ text = text.replace(source, target)print(text)diff --git a/skills/ppt-master/scripts/image_backends/backend_bfl.py b/skills/ppt-master/scripts/image_backends/backend_bfl.pyindex 3497cd20..9f979c44 100644--- a/skills/ppt-master/scripts/image_backends/backend_bfl.py+++ b/skills/ppt-master/scripts/image_backends/backend_bfl.py@@ -111,17 +111,17 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Prompt: {final_prompt[:120]}{'...' if len(final_prompt) > 120 else ''}")print(f" Aspect Ratio: {aspect_ratio}")print()- print(" ⏳ Submitting request...", end="", flush=True)+ print(" [..] Submitting request...", end="", flush=True)start = time.time()request_payload = _submit_request(url, headers, payload)elapsed = time.time() - start- print(f"\n ✅ Request accepted ({elapsed:.1f}s)")+ print(f"\n [DONE] Request accepted ({elapsed:.1f}s)")polling_url = request_payload.get("polling_url")if not polling_url:raise RuntimeError(f"BFL response missing polling_url: {request_payload}")- print(" ⏳ Polling result...")+ print(" [..] Polling result...")result_payload = poll_json(polling_url,{"x-key": api_key, "accept": "application/json"},@@ -171,7 +171,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_fal.py b/skills/ppt-master/scripts/image_backends/backend_fal.pyindex d4b80c43..790d24ac 100644--- a/skills/ppt-master/scripts/image_backends/backend_fal.py+++ b/skills/ppt-master/scripts/image_backends/backend_fal.py@@ -68,11 +68,11 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Prompt: {prompt[:120]}{'...' if len(prompt) > 120 else ''}")print(f" Aspect Ratio: {aspect_ratio}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, json=payload, timeout=300)elapsed = time.time() - start- print(f"\n ✅ Response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Response received ({elapsed:.1f}s)")if response.status_code != 200:raise http_error(response, "fal image generation")@@ -121,7 +121,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_gemini.py b/skills/ppt-master/scripts/image_backends/backend_gemini.pyindex bc4108b6..962ce41d 100644--- a/skills/ppt-master/scripts/image_backends/backend_gemini.py+++ b/skills/ppt-master/scripts/image_backends/backend_gemini.py@@ -94,7 +94,7 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print()start_time = time.time()- print(f" ⏳ Generating...", end="", flush=True)+ print(f" [..] Generating...", end="", flush=True)heartbeat_stop = threading.Event()@@ -130,14 +130,14 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,data_size = len(part.inline_data.data) if part.inline_data.data else 0total_bytes += data_sizesize_str = f"{data_size / 1024:.0f}KB" if data_size < 1048576 else f"{data_size / 1048576:.1f}MB"- print(f"\n 📦 Chunk #{chunk_count} received ({size_str}, {elapsed:.1f}s)", end="", flush=True)+ print(f"\n [OK] Chunk #{chunk_count} received ({size_str}, {elapsed:.1f}s)", end="", flush=True)last_image_data = partheartbeat_stop.set()hb_thread.join(timeout=1)elapsed = time.time() - start_time- print(f"\n ✅ Stream complete ({elapsed:.1f}s, {chunk_count} chunk(s), {total_bytes / 1024:.0f}KB total)")+ print(f"\n [DONE] Stream complete ({elapsed:.1f}s, {chunk_count} chunk(s), {total_bytes / 1024:.0f}KB total)")if last_image_data is not None and last_image_data.inline_data is not None:if chunk_count > 1:@@ -210,12 +210,12 @@ def generate(prompt: str, negative_prompt: str = None,last_error = eif attempt < max_retries and is_rate_limit_error(e):delay = retry_delay(attempt, rate_limited=True)- print(f"\n ⚠️ Rate limit hit (attempt {attempt + 1}/{max_retries + 1}). "+ print(f"\n [WARN] Rate limit hit (attempt {attempt + 1}/{max_retries + 1}). "f"Waiting {delay}s before retry...")time.sleep(delay)elif attempt < max_retries:delay = retry_delay(attempt, rate_limited=False)- print(f"\n ⚠️ Error (attempt {attempt + 1}/{max_retries + 1}): {e}. "+ print(f"\n [WARN] Error (attempt {attempt + 1}/{max_retries + 1}): {e}. "f"Retrying in {delay}s...")time.sleep(delay)else:diff --git a/skills/ppt-master/scripts/image_backends/backend_ideogram.py b/skills/ppt-master/scripts/image_backends/backend_ideogram.pyindex 7a3a5a26..e96176bd 100644--- a/skills/ppt-master/scripts/image_backends/backend_ideogram.py+++ b/skills/ppt-master/scripts/image_backends/backend_ideogram.py@@ -94,11 +94,11 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Aspect Ratio: {aspect_ratio} -> {mapped_ratio}")print(f" Render Speed: {rendering_speed}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, files=files, timeout=300)elapsed = time.time() - start- print(f"\n ✅ Response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Response received ({elapsed:.1f}s)")if response.status_code != 200:raise http_error(response, "Ideogram generation")@@ -146,7 +146,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_openai.py b/skills/ppt-master/scripts/image_backends/backend_openai.pyindex 8c07f016..fd1ce4f7 100644--- a/skills/ppt-master/scripts/image_backends/backend_openai.py+++ b/skills/ppt-master/scripts/image_backends/backend_openai.py@@ -101,7 +101,7 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print()start_time = time.time()- print(f" ⏳ Generating...", end="", flush=True)+ print(f" [..] Generating...", end="", flush=True)# Heartbeat threadheartbeat_stop = threading.Event()@@ -130,7 +130,7 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,hb_thread.join(timeout=1)elapsed = time.time() - start_time- print(f"\n ✅ Image generated ({elapsed:.1f}s)")+ print(f"\n [DONE] Image generated ({elapsed:.1f}s)")if resp is not None and resp.data:path = resolve_output_path(prompt, output_dir, filename, ".png")@@ -199,12 +199,12 @@ def generate(prompt: str, negative_prompt: str = None,last_error = eif attempt < max_retries and is_rate_limit_error(e):delay = retry_delay(attempt, rate_limited=True)- print(f"\n ⚠️ Rate limit hit (attempt {attempt + 1}/{max_retries + 1}). "+ print(f"\n [WARN] Rate limit hit (attempt {attempt + 1}/{max_retries + 1}). "f"Waiting {delay}s before retry...")time.sleep(delay)elif attempt < max_retries:delay = retry_delay(attempt, rate_limited=False)- print(f"\n ⚠️ Error (attempt {attempt + 1}/{max_retries + 1}): {e}. "+ print(f"\n [WARN] Error (attempt {attempt + 1}/{max_retries + 1}): {e}. "f"Retrying in {delay}s...")time.sleep(delay)else:diff --git a/skills/ppt-master/scripts/image_backends/backend_qwen.py b/skills/ppt-master/scripts/image_backends/backend_qwen.pyindex b491a5c6..5b0e135a 100644--- a/skills/ppt-master/scripts/image_backends/backend_qwen.py+++ b/skills/ppt-master/scripts/image_backends/backend_qwen.py@@ -137,11 +137,11 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Aspect Ratio: {aspect_ratio}")print(f" Resolution: {size}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, json=payload, timeout=300)elapsed = time.time() - start- print(f"\n ✅ Response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Response received ({elapsed:.1f}s)")if response.status_code != 200:raise http_error(response, "Qwen image generation")@@ -191,7 +191,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_replicate.py b/skills/ppt-master/scripts/image_backends/backend_replicate.pyindex 8b7b5ee2..76c39320 100644--- a/skills/ppt-master/scripts/image_backends/backend_replicate.py+++ b/skills/ppt-master/scripts/image_backends/backend_replicate.py@@ -94,11 +94,11 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Prompt: {final_prompt[:120]}{'...' if len(final_prompt) > 120 else ''}")print(f" Aspect Ratio: {aspect_ratio}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, json=payload, timeout=180)elapsed = time.time() - start- print(f"\n ✅ Initial response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Initial response received ({elapsed:.1f}s)")if response.status_code not in (200, 201):raise http_error(response, "Replicate generation request")@@ -114,7 +114,7 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,if not poll_url:raise RuntimeError(f"Replicate response missing poll URL: {data}")- print(" ⏳ Polling result...")+ print(" [..] Polling result...")data = poll_json(poll_url,{"Authorization": f"Bearer {api_key}"},@@ -165,7 +165,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_siliconflow.py b/skills/ppt-master/scripts/image_backends/backend_siliconflow.pyindex 6a335ac0..bdf87abf 100644--- a/skills/ppt-master/scripts/image_backends/backend_siliconflow.py+++ b/skills/ppt-master/scripts/image_backends/backend_siliconflow.py@@ -122,11 +122,11 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Aspect Ratio: {aspect_ratio}")print(f" Resolution: {size}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, json=payload, timeout=300)elapsed = time.time() - start- print(f"\n ✅ Response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Response received ({elapsed:.1f}s)")if response.status_code != 200:raise http_error(response, "SiliconFlow image generation")@@ -174,7 +174,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_stability.py b/skills/ppt-master/scripts/image_backends/backend_stability.pyindex f4847b70..d6b82941 100644--- a/skills/ppt-master/scripts/image_backends/backend_stability.py+++ b/skills/ppt-master/scripts/image_backends/backend_stability.py@@ -86,12 +86,12 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Aspect Ratio: {aspect_ratio}")print(f" Preset Size: {image_size}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, data=data, timeout=300)elapsed = time.time() - start- print(f"\n ✅ Response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Response received ({elapsed:.1f}s)")if response.status_code != 200:raise http_error(response, "Stability generation")@@ -137,7 +137,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_volcengine.py b/skills/ppt-master/scripts/image_backends/backend_volcengine.pyindex 7a9ec02c..692f1e98 100644--- a/skills/ppt-master/scripts/image_backends/backend_volcengine.py+++ b/skills/ppt-master/scripts/image_backends/backend_volcengine.py@@ -128,11 +128,11 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Aspect Ratio: {aspect_ratio}")print(f" Resolution: {size}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, json=payload, timeout=300)elapsed = time.time() - start- print(f"\n ✅ Response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Response received ({elapsed:.1f}s)")if response.status_code != 200:raise http_error(response, "Volcengine image generation")@@ -181,7 +181,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")diff --git a/skills/ppt-master/scripts/image_backends/backend_zhipu.py b/skills/ppt-master/scripts/image_backends/backend_zhipu.pyindex 3e6ccc05..dd4c84d1 100644--- a/skills/ppt-master/scripts/image_backends/backend_zhipu.py+++ b/skills/ppt-master/scripts/image_backends/backend_zhipu.py@@ -129,11 +129,11 @@ def _generate_image(api_key: str, prompt: str, negative_prompt: str = None,print(f" Aspect Ratio: {aspect_ratio}")print(f" Resolution: {size}")print()- print(" ⏳ Generating...", end="", flush=True)+ print(" [..] Generating...", end="", flush=True)start = time.time()response = requests.post(url, headers=headers, json=payload, timeout=300)elapsed = time.time() - start- print(f"\n ✅ Response received ({elapsed:.1f}s)")+ print(f"\n [DONE] Response received ({elapsed:.1f}s)")if response.status_code != 200:raise http_error(response, "Zhipu image generation")@@ -182,7 +182,7 @@ def generate(prompt: str, negative_prompt: str = None,limited = is_rate_limit_error(exc)delay = retry_delay(attempt, rate_limited=limited)label = "Rate limit hit" if limited else f"Error: {exc}"- print(f"\n ⚠️ {label}. Retrying in {delay}s...")+ print(f"\n [WARN] {label}. Retrying in {delay}s...")time.sleep(delay)raise RuntimeError(f"Failed after {max_retries + 1} attempts. Last error: {last_error}")