Files
FacereDataset/data/raw/oshwhub/b77840665e2e48148c1b04ce84b5f7e7/source/68c2d6470a8ce178.epro2
Knowit 3282a028c4 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>
2026-04-28 21:45:52 +08:00

40 lines
9.9 KiB
Plaintext

{"type":"DOCHEAD","ticket":10132}||{"docType":"SYMBOL","client":"0189349a42729895","uuid":"68c2d6470a8ce178","updateTime":1759507164288,"version":"dbaf2984140aa79cd4b62cc8fd1becaf"}|
{"type":"META","ticket":10133,"id":"META"}||{"title":"MOS_N3P","description":"","tags":[],"docType":2,"source":"594c248c69717e25bb80cdff8241bf08|5980bffcf5b8460bb9378df5856f3e50"}|
{"type":"DOCHEAD"}||{"docType":"SYMBOL","client":"571c8141eb34867e","uuid":"68c2d6470a8ce178","updateTime":1752632858220,"version":"dbaf2984140aa79cd4b62cc8fd1becaf"}|
{"type":"CANVAS","ticket":1,"id":"CANVAS"}||{"originX":0,"originY":0}|
{"type":"PART","ticket":2,"id":"MOS_N3P.1"}||{"BBOX":[-0.5,-40.5,45.5,0.5],"title":"MOS_N3P.1"}|
{"type":"ATTR","ticket":3,"id":"ie1"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"","key":"Symbol","value":"MOS_N3P","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":4,"id":"ec6f1e0fa2b544c0"}||{"dataType":"POLY","max":1}|
{"type":"POLY","ticket":5,"id":"ie2"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":15,"y":20},{"x":20,"y":15},{"x":20,"y":15},{"x":20,"y":25},{"x":20,"y":25},{"x":15,"y":20}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":6,"id":"ie3"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":35,"y":20},{"x":45,"y":20},{"x":45,"y":20},{"x":40,"y":15},{"x":40,"y":15},{"x":35,"y":20}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":7,"id":"ie4"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":35,"y":15},{"x":45,"y":15}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":8,"id":"ie5"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":10,"y":10},{"x":10,"y":30}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":9,"id":"ie6"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":10,"y":30},{"x":0,"y":30}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":10,"id":"ie7"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":15,"y":35},{"x":15,"y":27}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":11,"id":"ie8"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":15,"y":24},{"x":15,"y":16}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":12,"id":"ie9"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":15,"y":13},{"x":15,"y":5}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":13,"id":"ie10"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":15,"y":31},{"x":40,"y":31}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":14,"id":"ie11"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":40,"y":31},{"x":40,"y":20}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":15,"id":"ie12"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":40,"y":15},{"x":40,"y":9}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":16,"id":"ie13"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":40,"y":9},{"x":15,"y":9}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":17,"id":"ie14"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":30,"y":0},{"x":30,"y":9}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":18,"id":"ie15"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":20,"y":20},{"x":30,"y":20}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":19,"id":"ie16"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"points":[{"x":30,"y":20},{"x":30,"y":40}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"ELE_PLACEHOLDER","ticket":20,"id":"5c1f7e4b703b83a1"}||{"dataType":"PIN","max":16}|
{"type":"PIN","ticket":21,"id":"ie17"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"display":true,"x":30,"y":-10,"length":10,"rotation":270,"color":null,"pinShape":"NONE"}|
{"type":"ATTR","ticket":22,"id":"ie18"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie17","key":"NAME","value":"DRAIN","keyVisible":false,"valueVisible":false,"x":30,"y":6,"rotation":90,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"RIGHT_MIDDLE"}|
{"type":"ATTR","ticket":23,"id":"ie19"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie17","key":"NUMBER","value":"3","keyVisible":false,"valueVisible":true,"x":30,"y":-8,"rotation":90,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_BOTTOM"}|
{"type":"ATTR","ticket":24,"id":"ie20"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie17","key":"Pin Type","value":"Passive","keyVisible":false,"valueVisible":false,"x":30,"y":-10,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":null,"underline":null,"italic":null,"fontWeight":null,"align":null}|
{"type":"ELE_PLACEHOLDER","ticket":25,"id":"5de9ea10bcb33864"}||{"dataType":"PIN","max":3}|
{"type":"PIN","ticket":26,"id":"ie21"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"display":true,"x":-10,"y":30,"length":10,"rotation":0,"color":null,"pinShape":"NONE"}|
{"type":"ATTR","ticket":27,"id":"ie22"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie21","key":"NAME","value":"GATE","keyVisible":false,"valueVisible":false,"x":6,"y":30,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_MIDDLE"}|
{"type":"ATTR","ticket":28,"id":"ie23"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie21","key":"NUMBER","value":"1","keyVisible":false,"valueVisible":true,"x":-8,"y":30,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"RIGHT_BOTTOM"}|
{"type":"ATTR","ticket":29,"id":"ie24"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie21","key":"Pin Type","value":"IN","keyVisible":false,"valueVisible":false,"x":-10,"y":30,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":null,"underline":null,"italic":null,"fontWeight":null,"align":null}|
{"type":"ELE_PLACEHOLDER","ticket":30,"id":"2bd5e4d83cd116ad"}||{"dataType":"PIN","max":3}|
{"type":"PIN","ticket":31,"id":"ie25"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"display":true,"x":30,"y":50,"length":10,"rotation":90,"color":null,"pinShape":"NONE"}|
{"type":"ATTR","ticket":32,"id":"ie26"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie25","key":"NAME","value":"SOURCE","keyVisible":false,"valueVisible":false,"x":30,"y":34,"rotation":90,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_MIDDLE"}|
{"type":"ATTR","ticket":33,"id":"ie27"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie25","key":"NUMBER","value":"2","keyVisible":false,"valueVisible":true,"x":30,"y":48,"rotation":90,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":false,"underline":false,"italic":false,"fontWeight":false,"align":"RIGHT_BOTTOM"}|
{"type":"ATTR","ticket":34,"id":"ie28"}||{"partId":"MOS_N3P.1","groupId":"","locked":false,"zIndex":null,"parentId":"ie25","key":"Pin Type","value":"Passive","keyVisible":false,"valueVisible":false,"x":30,"y":50,"rotation":0,"color":null,"fillColor":null,"fontFamily":null,"fontSize":null,"strikeout":null,"underline":null,"italic":null,"fontWeight":null,"align":null}|
{"type":"DOCHEAD","ticket":10132}||{"docType":"SYMBOL","client":"0fb97aaaf7dbe284","uuid":"68c2d6470a8ce178","updateTime":1759992873615,"version":"dbaf2984140aa79cd4b62cc8fd1becaf","user":{"uuid":"215caa123bec401fba5bbdb222b0e772","nickname":"一只不爱吃鱼的猫","username":"liuxiaotao","avatar":"//image.lceda.cn/avatars/2022/8/W4GUor1tCl7FLtACkLdILGxmVP32cSSHlLXizbhS.png"}}|
{"type":"DOCHEAD","ticket":10132}||{"docType":"SYMBOL","client":"0d178074b27f50a0","uuid":"68c2d6470a8ce178","updateTime":1759993193068,"version":"dbaf2984140aa79cd4b62cc8fd1becaf","user":{"uuid":"215caa123bec401fba5bbdb222b0e772","nickname":"一只不爱吃鱼的猫","username":"liuxiaotao","avatar":"//image.lceda.cn/avatars/2022/8/W4GUor1tCl7FLtACkLdILGxmVP32cSSHlLXizbhS.png"}}|