Skip to the content.

cppman

由于 cppreference.com 现在添加了 Cloudflare 的防护,导致 cppman –cache-all 无法执行成功

利用 codex 搞了一个有点逆天的解决方法,基本思路为

  1. 下载 cppreference 英文离线归档(2025-02-09) (https://github.com/PeterFeicht/cppreference-doc/releases/tag/v20250209),解压到 ~/.local/share/cppreference-offline/。

  2. 读取 cppman 自带的 SQLite 索引 index.db,获得 6027 页的标题和 URL。把 URL 映射到归档中的 HTML 文件,例如: /w/cpp/container/vector → w/cpp/container/vector.html

具体的实现在: ./cache_cppman.py

需要安装下,让 clangd 找到默认的头文件

不然 nvim 打开 .cpp 都是报错的

sudo dnf install gcc-c++ libstdc++-devel

insights 安装

/home/martins3/data/vn/docs/cpp/insights.sh

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。