Files
Davy 656d06a527 feat(emoticon): add emoticon export CLI (#137, closes #118)
Closes #118 (bigmanBass666 提的表情包导出 feature).

作者 thedavidweng 实测验证 (983 NonStore + 204 Store emoticons / 1251 cache files):
- ❌ 解密本地 cache 文件不可行 — 加密方式未知, 不是 V1/V2/XOR/AES 任意标准方案
- ✅ CDN 下载 via cdn_url 可行 — 所有 20/20 测试条目返回 plain image (GIF/JPG/PNG), 无需登录态
- ❌ 构造 CDN URL 不可行 — filekey/storeid 是 per-emoticon

方案: 抽 emoji 公共逻辑到 emoticons.py + 新 CLI export_emoticons.py.

改动:
- emoticons.py 新增 (286 行) — build_emoji_lookup + download_emoji, 不依赖 monitor_web
- export_emoticons.py 新增 (125 行) — CLI 带 --dry-run / --filter / -o 参数
- monitor_web.py 净 -175 行 — emoji 逻辑迁到 emoticons.py, 用 thin wrapper 调用, 保留 emoji_ 文件名前缀兼容已有缓存
- main.py +5 行 — 加 emoticons subcommand
- Makefile + README 文档

注意: 现有 monitor_web 进程要重启才能用新代码 (refactor 内部接口, 行为对等).
2026-06-10 11:18:17 +08:00

50 lines
1.2 KiB
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.PHONY: setup build keys decrypt web export emoticons all status clean help
PYTHON ?= .venv/bin/python3
export SHELL := /bin/bash
help:
@echo "WeChat Decrypt — Makefile"
@echo ""
@echo " make setup 一键安装所有依赖 + 编译 + 初始配置"
@echo " make build 编译 macOS 密钥扫描器"
@echo " make keys 提取密钥(需要 root)"
@echo " make decrypt 提取密钥 + 解密全部数据库"
@echo " make web 启动 Web UI(实时消息监听)"
@echo " make export 解密 + 批量导出聊天记录"
@echo " make emoticons 导出收藏的表情包"
@echo " make all 从零到完成:setup → keys → decrypt → export"
@echo " make status 显示当前数据状态和磁盘用量"
@echo " make clean 交互式清理临时数据(解密库/导出/缓存)"
@echo ""
setup:
@bash setup.sh
build:
cc -O2 -o find_all_keys_macos find_all_keys_macos.c -framework Foundation
codesign -s - find_all_keys_macos
keys:
sudo ./find_all_keys_macos
decrypt:
$(PYTHON) main.py decrypt
web:
$(PYTHON) main.py
export:
$(PYTHON) main.py export
emoticons:
$(PYTHON) main.py emoticons
all:
$(PYTHON) main.py all
status:
$(PYTHON) main.py status
clean:
$(PYTHON) cleanup.py