Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions mini_agent/skills/slack-gif-creator/core/frame_composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def draw_text(frame: Image.Image, text: str, position: tuple[int, int],
# Try to use default font, fall back to basic if not available
try:
font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", font_size)
except:
except Exception:
font = ImageFont.load_default()

if centered:
Expand Down Expand Up @@ -149,7 +149,7 @@ def draw_emoji(frame: Image.Image, emoji: str, position: tuple[int, int], size:
# Use Apple Color Emoji font on macOS
try:
font = ImageFont.truetype("/System/Library/Fonts/Apple Color Emoji.ttc", size)
except:
except Exception:
# Fallback to text-based emoji
font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", size)

Expand Down Expand Up @@ -292,11 +292,11 @@ def draw_emoji_enhanced(frame: Image.Image, emoji: str, position: tuple[int, int
# Use Apple Color Emoji font on macOS
try:
font = ImageFont.truetype("/System/Library/Fonts/Apple Color Emoji.ttc", size)
except:
except Exception:
# Fallback to text-based emoji
try:
font = ImageFont.truetype("/System/Library/Fonts/Helvetica.ttc", size)
except:
except Exception:
font = ImageFont.load_default()

# Draw shadow first if enabled
Expand All @@ -307,13 +307,13 @@ def draw_emoji_enhanced(frame: Image.Image, emoji: str, position: tuple[int, int
try:
draw.text((shadow_pos[0] + offset, shadow_pos[1] + offset),
emoji, font=font, embedded_color=True, fill=(0, 0, 0, 100))
except:
except Exception:
pass # Skip shadow if it fails

# Draw main emoji
try:
draw.text(position, emoji, font=font, embedded_color=True)
except:
except Exception:
# Fallback to basic drawing if embedded color fails
draw.text(position, emoji, font=font, fill=(0, 0, 0))

Expand Down
2 changes: 1 addition & 1 deletion mini_agent/skills/slack-gif-creator/core/typography.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_font(size: int, bold: bool = False) -> ImageFont.FreeTypeFont:
for font_path in font_paths:
try:
return ImageFont.truetype(font_path, size)
except:
except Exception:
continue

# Ultimate fallback
Expand Down
2 changes: 1 addition & 1 deletion mini_agent/skills/slack-gif-creator/core/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def validate_gif(gif_path: str | Path, is_emoji: bool = True) -> tuple[bool, dic
duration_ms = img.info.get('duration', 100)
total_duration = (duration_ms * frame_count) / 1000
fps = frame_count / total_duration if total_duration > 0 else 0
except:
except Exception:
duration_ms = None
total_duration = None
fps = None
Expand Down