← 返回
未分类 中文

bratification

Generate brat-style text cover images and sticker-like WhatsApp-safe outputs from custom text. Use when the user asks to make a brat or brat-gen style cover,...
根据自定义文字生成 brat 风格的文字封面图片和类似贴纸的 WhatsApp 安全输出。用于用户请求制作 brat 或 brat-gen 风格封面时。
sqizzo sqizzo 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 1
Stars
📥 322
下载
💾 0
安装
1
版本
#latest

概述

Bratification

Generate brat-style images from text using the bundled Python scripts.

Quick start

  • For a plain render, run scripts/render_brat.py.
  • For command-style parsing like !brat hello world, run scripts/handle_brat_command.py.
  • Prefer white background, Arial Narrow bold (with cross-platform font fallback), centered composition, word wrapping without cutting words, and automatic font shrink to fit.
  • handle_brat_command.py now sanitizes slug/output naming and always writes into its managed scripts/out directory tree.

Workflow

  1. Decide whether the request is direct text rendering or !brat command parsing.
  2. Use scripts/handle_brat_command.py for command-style input.
  3. Use scripts/render_brat.py for direct text-to-image rendering.
  4. For WhatsApp-safe sticker-like delivery, prefer --size 512 --sticker-size 512 and send the generated PNG with no caption.
  5. Treat WEBP as an optional artifact unless the channel has verified native sticker upload support.

Commands

Render text directly

python scripts/render_brat.py "hello world" --png out/hello-world.png --webp out/hello-world.webp

Parse a !brat command

python scripts/handle_brat_command.py "!brat hello world"

Sticker-like WhatsApp-safe output

python scripts/handle_brat_command.py --size 512 --sticker-size 512 "!brat hello world"

Output handling

  • Use PNG as the primary reliable delivery format.
  • Use WEBP as a secondary artifact for future native-sticker-capable channels.
  • If the input is only !brat with no text, ask briefly for the text.
  • If generation fails, apologize briefly and say the brat render failed.

Scripts

  • scripts/render_brat.py: deterministic renderer for PNG/WEBP output
  • scripts/handle_brat_command.py: parser for !brat-style input that emits JSON with generated paths

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 20:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 335 📥 94,742
life-service

companion-checkin

sqizzo
温暖、适应性强的个人检查,覆盖习惯、情绪、睡眠、饮食、专注和每日进度。用于习惯追踪或每日检查流程。
★ 0 📥 411
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 227 📥 48,917