anbeime/skill / skills/wechatsync-publisher/wechatsync-publisher
wechatsync-publisher
Flagged自媒体创作者在进行全网内容分发时,使用此技能可智能筛选优质选题、AI生成多版本文章,并一键自动适配格式发布至微信公众号、知乎、掘金等6大平台,轻松实现从创作到推送的全流程自动化,大幅提升多平台运营效率!
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.0 KB |
| references/content-adaptation-guide.md | markdown | 15.5 KB |
| references/html-layout-guide.md | markdown | 6.3 KB |
| references/platform-requirements.md | markdown | 11.1 KB |
| references/server-config-guide.md | markdown | 11.1 KB |
| references/viral-content-templates.md | markdown | 5.8 KB |
| references/xiaohongshu-creation-guide.md | markdown | 11.1 KB |
| scripts/filter_topics.py | script | 3.0 KB |
| scripts/publish.py | script | 6.5 KB |
| scripts/search_images.py | script | 2.0 KB |
scripts/search_images.py
View on GitHub#!/usr/bin/env python3
"""
图片搜索脚本
使用Unsplash API搜索适配的封面图
使用方法:
python search_images.py --keyword "AI" --count 3 --size 1600x680
"""
import argparse
import json
import sys
import urllib.parse
import urllib.request
def search_images(keyword, count=1, size="1600x680"):
"""
搜索图片
Args:
keyword: 搜索关键词
count: 返回图片数量
size: 图片尺寸(默认1600x680,符合微信封面比例)
Returns:
list: 图片URL列表
"""
# Unsplash源API
base_url = "https://source.unsplash.com"
image_urls = []
try:
for i in range(count):
# 构建URL
encoded_keyword = urllib.parse.quote(keyword)
url = f"{base_url}/{size}/?{encoded_keyword}"
# 为了避免缓存,添加随机参数
import time
url_with_random = f"{url}&random={int(time.time() * 1000)}"
image_urls.append(url_with_random)
return {
"success": True,
"keyword": keyword,
"count": len(image_urls),
"images": image_urls
}
except Exception as e:
return {
"success": False,
"message": f"搜索失败: {str(e)}",
"images": []
}
def main():
"""主函数,处理命令行参数"""
parser = argparse.ArgumentParser(description="图片搜索脚本")
parser.add_argument("--keyword", required=True, help="搜索关键词")
parser.add_argument("--count", type=int, default=1, help="返回图片数量")
parser.add_argument("--size", default="1600x680", help="图片尺寸(宽x高)")
args = parser.parse_args()
# 搜索图片
result = search_images(
keyword=args.keyword,
count=args.count,
size=args.size
)
# 输出结果
print(json.dumps(result, ensure_ascii=False, indent=2))
# 返回退出码
sys.exit(0 if result["success"] else 1)
if __name__ == "__main__":
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: 198k | 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 |