
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
crd-leetcode-cli
Advanced tools
crd-leetcode-cli 提供将 leetcode 中已 AC 的题目转化为 markdown 表格的能力。
执行 yarn add crd-leetcode-cli -g, 国内用户可以执行 cnpm install crd-leetcode-cli -g
leetcode download // 增量拉取 AC 题目(若无登录, 则会先执行登录逻辑)
leetcode download -a // 全量拉取 AC 题目
leetcode login // 登录
leetcode logout // 登出
插件提供了自定义渲染 markdown table 的能力。
const transform_markdown_table = (dataArr) => {
const beforeDescription = `The markdown table is generated by [crd-leetcode-cli](https://github.com/MuYunyun/create-react-doc/tree/main/packages/leetcode-cli)`;
let result = beforeDescription + '\n' +
'| # | Title | Explanation | Difficulty | Type |' +
'\n' +
'|:---:|:---:|:---:|:---:|:---:|';
for (let i = 0; i < dataArr.length; i++) {
result += `\n| ${dataArr[i].questionId} | [${dataArr[i].title
}](https://leetcode.com/problems/${dataArr[i].titleSlug
}/) | [Analyze](https://github.com/MuYunyun/blog/blob/main/LeetCode/${dataArr[i].questionId
}.${dataArr[i].title.split(' ').join('_')}.md) | ${dataArr[i].difficulty
} | ${dataArr[i].topicTags} |`;
}
return result;
};
module.exports = { transform_markdown_table }
通过自定义 transform_markdown_table 函数, 便可得到如下 markdown table:


进入项目目录, 执行上述 Usage 中的 leetcode 命令即可。
因为 puppeteer 已知问题, 暂时只支持 mac 系统使用, 后续更新。
FAQs
Generate leetcode table autoly
We found that crd-leetcode-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.