meme-factory

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Meme Factory

表情包工厂

Create memes using the free memegen.link API and textual meme formats.

使用免费的memegen.link API和文本格式创建表情包。

Triggers

触发方式

TriggerDescription
/meme-factory
Manual invocation
/meme-factory {template} {top} {bottom}
Direct meme generation
meme-factory: create a meme about X
Natural language request

触发指令描述
/meme-factory
手动调用
/meme-factory {template} {top} {bottom}
直接生成表情包
meme-factory: create a meme about X
自然语言请求

Quick Reference

快速参考

ActionFormat
Basic meme
https://api.memegen.link/images/{template}/{top}/{bottom}.png
With sizing
?width=1200&height=630
Custom background
?style=https://example.com/image.jpg
All templateshttps://api.memegen.link/templates/
Interactive docshttps://api.memegen.link/docs/
Additional Resources:
  • Markdown Memes Guide - 15+ textual meme formats
  • Examples - Practical usage examples
  • meme_generator.py - Python helper script

操作格式
基础表情包
https://api.memegen.link/images/{template}/{top}/{bottom}.png
自定义尺寸
?width=1200&height=630
自定义背景
?style=https://example.com/image.jpg
所有模板https://api.memegen.link/templates/
交互式文档https://api.memegen.link/docs/
额外资源:
  • Markdown表情包指南 - 15+种文本表情包格式
  • 示例 - 实际使用案例
  • meme_generator.py - Python辅助脚本

Quick Start

快速开始

Basic Meme Structure

基础表情包结构

https://api.memegen.link/images/{template}/{top_text}/{bottom_text}.{extension}
Example:
https://api.memegen.link/images/buzz/memes/memes_everywhere.png
Result: Buzz Lightyear meme with "memes" at top and "memes everywhere" at bottom.
https://api.memegen.link/images/{template}/{top_text}/{bottom_text}.{extension}
示例:
https://api.memegen.link/images/buzz/memes/memes_everywhere.png
结果:巴斯光年表情包,顶部文字为“memes”,底部文字为“memes everywhere”。

Text Formatting

文本格式

CharacterEncoding
Space
_
or
-
Newline
~n
Question mark
~q
Percent
~p
Slash
~s
Hash
~h
Single quote
''
Double quote
""

字符编码方式
空格
_
-
换行
~n
问号
~q
百分号
~p
斜杠
~s
井号
~h
单引号
''
双引号
""

Popular Templates

热门模板

TemplateUse CaseExample
buzz
X, X everywherebugs/bugs_everywhere
drake
Comparisonsmanual_testing/automated_testing
success
Victoriesdeployed/no_errors
fine
Things going wrongserver_on_fire/this_is_fine
fry
Uncertaintynot_sure_if_bug/or_feature
changemind
Hot takestabs_are_better_than_spaces
distracted
Prioritiesmy_code/new_framework/current_project
mordor
One does not simplyone_does_not_simply/deploy_on_friday

模板使用场景示例
buzz
X,无处不在的Xbugs/bugs_everywhere
drake
对比场景manual_testing/automated_testing
success
庆祝胜利deployed/no_errors
fine
状况百出server_on_fire/this_is_fine
fry
不确定场景not_sure_if_bug/or_feature
changemind
热门观点tabs_are_better_than_spaces
distracted
优先级区分my_code/new_framework/current_project
mordor
不可能的任务one_does_not_simply/deploy_on_friday

Template Selection Guide

模板选择指南

ContextTemplateWhy
Comparing options
drake
Two-panel reject/approve format
Celebrating wins
success
Positive outcome emphasis
Problems ignored
fine
Ironic "everything is fine"
Uncertainty
fry
"Not sure if X or Y" format
Controversial opinion
changemind
Statement + challenge
Ubiquitous things
buzz
"X, X everywhere"
Bad ideas
mordor
"One does not simply..."

场景模板原因
选项对比
drake
双面板拒绝/认可格式
庆祝成功
success
突出积极结果
忽视问题
fine
讽刺“一切正常”
不确定情况
fry
“不确定是X还是Y”格式
争议观点
changemind
陈述+挑战
普遍现象
buzz
“X,无处不在的X”
糟糕想法
mordor
“没人能轻易...”

Validation

验证步骤

After generating a meme:
  • URL returns valid image (test in browser)
  • Text is readable (not too long)
  • Template matches the message context
  • Special characters properly encoded
  • Dimensions appropriate for platform
