29530e09d2
飞控-77: 77 std flight-controller projects ingested
...
Topic-targeted pull from local listing index (`name OR introduction`
contains 飞控). 79 std hits in oshwhub_listing_full.jsonl, 2 already
crawled, 77 newly fetched.
dev1 (Guangzhou) walltime:
Step 1 detail scrape ~12s, Step 4 std-source backfill ~80s
(concurrency=5)
Source completeness: 73/77 with editor source, 4 are upstream
attachments-only (no editor session ever attached, source_documents=[]
is genuine — no editor_version on the SSR page either).
Crawler hardening (crawlers/oshwhub/crawler.py):
- count.{like,star,fork,views} are now `.get(..., 0)` defensive.
Listing API omits zero-valued fields for some low-activity entries
(3/77 hit this on first pass, hard-failed with KeyError 'like').
Affects rank_score, pick_top, and metadata.json metrics block.
License mix: 65% GPL 3.0, 11% Public Domain, 11% MIT, ~6% CC variants.
Transport: dev1 → SG via tar+scp (33 MB, ~3 min over lossy
cross-region link). Bypassed gitea push from dev1 because the same
6.5%-loss link tanks single-stream throughput.
2026-04-30 19:05:57 +08:00
qcloud
c199840ad3
飞控-77: 74 std flight-controller projects ingested
...
Topic-pull from local listing index (`name OR introduction` contains
飞控). 77 std hits in oshwhub_listing_full.jsonl, minus 2 already
crawled = 75 attempted; 74 OK + 1 hard fail (`m1_mh743_ada_v4`,
listing entry missing `count.like`).
dev1 walltime: Step 1 ~12s, Step 4 ~80s (concurrency=5).
License mix: 65% GPL 3.0, 11% Public Domain, 11% MIT, 4% CC variants.
3 partial dirs (Step 1 KeyError on missing `count.like`) dropped — to
be re-fetched after a follow-up crawler patch makes count fields
defensive against listing-index outliers.
Source backfill 74/74 OK, total +46 MB.
2026-04-30 18:52:22 +08:00
7f3729b89c
projects.md: rebuild index after batch-50 (65 projects)
...
Refreshed via scripts/build_index.py. Reflects the full corpus state
post batch-50 Step 1-4 + Super Dial deprecated-board fix:
65 projects · 253 attachments · 3.1 GB declared
by origin: Pro 30 (5 modern + 25 legacy) + Std 35
by license: GPL 3.0 dominant, ~80% Forge-friendly
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-29 02:25:36 +08:00
c721e08c93
projects.md: replace Comments column with 版本 (Std / Pro 3.x / Pro 2.x)
...
Comments 那列对工程"品质"信号弱(评论量主要看话题热度);换成"版本"
列直接告诉读者每个项目源是哪种 EDA 格式 + 编辑器版本号。当前 15
个项目里 10 Std / 3 Pro 3.x / 2 Pro 2.x。
source_format 字段映射:
easyeda-std → Std
easyeda-pro → Pro 3.x
easyeda-pro-legacy → Pro 2.x
其它 → 透传
editor_version(如 6.5.43 / 3.2.91 / 2.1.40)作为子标签放第二行。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-28 22:01:41 +08:00
c6279bff08
Add EasyEDA Pro 2.x legacy source ingestion (5/5 batch closure)
...
补齐前一批失败的 2 个 legacy Pro 项目(立创·泰山派 RK3566、立创·梁山派),
打通 Pro 2.x 旧版工程的源抓取链路。结合上一 commit 的 modern Pro 3.x
路径,本仓库 5/5 Pro 项目 EPRO2/dataStr 全部端到端打通。
Pro 2.x 与 Pro 3.x 是两个完全不同的存储模型:
- Pro 3.x:git-style branch + linear history chain,AES-128-GCM 加密的
EPRO2 增量消息流,按 history 重放(已在前一 commit 打通)
- Pro 2.x:无 branch / 无 history。文档以 EasyEDA Std plaintext dataStr
存储(同 ["DOCTYPE","SCH","1.1"] 格式),按 doc UUID 通过
/api/v2/documents/lists 批量 GET,主体无加密,只组件库走 AES
Pro 2.x 抓取链由 HAR (tmp/prodownload3.har, 178 请求) 反推:
GET /api/v4/projects/<P> → boards: [{sch, pcb, name}]
GET /api/projects/<P>/ticket?uuid=&g_ticket=-1
→ 完整项目 manifest
POST /api/schematic/lists {uuids:[<sch>]} → sort: [{uuid:<sheet>}]
POST /api/v2/documents/lists {uuids,docType:1} → schematic plaintext
POST /api/v2/documents/lists {uuids,docType:3} → PCB plaintext
POST /api/coppers/search {paths} → 铺铜层
POST /api/textpath/search {paths,project_uuid}→ 字体/文字
POST /api/v2/resources/search {hash,project_uuid} → BLOB 图片
实现:
- crawlers/oshwhub/crawler.py:
- fetch_pro_source() refactor 成 dispatcher,先 GET project meta
检查 branch_uuid,null 即旧版走 _fetch_pro_legacy(),非空走
_fetch_pro_modern()
- _fetch_pro_legacy() 新增(按上面 9 步流程拉所有 doc + 辅助层)
- _pro_post_json() POST helper(与 _pro_get_json 对称)
- schemas/project.schema.json: source_format enum 加 easyeda-pro-legacy
- docs/sources/easyeda_pro_source.md rev 4: §1.1 旧版 vs 新版判别表更新、
§2.7 新增旧版抓取流程 + 实测数据
落盘约定(旧版):
source/ticket.json 完整 manifest
source/<sheet_uuid>.json 每张原理图(含 dataStr)
source/pcb_<pcb_uuid>.json 每块 PCB
source/coppers.json/textpath.json/blobs.json 辅助 PCB 层资源
source/manifest.json 索引
实测:
立创·梁山派 editor=2.1.30, 2 sheets+1 pcb, 1.0 MB, 78 sym/191 fp/128 dev
立创·泰山派 RK3566 editor=2.1.40, 29 sheets+1 pcb, 0.8 MB, 299 sym/524 fp/295 dev
旧版项目体量比新版小两个数量级(梁山派 1 MB vs RK3576 66 MB)—— 没有
增量 history,组件库走单独端点,本身就是当前快照。
5/5 Pro 项目终极汇总:
X86 主板 easyeda-pro 3.2.15 7374 docs / 481 MB
泰山派 RK3566 easyeda-pro-legacy 2.1.40 30 docs / 0.8 MB
梁山派 easyeda-pro-legacy 2.1.30 3 docs / 1.0 MB
220V 桌面电源 easyeda-pro 3.2.69 771 docs / 26 MB
ESP-VoCat easyeda-pro 3.2.91 278 docs / 7.5 MB
共 8456 docs / ~516 MB plain。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-28 21:59:25 +08:00
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
d874278bc5
Add EasyEDA Std project source ingestion (10 boards backfilled)
...
打通 oshwhub origin=std 项目的工程源(schematic + PCB dataStr)抓取链路。原
plan.md §1.6 假设需要登录,实测 lceda.cn/api/documents/<doc>?uuid=<doc>&path=<doc>
对公开项目匿名可访问 —— 无需 cookie,无账号封禁风险。
调研:4 轮探测留痕在 data/state/std_probe[1-5]/(gitignored);翻 Std 编辑器
v6.5.51 的 main.min.js bundle 找到 ajaxDetail 端点;按 docType 区分两种
响应 shape(schematic 项目视图 vs PCB 文档视图)。
Crawler:
- make_source_client() 用浏览器 UA + lceda.cn/editor Referer,因为
oshwhub /api/project/<uuid> 端点拒绝 FacereDataset/0.1 UA(CLAUDE.md
UA 例外条款:目标站主动封自定义 UA + 公开静态资源)
- fetch_std_source(): 项目元 → version_documents → 逐文档 dataStr → 落
source/<doc>.json + source/manifest.json
- --with-source(爬新项目时一并抓源)/ --backfill-source(仅扫已有)
- QPS ≤ 0.2 (SLEEP_SOURCE = 5s) 自律
Schema: 加 source_format / source_path / source_documents / editor_version
(前 3 进 enum 锁定,便于后续 Pro / KiCad 源对齐)。
回填结果:10/10 成功,45 个文档,33.2 MB;schema validate 全通。
docTypes 主要是 1 (schematic) 与 3 (pcb);USB 电压电流表只有 PCB 文档(4 个:
主板+盖板+底板+面板,作者未上传原理图源)。
完整调研:docs/sources/easyeda_std_source.md。
2026-04-28 20:07:40 +08:00
Zhang Jiahao
ce22717288
Add projects.md index (stars-sorted) + build_index.py generator
...
Why:
- Charles 要一个索引页看入库项目 + 他们的 stars。手工维护会漂移,
所以 scripts/build_index.py 直接读 metadata.json 重新生成,保证
projects.md 永远是 data/raw/ 的镜像。
What:
- projects.md: 10 个项目按 Stars 倒序(最高 3293 的加热台量产计划
→ 最低 236 的柚子爱 AI 相机),含 stars/likes/forks/views/comments/
files/size,+ License 与数据源分布
- scripts/build_index.py: 扫 metadata.json 渲染 markdown,支持未来
多数据源(source 字段区分),下次新增 oshwhub / github / hackaday
项目后重跑即可
- README.md: 加 projects.md 链接
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-04-23 19:48:21 +08:00