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,51 @@
|
||||
{"type":"DOCHEAD","ticket":1050}||{"docType":"FOOTPRINT","client":"5796efe0-71be-4764-a7be-8620972bb90b","uuid":"33ffe77b3bb04d95a3309f50db3fbe79","updateTime":1736051603000,"version":"1651211575","user":{"uuid":"f6d958b048194965970a097419f0f68a","nickname":"重庆枫叶","username":"cqlcp","avatar":"//image.lceda.cn/avatars/2026/1/FneZQD4JKfDDm92UUIa483axw2OD9PF1E07L9Aby.webp"}}|
|
||||
{"type":"DOCHEAD","ticket":1051}||{"docType":"FOOTPRINT","client":"5796efe0-71be-4764-a7be-8620972bb90b","uuid":"33ffe77b3bb04d95a3309f50db3fbe79","updateTime":1736051603000,"version":"1651211575","user":{"uuid":"f6d958b048194965970a097419f0f68a","nickname":"重庆枫叶","username":"cqlcp","avatar":"//image.lceda.cn/avatars/2026/1/FneZQD4JKfDDm92UUIa483axw2OD9PF1E07L9Aby.webp"}}|
|
||||
{"type":"META","ticket":1052,"id":"META"}||{"title":"SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR","description":";SOT-23-3;CPH-3;SOT-23;SOT-23(TO-236);SOT-23B-3;SOT-23A-3;SOT-3;SOT-223-3;TO-236-3,SC-59,SOT-23-3;SOT-23-3L;TO-23(TO-236);TO-236-3;SOT-323(SC-70);SOT-323-6;TO-236AB;-;SOT-223;SOT-323-3;SOT23-3;PG-SOT23-3;SUPERSOT-3;SOT-23F-3;SMD;SOT23;SOT-23-3S;SOT-23S;SOT-23N;SOT-23R;SOT-23(SOT-23-3);TO-236;SOT-23A;---;TO-236-3, SC-59, SOT-23-3;SOT-23F-3L;SOT-23L;SOT-23E;TSOT-23-3;SC-59-3;SOT-23-3A;SOT-23-3_1.3x2.9x1.90P;SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR;PG-SOT23;SOT-23-3_L2.9-W1.3-P0.95-LS2.4-BL;SOT-23-3_L2.9-W1.3;SGM2203-3_3AYN3LG_TR_SGM2203-3_;SOT-23-3_L2.9-W1.3-P1.90-LS2.4;SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BL;SOT-23-3_L2.9-W1.3-P1.90-LS2.40;SOT-23-3_L2.9-W1.3-P1.90-LS2.40-BL;SOT-23-3_L2.9-W1.6-P1.90-LS2.4;SOT_233_W;LC-SOT-23(SOT-23-3);SMT_SOT-23-3;SOT-23-5_L3.0-W1.7-P0.95-LS2.8-BR;SOT-23-3_L2.9-W1.3-P1.90-LS2.3-BL;BAT54S;SOT23A;MCP;SOT-23-3-11;SOT-23-3(TO-236-3);SOT-23(SOT-236);SOT-23R-3;SOT-523(SC-75);SST-3;SOT-23-5;UMAX-8;SC-70-3;DIP-24;SOT23-3-W1.3;SOT23-G;SuperSOT-7;SOT-23-3(TO-236);SOT-23(2.9x1.3);SOT-23-W1.3;SOT-323;TSOT23-3;SOT-23_W1.3;SOT23-3L;SOT23_L;SOT23G-3;TSOT-26;SOT-23F","tags":["SOT-23-3"],"source":"bdad16194d454cb292a50525f39c3ffd|0819f05c4eef4c71ace90d822a990e87"}|
|
||||
{"type":"DOCHEAD"}||{"docType":"FOOTPRINT","client":"a2637beed1e3afd8","uuid":"33ffe77b3bb04d95a3309f50db3fbe79","updateTime":1736051603000,"version":"1651211575","user":{"uuid":"f6d958b048194965970a097419f0f68a","nickname":"重庆枫叶","username":"cqlcp","avatar":"//image.lceda.cn/avatars/2026/1/FneZQD4JKfDDm92UUIa483axw2OD9PF1E07L9Aby.webp"}}|
|
||||
{"type":"LAYER","ticket":1,"id":"[\"LAYER\",1]"}||{"layerType":"TOP","layerName":"Top Layer","use":true,"show":true,"locked":false,"activeColor":"#FF0000","activateTransparency":1,"inactiveColor":"#7F0000","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":2,"id":"[\"LAYER\",2]"}||{"layerType":"BOTTOM","layerName":"Bottom Layer","use":true,"show":true,"locked":false,"activeColor":"#0000FF","activateTransparency":1,"inactiveColor":"#00007F","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":3,"id":"[\"LAYER\",3]"}||{"layerType":"TOP_SILK","layerName":"Top Silkscreen Layer","use":true,"show":true,"locked":false,"activeColor":"#FFCC00","activateTransparency":1,"inactiveColor":"#7F6600","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":4,"id":"[\"LAYER\",4]"}||{"layerType":"BOT_SILK","layerName":"Bottom Silkscreen Layer","use":true,"show":true,"locked":false,"activeColor":"#66CC33","activateTransparency":1,"inactiveColor":"#336619","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":5,"id":"[\"LAYER\",7]"}||{"layerType":"TOP_PASTE_MASK","layerName":"Top Paste Mask Layer","use":true,"show":true,"locked":false,"activeColor":"#808080","activateTransparency":1,"inactiveColor":"#404040","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":6,"id":"[\"LAYER\",8]"}||{"layerType":"BOT_PASTE_MASK","layerName":"Bottom Paste Mask Layer","use":true,"show":true,"locked":false,"activeColor":"#800000","activateTransparency":1,"inactiveColor":"#400000","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":7,"id":"[\"LAYER\",5]"}||{"layerType":"TOP_SOLDER_MASK","layerName":"Top Solder Mask Layer","use":true,"show":true,"locked":false,"activeColor":"#800080","activateTransparency":1,"inactiveColor":"#400040","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":8,"id":"[\"LAYER\",6]"}||{"layerType":"BOT_SOLDER_MASK","layerName":"Bottom Solder Mask Layer","use":true,"show":true,"locked":false,"activeColor":"#AA00FF","activateTransparency":1,"inactiveColor":"#55007F","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":9,"id":"[\"LAYER\",13]"}||{"layerType":"DOCUMENT","layerName":"Document Layer","use":true,"show":true,"locked":false,"activeColor":"#FFFFFF","activateTransparency":1,"inactiveColor":"#7F7F7F","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":10,"id":"[\"LAYER\",11]"}||{"layerType":"OUTLINE","layerName":"Board Outline Layer","use":true,"show":true,"locked":false,"activeColor":"#FF00FF","activateTransparency":1,"inactiveColor":"#7F007F","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":11,"id":"[\"LAYER\",12]"}||{"layerType":"MULTI","layerName":"Multi-Layer","use":true,"show":true,"locked":false,"activeColor":"#C0C0C0","activateTransparency":1,"inactiveColor":"#606060","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":12,"id":"[\"LAYER\",9]"}||{"layerType":"TOP_ASSEMBLY","layerName":"Top Assembly Layer","use":true,"show":true,"locked":false,"activeColor":"#33CC99","activateTransparency":1,"inactiveColor":"#19664C","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":13,"id":"[\"LAYER\",10]"}||{"layerType":"BOT_ASSEMBLY","layerName":"Bottom Assembly Layer","use":true,"show":true,"locked":false,"activeColor":"#5555FF","activateTransparency":1,"inactiveColor":"#2A2A7F","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":14,"id":"[\"LAYER\",14]"}||{"layerType":"MECHANICAL","layerName":"Mechanical Layer","use":true,"show":true,"locked":false,"activeColor":"#F022F0","activateTransparency":1,"inactiveColor":"#781178","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":15,"id":"[\"LAYER\",52]"}||{"layerType":"COMPONENT_MODEL","layerName":"Component Model Layer","use":true,"show":true,"locked":false,"activeColor":"#FFFFFF","activateTransparency":1,"inactiveColor":"#7F7F7F","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":16,"id":"[\"LAYER\",48]"}||{"layerType":"COMPONENT_SHAPE","layerName":"Component Shape Layer","use":true,"show":true,"locked":false,"activeColor":"#00CCCC","activateTransparency":1,"inactiveColor":"#006666","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":17,"id":"[\"LAYER\",51]"}||{"layerType":"PIN_FLOATING","layerName":"Pin Floating Layer","use":true,"show":true,"locked":false,"activeColor":"#FF99FF","activateTransparency":1,"inactiveColor":"#7F4C7F","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":18,"id":"[\"LAYER\",49]"}||{"layerType":"COMPONENT_MARKING","layerName":"Component Marking Layer","use":true,"show":true,"locked":false,"activeColor":"#66FFCC","activateTransparency":1,"inactiveColor":"#337F66","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":19,"id":"[\"LAYER\",47]"}||{"layerType":"HOLE","layerName":"Hole Layer","use":true,"show":true,"locked":false,"activeColor":"#222222","activateTransparency":1,"inactiveColor":"#111111","inactiveTransparency":0.5}|
|
||||
{"type":"LAYER","ticket":20,"id":"[\"LAYER\",50]"}||{"layerType":"PIN_SOLDERING","layerName":"Pin Soldering Layer","use":true,"show":true,"locked":false,"activeColor":"#CC9999","activateTransparency":1,"inactiveColor":"#664C4C","inactiveTransparency":0.5}|
|
||||
{"type":"ACTIVE_LAYER","ticket":21,"id":"ACTIVE_LAYER"}||{"layerId":13}|
|
||||
{"type":"ACTIVE_LAYER","ticket":22,"id":"ACTIVE_LAYER"}||{"layerId":1}|
|
||||
{"type":"CANVAS","ticket":23,"id":"CANVAS"}||{"originX":0,"originY":0,"unit":"mm","gridXSize":10,"gridYSize":10,"snapXSize":0.03937,"snapYSize":0.03937,"gridType":"NONE","multiGridType":"NONE","highlightValue":0.5}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":24,"id":"placeholder1"}||{"dataType":"FILL","max":1}|
|
||||
{"type":"FILL","ticket":25,"id":"e1"}||{"groupId":0,"netName":"","layerId":49,"width":0.2,"fillStyle":"SOLID","path":[["CIRCLE",47.244,-57.087,2.362]],"locked":false,"zIndex":1,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
||||
{"type":"FILL","ticket":26,"id":"e2"}||{"groupId":0,"netName":"","layerId":51,"width":0.2,"fillStyle":"SOLID","path":[25.197,28.935,"L",25.197,45.865,35.827,45.865,35.827,28.935,25.197,28.935],"locked":false,"zIndex":2,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
||||
{"type":"FILL","ticket":27,"id":"e3"}||{"groupId":0,"netName":"","layerId":50,"width":0.2,"fillStyle":"SOLID","path":[35.433,28.935,"L",35.433,45.865,47.244,45.865,47.244,28.935,35.433,28.935],"locked":false,"zIndex":3,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
||||
{"type":"FILL","ticket":28,"id":"e4"}||{"groupId":0,"netName":"","layerId":51,"width":0.2,"fillStyle":"SOLID","path":[25.197,-45.865,"L",25.197,-28.935,35.827,-28.935,35.827,-45.865,25.197,-45.865],"locked":false,"zIndex":4,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
||||
{"type":"FILL","ticket":29,"id":"e5"}||{"groupId":0,"netName":"","layerId":50,"width":0.2,"fillStyle":"SOLID","path":[35.433,-45.865,"L",35.433,-28.935,47.244,-28.935,47.244,-45.865,35.433,-45.865],"locked":false,"zIndex":5,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
||||
{"type":"FILL","ticket":30,"id":"e6"}||{"groupId":0,"netName":"","layerId":51,"width":0.2,"fillStyle":"SOLID","path":[-35.827,-8.465,"L",-35.827,8.465,-25.197,8.465,-25.197,-8.465,-35.827,-8.465],"locked":false,"zIndex":6,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
||||
{"type":"FILL","ticket":31,"id":"e7"}||{"groupId":0,"netName":"","layerId":50,"width":0.2,"fillStyle":"SOLID","path":[-47.244,-8.465,"L",-47.244,8.465,-35.433,8.465,-35.433,-8.465,-47.244,-8.465],"locked":false,"zIndex":7,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":32,"id":"placeholder2"}||{"dataType":"POLY","max":8}|
|
||||
{"type":"POLY","ticket":33,"id":"e8"}||{"groupId":0,"netName":"","layerId":48,"width":2,"path":[-25.591,-57.087,"L",-25.591,57.087,25.591,57.087,25.591,-57.087,-25.591,-57.087],"locked":false,"zIndex":8,"polyType":"NORMAL"}|
|
||||
{"type":"POLY","ticket":34,"id":"e9"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[28.591,60.087,"L",-28.591,60.087],"locked":false,"zIndex":9,"polyType":"NORMAL"}|
|
||||
{"type":"POLY","ticket":35,"id":"e10"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[-28.591,60.087,"L",-28.591,19.472],"locked":false,"zIndex":10,"polyType":"NORMAL"}|
|
||||
{"type":"POLY","ticket":36,"id":"e11"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[28.591,-60.087,"L",-28.591,-60.087],"locked":false,"zIndex":11,"polyType":"NORMAL"}|
|
||||
{"type":"POLY","ticket":37,"id":"e12"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[-28.591,-60.087,"L",-28.591,-19.472],"locked":false,"zIndex":12,"polyType":"NORMAL"}|
|
||||
{"type":"POLY","ticket":38,"id":"e13"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[28.591,17.929,"L",28.591,-17.929],"locked":false,"zIndex":13,"polyType":"NORMAL"}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":39,"id":"placeholder3"}||{"dataType":"POLY","max":3}|
|
||||
{"type":"POLY","ticket":40,"id":"e17"}||{"groupId":0,"netName":"","layerId":13,"width":7.874,"path":["CIRCLE",57.48,-43.31,3.94],"locked":false,"zIndex":17,"polyType":"NORMAL"}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":41,"id":"placeholder4"}||{"dataType":"PAD","max":14}|
|
||||
{"type":"PAD","ticket":42,"id":"e14"}||{"groupId":0,"netName":"","layerId":1,"num":"1","centerX":39.37,"centerY":-37.4,"padAngle":0,"hole":null,"defaultPad":{"padType":"RECT","width":49.213,"height":27.559,"radius":0},"specialPad":[],"padOffsetX":-0.002,"padOffsetY":-0.002,"relativeAngle":0,"plated":true,"padType":"NORMAL","topSolderExpansion":null,"bottomSolderExpansion":null,"topPasteExpansion":null,"bottomPasteExpansion":null,"locked":false,"zIndex":14,"connectMode":null,"spokeSpace":null,"spokeWidth":null,"spokeAngle":null,"padLen":0}|
|
||||
{"type":"PAD","ticket":43,"id":"e15"}||{"groupId":0,"netName":"","layerId":1,"num":"2","centerX":39.37,"centerY":37.4,"padAngle":0,"hole":null,"defaultPad":{"padType":"RECT","width":49.213,"height":27.559,"radius":0},"specialPad":[],"padOffsetX":-0.002,"padOffsetY":0.002,"relativeAngle":0,"plated":true,"padType":"NORMAL","topSolderExpansion":null,"bottomSolderExpansion":null,"topPasteExpansion":null,"bottomPasteExpansion":null,"locked":false,"zIndex":15,"connectMode":null,"spokeSpace":null,"spokeWidth":null,"spokeAngle":null,"padLen":0}|
|
||||
{"type":"PAD","ticket":44,"id":"e16"}||{"groupId":0,"netName":"","layerId":1,"num":"3","centerX":-39.37,"centerY":0,"padAngle":0,"hole":null,"defaultPad":{"padType":"RECT","width":49.213,"height":27.559,"radius":0},"specialPad":[],"padOffsetX":0.002,"padOffsetY":0,"relativeAngle":0,"plated":true,"padType":"NORMAL","topSolderExpansion":null,"bottomSolderExpansion":null,"topPasteExpansion":null,"bottomPasteExpansion":null,"locked":false,"zIndex":16,"connectMode":null,"spokeSpace":null,"spokeWidth":null,"spokeAngle":null,"padLen":0}|
|
||||
{"type":"ELE_PLACEHOLDER","ticket":45,"id":"placeholder5"}||{"dataType":"ATTR","max":18}|
|
||||
{"type":"ATTR","ticket":46,"id":"e18"}||{"groupId":0,"parentId":"","layerId":3,"x":null,"y":null,"key":"Footprint","value":"SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR","keyVisible":false,"valueVisible":false,"fontFamily":"default","fontSize":67.5,"strokeWidth":6,"bold":false,"italic":false,"origin":"LEFT_BOTTOM","angle":0,"reverse":false,"expansion":0,"mirror":false,"locked":false,"zIndex":18}|
|
||||
{"type":"ATTR","ticket":47,"id":"e19"}||{"groupId":0,"parentId":"","layerId":3,"x":null,"y":null,"key":"Designator","value":"U?","keyVisible":false,"valueVisible":false,"fontFamily":"default","fontSize":67.5,"strokeWidth":6,"bold":false,"italic":false,"origin":"LEFT_BOTTOM","angle":0,"reverse":false,"expansion":0,"mirror":false,"locked":false,"zIndex":19}|
|
||||
Reference in New Issue
Block a user