生成表情包后:
  • URL返回有效图片(在浏览器中测试)
  • 文本清晰可读(不要过长)
  • 模板与信息场景匹配
  • 特殊字符已正确编码
  • 尺寸适合目标平台

Platform Dimensions

平台尺寸要求

PlatformDimensions
Social media (Open Graph)1200x630
Slack/Discord800x600
GitHubDefault

平台尺寸
社交媒体(Open Graph)1200x630
Slack/Discord800x600
GitHub默认尺寸

Anti-Patterns

避坑指南

AvoidWhyInstead
Spaces without encodingURL breaksUse
_
or
-
Too much textUnreadable2-6 words per line
Wrong templateMessage mismatchMatch template to context
Missing extensionInvalid URLAlways include
.png
,
.jpg
, etc.
Unencoded special charsURL breaksUse
~q
,
~s
,
~p
, etc.
Assuming template exists404 errorCheck templates list first

避免操作原因替代方案
空格未编码URL失效使用
_
-
文本过多无法阅读每行2-6个单词
模板选择错误信息不匹配根据场景选择模板
缺少文件扩展名URL无效始终包含
.png
.jpg
特殊字符未编码URL失效使用
~q
~s
~p
假设模板存在404错误先检查模板列表

Verification

成功标准

Meme generation is successful when:
  1. URL is valid - Returns HTTP 200
  2. Image renders - Displays correctly in markdown
  3. Text is visible - Properly formatted on image
  4. Context matches - Template fits the message
Test command:
bash
curl -I "https://api.memegen.link/images/buzz/test/test.png"
表情包生成成功的标志:
  1. URL有效 - 返回HTTP 200状态码
  2. 图片可渲染 - 在Markdown中正确显示
  3. 文本可见 - 在图片上格式正确
  4. 场景匹配 - 模板符合信息内容
测试命令:
bash
curl -I "https://api.memegen.link/images/buzz/test/test.png"

Should return: HTTP/2 200

应返回:HTTP/2 200


---

<details>
<summary><strong>Deep Dive: Advanced Features</strong></summary>

---

<details>
<summary><strong>深入探讨:高级功能</strong></summary>

Image Formats

图片格式

ExtensionUse Case
.png
Best quality, default
.jpg
Smaller file size
.webp
Modern, good compression
.gif
Animated templates
扩展名使用场景
.png
最佳质量,默认格式
.jpg
文件体积更小
.webp
现代格式,压缩效果好
.gif
动图模板

Dimensions

尺寸设置

?width=800
?height=600
?width=800&height=600  (padded to exact)
?width=800
?height=600
?width=800&height=600  (填充至精确尺寸)

Layout Options

布局选项

?layout=top     # Text at top only
?layout=bottom  # Text at bottom only
?layout=default # Standard top/bottom
?layout=top     # 仅顶部显示文本
?layout=bottom  # 仅底部显示文本
?layout=default # 标准上下布局

Custom Fonts

自定义字体

?font=impact  (default)
查看可用字体:https://api.memegen.link/fonts/
?font=impact  (默认字体)

Custom Images

自定义背景图

Use any image as background:
https://api.memegen.link/images/custom/hello/world.png?style=https://example.com/image.jpg
</details> <details> <summary><strong>Deep Dive: Contextual Memes</strong></summary>
可使用任意图片作为背景:
https://api.memegen.link/images/custom/hello/world.png?style=https://example.com/image.jpg
</details> <details> <summary><strong>深入探讨:场景化表情包</strong></summary>

Code Reviews

代码评审

Template: fry
https://api.memegen.link/images/fry/not_sure_if_feature/or_bug.png
模板: fry
https://api.memegen.link/images/fry/not_sure_if_feature/or_bug.png

Deployments

部署场景

Template: interesting
https://api.memegen.link/images/interesting/i_dont_always_test/but_when_i_do_i_do_it_in_production.png
模板: interesting
https://api.memegen.link/images/interesting/i_dont_always_test/but_when_i_do_i_do_it_in_production.png

Documentation

文档场景

Template: yodawg
https://api.memegen.link/images/yodawg/yo_dawg_i_heard_you_like_docs/so_i_documented_the_documentation.png
模板: yodawg
https://api.memegen.link/images/yodawg/yo_dawg_i_heard_you_like_docs/so_i_documented_the_documentation.png

