Files
FacereDataset/data/raw/oshwhub/dc91a91e669349898d709a5ba02f5b5f/source/c82ec8493c194217a96fdec9918d2b4c.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

22 lines
7.3 KiB
Plaintext

{"type":"DOCHEAD","ticket":168}||{"docType":"SYMBOL","client":"5796efe0-71be-4764-a7be-8620972bb90b","uuid":"c82ec8493c194217a96fdec9918d2b4c","updateTime":1739151671000,"version":"1730712559","user":{"uuid":"f6d958b048194965970a097419f0f68a","nickname":"重庆枫叶","username":"cqlcp","avatar":"//image.lceda.cn/avatars/2026/1/FneZQD4JKfDDm92UUIa483axw2OD9PF1E07L9Aby.webp"}}|
{"type":"DOCHEAD","ticket":169}||{"docType":"SYMBOL","client":"5796efe0-71be-4764-a7be-8620972bb90b","uuid":"c82ec8493c194217a96fdec9918d2b4c","updateTime":1739151671000,"version":"1730712559","user":{"uuid":"f6d958b048194965970a097419f0f68a","nickname":"重庆枫叶","username":"cqlcp","avatar":"//image.lceda.cn/avatars/2026/1/FneZQD4JKfDDm92UUIa483axw2OD9PF1E07L9Aby.webp"}}|
{"type":"META","ticket":170,"id":"META"}||{"title":"65125-22uH15A1.2线径卧式","description":"https://item.taobao.com/item.htm?abbucket=3&id=709154333568&ns=1&priceTId=2147822517307053591911815ed59e&spm=a21n57.1.item.14.53bd523cIYMWNH&utparam=%7B%22aplus_abtest%22%3A%2212c49f696b554dc6caab7fdc91dbb808%22%7D&xxc=taobaoSearch&skuId=4973967580770","tags":[],"docType":2,"source":"106474c951484fbfad12b605a4d71d74|user"}|
{"type":"DOCHEAD"}||{"docType":"SYMBOL","client":"1b6fdcef8820a5c8","uuid":"c82ec8493c194217a96fdec9918d2b4c","updateTime":1739151671000,"version":"1730712559","user":{"uuid":"f6d958b048194965970a097419f0f68a","nickname":"重庆枫叶","username":"cqlcp","avatar":"//image.lceda.cn/avatars/2026/1/FneZQD4JKfDDm92UUIa483axw2OD9PF1E07L9Aby.webp"}}|
{"type":"CANVAS","ticket":1,"id":"CANVAS"}||{"originX":0,"originY":0}|
{"type":"PART","ticket":2,"id":"65125-22uH15A1.2线径卧式.1"}||{"BBOX":[-16.879,4.35951,16.669200000000004,0.04998999999999931],"title":"65125-22uH15A1.2线径卧式.1"}|
{"type":"ELE_PLACEHOLDER","ticket":3,"id":"placeholder1"}||{"dataType":"PIN","max":18}|
{"type":"PIN","ticket":4,"id":"e19"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":1,"display":true,"x":20,"y":0,"length":3,"rotation":180,"color":null,"pinShape":"NONE"}|
{"type":"ATTR","ticket":5,"id":"e20"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":2,"parentId":"e19","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":null,"underline":false,"italic":false,"fontWeight":false,"align":"RIGHT_BOTTOM","version":"2.0"}|
{"type":"ATTR","ticket":6,"id":"e21"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":3,"parentId":"e19","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":null,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_BOTTOM","version":"2.0"}|
{"type":"ATTR","ticket":7,"id":"e22"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":4,"parentId":"e19","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":"LEFT_BOTTOM","version":"2.0"}|
{"type":"ELE_PLACEHOLDER","ticket":8,"id":"placeholder2"}||{"dataType":"PIN","max":3}|
{"type":"PIN","ticket":9,"id":"e23"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":5,"display":true,"x":-20,"y":0,"length":3,"rotation":0,"color":null,"pinShape":"NONE"}|
{"type":"ATTR","ticket":10,"id":"e24"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":6,"parentId":"e23","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":null,"underline":false,"italic":false,"fontWeight":false,"align":"LEFT_BOTTOM","version":"2.0"}|
{"type":"ATTR","ticket":11,"id":"e25"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":7,"parentId":"e23","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":null,"underline":false,"italic":false,"fontWeight":false,"align":"RIGHT_BOTTOM","version":"2.0"}|
{"type":"ATTR","ticket":12,"id":"e26"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":8,"parentId":"e23","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":"LEFT_BOTTOM","version":"2.0"}|
{"type":"ELE_PLACEHOLDER","ticket":13,"id":"placeholder3"}||{"dataType":"POLY","max":14}|
{"type":"POLY","ticket":14,"id":"e15"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":9,"points":[{"x":-16.879,"y":-0.06024000000000029},{"x":-16.68807,"y":-1.7056199999999997},{"x":-15.8282,"y":-3.1108200000000004},{"x":-14.4834,"y":-4.03569},{"x":-12.894460000000002,"y":-4.35448},{"x":-11.306269999999998,"y":-4.03177},{"x":-9.963749999999997,"y":-3.10344},{"x":-9.10754,"y":-1.6959},{"x":-8.92106,"y":-0.04998999999999931}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":15,"id":"e16"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":10,"points":[{"x":-8.398969999999998,"y":-0.06011999999999951},{"x":-8.210270000000001,"y":-1.7057699999999993},{"x":-7.352240000000002,"y":-3.1121599999999994},{"x":-6.008569999999999,"y":-4.03876},{"x":-4.420000000000002,"y":-4.35951},{"x":-2.831430000000001,"y":-4.03876},{"x":-1.4877600000000015,"y":-3.1121599999999994},{"x":-0.6297299999999986,"y":-1.7057699999999993},{"x":-0.44103000000000137,"y":-0.06011999999999951}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":16,"id":"e17"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":11,"points":[{"x":0.07103000000000037,"y":-0.06011999999999951},{"x":0.2597300000000011,"y":-1.7057699999999993},{"x":1.1177600000000005,"y":-3.1121599999999994},{"x":2.46143,"y":-4.03876},{"x":4.049999999999997,"y":-4.35951},{"x":5.638570000000001,"y":-4.03876},{"x":6.982239999999997,"y":-3.1121599999999994},{"x":7.840270000000004,"y":-1.7057699999999993},{"x":8.028970000000001,"y":-0.06011999999999951}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|
{"type":"POLY","ticket":17,"id":"e18"}||{"partId":"65125-22uH15A1.2线径卧式.1","groupId":"","locked":false,"zIndex":12,"points":[{"x":8.70075,"y":-0.061540000000000816},{"x":8.910229999999999,"y":-1.6913699999999992},{"x":9.775109999999998,"y":-3.0778599999999994},{"x":11.113640000000004,"y":-3.9886800000000004},{"x":12.690460000000002,"y":-4.30239},{"x":14.266550000000002,"y":-3.9847900000000003},{"x":15.602850000000004,"y":-3.0705399999999994},{"x":16.46412,"y":-1.6816999999999993},{"x":16.669200000000004,"y":-0.051289999999999836}],"closed":false,"strokeColor":null,"strokeStyle":null,"fillColor":null,"strokeWidth":null,"fillStyle":null}|