Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
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
The npm package crd-leetcode-cli receives a total of 9 weekly downloads. As such, crd-leetcode-cli popularity was classified as not popular.
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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.