Performance Issues

性能问题

Template: fine
https://api.memegen.link/images/fine/memory_usage_at_99~/this_is_fine.png
模板: fine
https://api.memegen.link/images/fine/memory_usage_at_99~/this_is_fine.png

Successful Deploy

部署成功

Template: success
https://api.memegen.link/images/success/deployed_to_production/zero_downtime.png
</details> <details> <summary><strong>Deep Dive: Workflow Integration</strong></summary>
模板: success
https://api.memegen.link/images/success/deployed_to_production/zero_downtime.png
</details> <details> <summary><strong>深入探讨:工作流集成</strong></summary>

Generating Memes in Response

回复中生成表情包

markdown
Here's a relevant meme:

![Meme](https://api.memegen.link/images/buzz/bugs/bugs_everywhere.png)
markdown
这是一个相关的表情包:

![Meme](https://api.memegen.link/images/buzz/bugs/bugs_everywhere.png)

Dynamic Generation (Python)

动态生成(Python)

python
def generate_status_meme(status: str, message: str):
    template_map = {
        "success": "success",
        "failure": "fine",
        "review": "fry",
        "deploy": "interesting"
    }

    template = template_map.get(status, "buzz")
    words = message.split()
    top = "_".join(words[0:3])
    bottom = "_".join(words[3:6])

    return f"https://api.memegen.link/images/{template}/{top}/{bottom}.png"
python
def generate_status_meme(status: str, message: str):
    template_map = {
        "success": "success",
        "failure": "fine",
        "review": "fry",
        "deploy": "interesting"
    }

    template = template_map.get(status, "buzz")
    words = message.split()
    top = "_".join(words[0:3])
    bottom = "_".join(words[3:6])

    return f"https://api.memegen.link/images/{template}/{top}/{bottom}.png"

Using the Helper Script

使用辅助脚本

python
from meme_generator import MemeGenerator

meme = MemeGenerator()
url = meme.generate("buzz", "features", "features everywhere")
print(url)
</details> <details> <summary><strong>Deep Dive: API Reference</strong></summary>
python
from meme_generator import MemeGenerator

meme = MemeGenerator()
url = meme.generate("buzz", "features", "features everywhere")
print(url)
</details> <details> <summary><strong>深入探讨:API参考</strong></summary>

Endpoints

接口端点

EndpointPurpose
/templates/
List all templates
/templates/{id}
Template details
/fonts/
Available fonts
/images/{template}/{top}/{bottom}.{ext}
Generate meme
端点用途
/templates/
列出所有模板
/templates/{id}
模板详情
/fonts/
可用字体列表
/images/{template}/{top}/{bottom}.{ext}
生成表情包

API Characteristics

API特性

  • Free and open-source
  • No API key required
  • No rate limiting (normal use)
  • Stateless (all info in URL)
  • Images generated on-demand
  • 免费开源
  • 无需API密钥
  • 无调用限制(正常使用)
  • 无状态(所有信息包含在URL中)
  • 图片按需生成

Error Handling

错误处理

  1. Check template at https://api.memegen.link/templates/
  2. Verify text formatting (underscores for spaces)
  3. Check special character encoding
  4. Ensure valid extension
  5. Test URL in browser
</details>
  1. https://api.memegen.link/templates/检查模板是否存在
  2. 验证文本格式(使用下划线代替空格)
  3. 检查特殊字符编码
  4. 确保文件扩展名有效
  5. 在浏览器中测试URL
</details>

References

参考资料

DocumentContent
markdown-memes-guide.md15+ textual meme formats (greentext, copypasta, ASCII, etc.)
examples.mdPractical usage examples
文档内容
markdown-memes-guide.md15+种文本表情包格式(绿字文本、复制粘贴文本、ASCII艺术等)
examples.md实际使用案例

Scripts

脚本

ScriptPurpose
meme_generator.pyPython helper for meme generation

脚本用途
meme_generator.py用于生成表情包的Python辅助脚本

Summary

总结

Generate contextual memes to:
  • Add humor to conversations
  • Create social media visuals
  • Make code reviews engaging
  • Celebrate successes
Golden rule: Keep text concise, match template to context.
生成场景化表情包可用于:
  • 为对话增添趣味
  • 创建社交媒体视觉素材
  • 让代码评审更生动
  • 庆祝成功
黄金法则: 保持文本简洁,模板与场景匹配。