一声棒喝,本不立文字
偏要著録,已是二义

simon-willison

iNaturalist 目击记录

iNaturalist Sightings

二〇二六年五月三日 · 英文原文

作者用 Claude Code for web 在手机上构建 iNaturalist Sightings:先写 `inaturalist-clumper` Python CLI,按 2 小时、5km 聚合两个账号观察记录;再用 Git scraping 生成 `clumps.json` 并托管 GitHub;最后在 `simonw/tools` 中创建 `inat-sightings.html`,通过 `fetch()` 展示缩略图与 modal 大图。

工具:iNaturalist Sightings 我想查看我的 iNaturalist 观察记录——分布在两个不同账号中——并按发生时间分组。这个周末我在露营,所以我完全在手机上用 Claude Code for web 构建了它。我先构建了一个 inaturalist-clumper Python CLI,用来获取并“聚合”观察记录——默认情况下,聚合会使用彼此相距 2 小时内、5km 内的观察记录。然后我设置了 simonw/inaturalist-clumps 作为 Git scraping repository,用来运行该工具并把结果记录到 clumps.json。这个 JSON 文件托管在 GitHub 上,这意味着 JavaScript 可以通过 CORS 获取它。最后,我针对我的 simonw/tools repo 运行了这个 prompt:构建 inat-sightings.html——一个 app,对 https://raw.githubusercontent.com/simonw/inaturalist-clumps/refs/heads/main/clumps.json 执行 fetch(),然后在一个页面上显示所有观察记录,缩略图使用 https://static.inaturalist.org/photos/538073008/small.jpg 这样的 small.jpg URL,并设置 loading=lazy;但当缩略图被点击时,在 HTML modal 中显示 large.jpg。如果可用,small 和 large 都应包含物种的 common name 标签:tools、claude-code、inaturalist、generative-ai、ai、llms

译自 simon-willison · 录于 二〇二六年五月三日