PdfDtProtector
PDF内容脱敏(Desensitization of PDF file data).
Install / Use
/learn @gotoolkits/PdfDtProtectorREADME
PDF文件数据脱敏处理(For learning)
用途:
pdf文件内容的读取、缓存、敏感数据识别定位、脱敏处理后生成新pdf文件.
实例:
- 单页文件脱敏处理(手机号/身份证号)

- 多页文件脱敏处理 (手机号/身份证号)

依赖:
- imagemagick
- ghostscript
配置文件config.json说明:
{
"settings": {
"imagePPI": 227, //PPI值
"compressionQuality": 80, //图像压缩比
"maskRows": 50, //掩盖图高度pix
"offset": 10 //掩盖图Y偏移
},
"rules": {
"regxRule": [ //匹配规则定义
"\\D(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\\d{8}", //手机号正则
"\\D[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)" //18位身份证正则
]
}
}
TODO:
- 优化处理速度
- 支持中文匹配
Related Skills
node-connect
350.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
