打通 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>
52 lines
14 KiB
Plaintext
52 lines
14 KiB
Plaintext
{"type":"DOCHEAD","ticket":498}||{"docType":"FOOTPRINT","client":"0bb2c9fe-c897-4bff-b46c-eaa1f7c27461","uuid":"5d294aad950f4721abff417519f3d00f","updateTime":1749545739000,"version":"1711332260","editVersion":"3.2.91","user":{"uuid":"16555ec60452466ea4dbaa7c6b92cd89","nickname":"乐鑫小铁匠","username":"esp-college","avatar":"//image.lceda.cn/avatars/2023/7/DgnM9iWggXtWZa70BQwJnpb1x7P2etO5s7i6vqxp.png"}}|
|
|
{"type":"DOCHEAD","ticket":499}||{"docType":"FOOTPRINT","client":"0bb2c9fe-c897-4bff-b46c-eaa1f7c27461","uuid":"5d294aad950f4721abff417519f3d00f","updateTime":1749545739000,"version":"1711332260","editVersion":"3.2.91","user":{"uuid":"16555ec60452466ea4dbaa7c6b92cd89","nickname":"乐鑫小铁匠","username":"esp-college","avatar":"//image.lceda.cn/avatars/2023/7/DgnM9iWggXtWZa70BQwJnpb1x7P2etO5s7i6vqxp.png"}}|
|
|
{"type":"META","ticket":500,"id":"META"}||{"title":"SOT-23-3_L2.9-W1.6-P1.90-LS2.8-BR","description":";CPH-3;SOT-23;SOT-23A-3;SOT-23-3;SOT-23-3L;SSOP-3;-;SOT-23(TO-236);TSOT-23-3;TSOT-3L;SOT-346T;SOT-346;SC-59;AO3402L;SOT-23N;SOT-23F;TSOT-23-3L;SOT-323-4;SOT-23(SOT-23-3);SUPERSOT-3;SOT-23L;SOT23-3;SC-59-3;S-MiNi;SOT-23-3S;SOT-23A;SOT-23W;SC-61;SC-96;SOT-23S;SOT-23-3_L2.9-W1.6-P0.95-BL;TSOT-23;SOT-23LC;SOT-23-3_L2.9-W1.6-P0.95-LS2.8;SOT-23-3_L2.9-W1.6-P1.90-LS2.8-BL;SOT-23-3_L2.9-W1.6-P1.90-LS2.8-BR;SOT-23-3_L2.9-W1.6-P0.95-LS2.8-BR;SOT-23-3_L2.9-W1.6-P1.90-LS2.8;2300-SOT23;SOT-23-3_L2.9-W1.60-P1.90-LS2.8;SOT-23-3_L2.9-W1.5-P1.90-LS2.80-BL;SOT-23-3_L2.9-W1.5-P1.90-LS2.8;SOT-23-3_L2.8-W1.5-P1.90-LS2.8-BL;SOT-23-5L;SOT23-3_L2.9-W1.6-P19.0-LS2.8;SGM2021-3.3V;SOT-23-3_L2.9-W1.6-P1.90-LS2.80-BL;SOT95P245X110-3N;CE6232A33MSOT23-3;SOT23;SOT-23(SMALL);SOT-23-3_L3.0-W1.7-P0.95-LS2.8-BL;sot23;BAT54CLT1G;HAL493C;SOT-23-W1.6;SOT23-3-W1.6;SOT23-3L;TSOT-3;SOT-23-3(TO-236-3);TSMT-3;SOT-23-3 1.6;TL431_C181103;TO-236;TO-236-3;TSM;SOT23-W1.3;SOt23-3;SOT-23-3_L;SOT-23-3-W1.6;TO-236-3(SOT-23-3);SOT-25;SOT-23-3_W1.6","tags":["SOT-23-3"],"source":"078e43bc93394f49815211c4fd533d19|0819f05c4eef4c71ace90d822a990e87"}|
|
|
{"type":"DOCHEAD"}||{"docType":"FOOTPRINT","client":"2c5ecac844d4c9d6","uuid":"5d294aad950f4721abff417519f3d00f","updateTime":1749545739000,"version":"1711332260","editVersion":"3.2.91","user":{"uuid":"16555ec60452466ea4dbaa7c6b92cd89","nickname":"乐鑫小铁匠","username":"esp-college","avatar":"//image.lceda.cn/avatars/2023/7/DgnM9iWggXtWZa70BQwJnpb1x7P2etO5s7i6vqxp.png"}}|
|
|
{"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":51}|
|
|
{"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.5,"snapYSize":0.5,"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",55.115,-57.48,2.361]],"locked":false,"zIndex":1,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
|
{"type":"ELE_PLACEHOLDER","ticket":26,"id":"placeholder2"}||{"dataType":"FILL","max":10}|
|
|
{"type":"FILL","ticket":27,"id":"e12"}||{"groupId":0,"netName":"","layerId":50,"width":0.2,"fillStyle":"SOLID","path":[37.397,-45.276,"L",37.397,-29.528,55.113,-29.528,55.113,-45.276,37.397,-45.276],"locked":false,"zIndex":12,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
|
{"type":"FILL","ticket":28,"id":"e13"}||{"groupId":0,"netName":"","layerId":51,"width":0.2,"fillStyle":"SOLID","path":[31.097,-45.276,"L",31.097,-29.528,37.79,-29.528,37.79,-45.276,31.097,-45.276],"locked":false,"zIndex":13,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
|
{"type":"FILL","ticket":29,"id":"e14"}||{"groupId":0,"netName":"","layerId":50,"width":0.2,"fillStyle":"SOLID","path":[37.397,29.528,"L",37.397,45.276,55.113,45.276,55.113,29.528,37.397,29.528],"locked":false,"zIndex":14,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
|
{"type":"FILL","ticket":30,"id":"e15"}||{"groupId":0,"netName":"","layerId":51,"width":0.2,"fillStyle":"SOLID","path":[31.097,29.528,"L",31.097,45.276,37.79,45.276,37.79,29.528,31.097,29.528],"locked":false,"zIndex":15,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
|
{"type":"FILL","ticket":31,"id":"e16"}||{"groupId":0,"netName":"","layerId":50,"width":0.2,"fillStyle":"SOLID","path":[-37.407,-7.874,"L",-37.407,7.874,-55.123,7.874,-55.123,-7.874,-37.407,-7.874],"locked":false,"zIndex":16,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
|
{"type":"FILL","ticket":32,"id":"e17"}||{"groupId":0,"netName":"","layerId":51,"width":0.2,"fillStyle":"SOLID","path":[-37.8,-7.874,"L",-37.8,7.874,-31.107,7.874,-31.107,-7.874,-37.8,-7.874],"locked":false,"zIndex":17,"isBridgingCopper":false,"networkList":[],"refs":[]}|
|
|
{"type":"ELE_PLACEHOLDER","ticket":33,"id":"placeholder3"}||{"dataType":"POLY","max":2}|
|
|
{"type":"POLY","ticket":34,"id":"e2"}||{"groupId":0,"netName":"","layerId":13,"width":7.874,"path":["CIRCLE",65.005,-37.4,3.94],"locked":false,"zIndex":2,"polyType":"NORMAL"}|
|
|
{"type":"POLY","ticket":35,"id":"e3"}||{"groupId":0,"netName":"","layerId":48,"width":2,"path":[-31.501,-57.48,"L",-31.501,57.48,31.491,57.48,31.491,-57.48,-31.501,-57.48],"locked":false,"zIndex":3,"polyType":"NORMAL"}|
|
|
{"type":"POLY","ticket":36,"id":"e4"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[34.491,60.48,"L",-34.501,60.48],"locked":false,"zIndex":4,"polyType":"NORMAL"}|
|
|
{"type":"POLY","ticket":37,"id":"e5"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[-34.501,60.48,"L",-34.501,19.472],"locked":false,"zIndex":5,"polyType":"NORMAL"}|
|
|
{"type":"POLY","ticket":38,"id":"e6"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[34.491,-60.48,"L",-34.501,-60.48],"locked":false,"zIndex":6,"polyType":"NORMAL"}|
|
|
{"type":"POLY","ticket":39,"id":"e7"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[-34.501,-60.48,"L",-34.501,-19.472],"locked":false,"zIndex":7,"polyType":"NORMAL"}|
|
|
{"type":"POLY","ticket":40,"id":"e8"}||{"groupId":0,"netName":"","layerId":3,"width":6,"path":[34.491,17.929,"L",34.491,-17.929],"locked":false,"zIndex":8,"polyType":"NORMAL"}|
|
|
{"type":"ELE_PLACEHOLDER","ticket":41,"id":"placeholder4"}||{"dataType":"PAD","max":9}|
|
|
{"type":"PAD","ticket":42,"id":"e9"}||{"groupId":0,"netName":"","layerId":1,"num":"1","centerX":48.625,"centerY":-37.4,"padAngle":0,"hole":null,"defaultPad":{"padType":"RECT","width":42.126,"height":23.622,"radius":0},"specialPad":[],"padOffsetX":-0.008,"padOffsetY":-0.002,"relativeAngle":0,"plated":true,"padType":"NORMAL","topSolderExpansion":null,"bottomSolderExpansion":null,"topPasteExpansion":null,"bottomPasteExpansion":null,"locked":false,"zIndex":9,"connectMode":null,"spokeSpace":null,"spokeWidth":null,"spokeAngle":null,"padLen":0}|
|
|
{"type":"PAD","ticket":43,"id":"e10"}||{"groupId":0,"netName":"","layerId":1,"num":"2","centerX":48.625,"centerY":37.4,"padAngle":0,"hole":null,"defaultPad":{"padType":"RECT","width":42.126,"height":23.622,"radius":0},"specialPad":[],"padOffsetX":-0.008,"padOffsetY":0.002,"relativeAngle":0,"plated":true,"padType":"NORMAL","topSolderExpansion":null,"bottomSolderExpansion":null,"topPasteExpansion":null,"bottomPasteExpansion":null,"locked":false,"zIndex":10,"connectMode":null,"spokeSpace":null,"spokeWidth":null,"spokeAngle":null,"padLen":0}|
|
|
{"type":"PAD","ticket":44,"id":"e11"}||{"groupId":0,"netName":"","layerId":1,"num":"3","centerX":-48.625,"centerY":0,"padAngle":0,"hole":null,"defaultPad":{"padType":"RECT","width":42.126,"height":23.622,"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":11,"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.6-P1.90-LS2.8-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}|
|