Add EasyEDA Pro EPRO2 source ingestion (3/5 batch test)
打通 oshwhub origin=pro 现代 Pro 3.x 工程的 EPRO2 源抓取链路。3/5
modern Pro 项目完整解出(共 8423 docs / 542 MB plain):
- X86 主板 7374 docs / 481 MB plain (chain=85, editor=3.2.15)
- 220V 桌面电源 771 docs / 26 MB plain (chain=28, editor=3.2.69)
- ESP-VoCat 278 docs / 7.5 MB plain (chain=12, editor=3.2.91)
剩余 2/5 是 legacy Pro 2.x(立创泰山派 RK3566、梁山派),项目 meta
返回 branch_uuid=null + editorVersion="2.1.40",没有 git-style chain
模型,文档直接挂在 boards[].sch/pcb 字段上,访问端点暂未挖通;元
数据落库 metadata.json,source/ 留空。
实现要点:
- fetch_pro_source(): 4 步流程(project → branch HEAD → structures
→ /branches/<B>/histories/<HEAD> 即返完整 chain,无需 ?limit 批量
端点)+ 逐 history 走 AES-128-GCM 解密(16 字节 IV,pycryptodome
原生支持)+ gunzip + 按 DOCHEAD 切 per-doc EPRO2 流
- EPRO2 解析坑:行末单 `|` 是行终止符不是字段分隔符,必须先
rstrip("|") 再 split("||"),否则 payload JSON 解析失败 silently
swallow 导致 cur_doc 不设 → 第一轮 X86 板 7374 docs 抽出来只剩 2 个
- docType 实测远不止 BOARD/PCB/SCH/SCH_PAGE,还含 SYMBOL /
FOOTPRINT / DEVICE / BLOB / FONT / CONFIG —— Pro 把组件库快照也
随项目存到 history,下游做 EPRO2→KiCad 转换时必须先把这些 lib
doc 加载进 symbol cache
- Pro 2.x vs 3.x 是不同存储模型 —— 3.x 走 branch 模型(已打通),
2.x 走 boards[] 直链(未打通);判别条件:project meta 的
branch_uuid 是否为 null
CLI 新增 --with-pro-source / --backfill-pro-source / --pro-cookie /
--origin(按 origin 字段服务端过滤 listing API),crawl_one() 按
origin=pro 自动 dispatch 到 Pro fetcher。
schema:docType 类型从 integer 放宽到 [integer, string, null]
(兼容 Std 的 1/3 + Pro 的 BOARD/SCH 等),新增 message_count 字段。
License 注意:本批 5 个项目全是 NC-SA / GPL,未达 Pro source doc
§4.2 Forge 白名单(MIT/BSD/Apache/CC0/CC-BY/CERN-OHL-P/Unlicense)。
按 CLAUDE.md "研究用、不再分发" 原则 raw 入库无碍;Forge 投影时
另过白名单。
详细技术细节见 docs/sources/easyeda_pro_source.md rev 3 + log.md。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
{"type":"DOCHEAD","ticket":8811}||{"docType":"SYMBOL","client":"d65f147c8efe27cb","uuid":"41251d7d80bdde82","updateTime":1759497311058,"version":"1721736956"}|
|
||||
{"type":"META","ticket":8812,"id":"META"}||{"title":"BLM18PG121SN1D_C14709","description":"","tags":[],"docType":2,"source":"f23227b7e9cd4b6dac1b7161c05e367a|0819f05c4eef4c71ace90d822a990e87"}|
|
||||
{"type":"DOCHEAD"}||{"docType":"SYMBOL","client":"fecbcccd96971add","uuid":"41251d7d80bdde82","updateTime":1759497306101,"version":"1721736956"}|
|
||||
{"type":"CANVAS","ticket":1,"id":"CANVAS"}||{"originX":0,"originY":0}|
|
||||
{"type":"PART","ticket":2,"id":"BLM18PG121SN1D_C14709.1"}||{"BBOX":[-17.40030749080188,-0.4453213224481444,17.182740634441018,4.8329037129996895],"title":"BLM18PG121SN1D_C14709.1"}|
|
||||
{"type":"ATTR","ticket":3,"id":"e1"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":1,"parentId":"","key":"Symbol","value":"BLM18PG121SN1D_C14709","keyVisible":false,"valueVisible":false,"x":null,"y":null,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_BOTTOM"}|
|
||||
{"type":"ATTR","ticket":4,"id":"e2"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":2,"parentId":"","key":"Designator","value":"L?","keyVisible":false,"valueVisible":false,"x":null,"y":null,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_BOTTOM"}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":5,"id":"b4afc921020500a3"}||{"dataType":"PIN","max":2}|
|
||||
{"type":"PIN","ticket":6,"id":"e3"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":3,"display":true,"x":20,"y":0,"length":3,"rotation":180,"color":null,"pinShape":"NONE"}|
|
||||
{"type":"ATTR","ticket":7,"id":"e4"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":4,"parentId":"e3","key":"Pin Name","value":"2","keyVisible":false,"valueVisible":false,"x":13,"y":1.91498,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"RIGHT_BOTTOM"}|
|
||||
{"type":"ATTR","ticket":8,"id":"e5"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":5,"parentId":"e3","key":"Pin Number","value":"2","keyVisible":false,"valueVisible":false,"x":21,"y":-2.08502,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_BOTTOM"}|
|
||||
{"type":"ATTR","ticket":9,"id":"e6"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":6,"parentId":"e3","key":"Pin Type","value":"Undefined","keyVisible":false,"valueVisible":false,"x":20,"y":0,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":null,"underline":null,"italic":null,"fontWeight":null,"align":null}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":10,"id":"66faff5f4b3e9c78"}||{"dataType":"PIN","max":3}|
|
||||
{"type":"PIN","ticket":11,"id":"e7"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":7,"display":true,"x":-20,"y":0,"length":3,"rotation":0,"color":null,"pinShape":"NONE"}|
|
||||
{"type":"ATTR","ticket":12,"id":"e8"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":8,"parentId":"e7","key":"Pin Name","value":"1","keyVisible":false,"valueVisible":false,"x":-13,"y":1.91498,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_BOTTOM"}|
|
||||
{"type":"ATTR","ticket":13,"id":"e9"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":9,"parentId":"e7","key":"Pin Number","value":"1","keyVisible":false,"valueVisible":false,"x":-21,"y":-2.08502,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"RIGHT_BOTTOM"}|
|
||||
{"type":"ATTR","ticket":14,"id":"e10"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":10,"parentId":"e7","key":"Pin Type","value":"Undefined","keyVisible":false,"valueVisible":false,"x":-20,"y":0,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":null,"underline":null,"italic":null,"fontWeight":null,"align":null}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":15,"id":"baa729d0fb86a381"}||{"dataType":"POLY","max":10}|
|
||||
{"type":"POLY","ticket":16,"id":"e11"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":11,"points":[{"x":-16.88211,"y":-0.05879},{"x":-16.68353,"y":-1.69688},{"x":-16.68353,"y":-1.69688},{"x":-15.8223,"y":-3.09377},{"x":-15.8223,"y":-3.09377},{"x":-14.48118,"y":-4.0129},{"x":-14.48118,"y":-4.0129},{"x":-12.8983,"y":-4.33041},{"x":-12.8983,"y":-4.33041},{"x":-11.31571,"y":-4.01133},{"x":-11.31571,"y":-4.01133},{"x":-9.97549,"y":-3.09083},{"x":-9.97549,"y":-3.09083},{"x":-9.11572,"y":-1.693},{"x":-9.11572,"y":-1.693},{"x":-8.91891,"y":-0.05469}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
|
||||
{"type":"POLY","ticket":17,"id":"e12"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":12,"points":[{"x":-8.39911,"y":-0.0618},{"x":-8.20031,"y":-1.69986},{"x":-8.20031,"y":-1.69986},{"x":-7.3389,"y":-3.09664},{"x":-7.3389,"y":-3.09664},{"x":-5.99767,"y":-4.01559},{"x":-5.99767,"y":-4.01559},{"x":-4.41475,"y":-4.3329},{"x":-4.41475,"y":-4.3329},{"x":-2.8322,"y":-4.01364},{"x":-2.8322,"y":-4.01364},{"x":-1.4921,"y":-3.09296},{"x":-1.4921,"y":-3.09296},{"x":-0.63251,"y":-1.69501},{"x":-0.63251,"y":-1.69501},{"x":-0.43592,"y":-0.05668}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
|
||||
{"type":"POLY","ticket":18,"id":"e13"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":13,"points":[{"x":0.06789,"y":-0.0618},{"x":0.26669,"y":-1.69986},{"x":0.26669,"y":-1.69986},{"x":1.1281,"y":-3.09664},{"x":1.1281,"y":-3.09664},{"x":2.46933,"y":-4.01559},{"x":2.46933,"y":-4.01559},{"x":4.05225,"y":-4.3329},{"x":4.05225,"y":-4.3329},{"x":5.6348,"y":-4.01364},{"x":5.6348,"y":-4.01364},{"x":6.9749,"y":-3.09296},{"x":6.9749,"y":-3.09296},{"x":7.83449,"y":-1.69501},{"x":7.83449,"y":-1.69501},{"x":8.03108,"y":-0.05668}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
|
||||
{"type":"POLY","ticket":19,"id":"e14"}||{"partId":"BLM18PG121SN1D_C14709.1","groupId":"","locked":false,"zIndex":14,"points":[{"x":8.70089,"y":-0.0598},{"x":8.89969,"y":-1.69786},{"x":8.89969,"y":-1.69786},{"x":9.7611,"y":-3.09464},{"x":9.7611,"y":-3.09464},{"x":11.10233,"y":-4.01359},{"x":11.10233,"y":-4.01359},{"x":12.68525,"y":-4.3309},{"x":12.68525,"y":-4.3309},{"x":14.2678,"y":-4.01164},{"x":14.2678,"y":-4.01164},{"x":15.6079,"y":-3.09096},{"x":15.6079,"y":-3.09096},{"x":16.46749,"y":-1.69301},{"x":16.46749,"y":-1.69301},{"x":16.66408,"y":-0.05468}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
|
||||
{"type":"DOCHEAD","ticket":8811}||{"docType":"SYMBOL","client":"0fb97aaaf7dbe284","uuid":"41251d7d80bdde82","updateTime":1759992873615,"version":"1721736956","user":{"uuid":"215caa123bec401fba5bbdb222b0e772","nickname":"一只不爱吃鱼的猫","username":"liuxiaotao","avatar":"//image.lceda.cn/avatars/2022/8/W4GUor1tCl7FLtACkLdILGxmVP32cSSHlLXizbhS.png"}}|
|
||||
{"type":"DOCHEAD","ticket":8811}||{"docType":"SYMBOL","client":"0d178074b27f50a0","uuid":"41251d7d80bdde82","updateTime":1759993193068,"version":"1721736956","user":{"uuid":"215caa123bec401fba5bbdb222b0e772","nickname":"一只不爱吃鱼的猫","username":"liuxiaotao","avatar":"//image.lceda.cn/avatars/2022/8/W4GUor1tCl7FLtACkLdILGxmVP32cSSHlLXizbhS.png"}}|
|
||||
Reference in New Issue
Block a user