anbeime/skill / skills/native-subtitle-quote-image/native-subtitle-quote-image
native-subtitle-quote-image
Verified将本地视频或用户有权处理的在线视频,经过来源获取、文字稿定位、选题选句、精确取帧、紧凑裁切、拼图和逐张质检,制作成 3:4 或保留画面原比例的视频字幕长图。支持两种明确分开的输出:保留画面内已烧录字幕的原生字幕模式,以及把已审核的时间点与台词绘制到真实视频帧上的脚本字幕模式。用户要求原生字幕截图、字幕帧拼图、YouTube 金句长图、台词截图、不重绘字幕、自定义中文台词,或调整主图比例、字幕区域、台词间隔和美感时使用。
scripts/submit_feedback.py
View on GitHub#!/usr/bin/env python3
"""Send community or social-media feedback into the repository's intake workflow.
Uses GitHub's repository_dispatch API, so it works from n8n, Zapier, a chat bot
or a terminal. Requires a token with ``contents: write`` on this repository in
GITHUB_TOKEN (or pass --token).
"""
import argparse
import json
import os
import sys
import urllib.error
import urllib.request
REPOSITORY = "chengyi-ai/native-subtitle-quote-image"
SOURCES = ("social", "community", "github")
def build_payload(args):
return {
"event_type": "feedback",
"client_payload": {
"source": args.source,
"platform": args.platform,
"url": args.url,
"author": args.author,
"title": args.title,
"body": args.body,
},
}
def main(argv=None):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--title", required=True, help="一句话概括反馈")
parser.add_argument("--body", required=True, help="反馈原文或整理后的描述")
parser.add_argument("--source", choices=SOURCES, default="social")
parser.add_argument("--platform", default="", help="如 小红书、微博、X、即刻、微信群")
parser.add_argument("--url", default="", help="原帖链接,用于去重和回溯")
parser.add_argument("--author", default="", help="反馈者昵称(可留空)")
parser.add_argument("--repo", default=REPOSITORY)
parser.add_argument("--token", default=os.environ.get("GITHUB_TOKEN", ""))
parser.add_argument("--dry-run", action="store_true", help="只打印请求体")
args = parser.parse_args(argv)
payload = build_payload(args)
if args.dry_run:
print(json.dumps(payload, ensure_ascii=False, indent=2))
return 0
if not args.token:
parser.error("缺少 token:设置 GITHUB_TOKEN 或传 --token")
request = urllib.request.Request(
f"https://api.github.com/repos/{args.repo}/dispatches",
data=json.dumps(payload).encode("utf-8"),
method="POST",
headers={
"Accept": "application/vnd.github+json",
"Authorization": f"Bearer {args.token}",
"X-GitHub-Api-Version": "2022-11-28",
},
)
try:
with urllib.request.urlopen(request, timeout=20):
pass
except urllib.error.HTTPError as exc:
print(f"提交失败: HTTP {exc.code} {exc.read().decode('utf-8', 'replace')}", file=sys.stderr)
return 1
print("已提交,稍后会在 Issues 中看到带 needs-triage 标签的新条目。")
return 0
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |