npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

csdnsynchexo1

v2.0.6

Published

csdn博客自动生成hexo源文件的命令行工具

Downloads

1

Readme

CsdnSyncHexo

NPM version build status Test coverage David deps node version npm download npm license

一个方便的一键同步 csdn 博客上的内容到 hexo 源文件工具

使用

更新日志

v2.0 修复了一些问题

全局安装

npm i -g csdnsynchexo

命令行指定运行

hsync --output /Users/flytam/Desktop/coding/blog/source/_posts --base /Users/flytam/Desktop/coding/blog --csdn https://blog.csdn.net/flytam --cookies your_cookies_info

配置文件运行 (推荐)

// config.json
{
  "csdn": "https://blog.csdn.net/flytam", // csdn博客地址
  "output": "./example", // 这里可以定向到你的hexo源文件的地方
  "cookies": "xxxx", // cookie
  "base": "可选" // hexo博客源文件目录,用于执行hexo命令
}
// 指定配置文件
hsync --config ./config.json

小白教程

手动

1

git clone [email protected]:flytam/CsdnSyncHexo.git
node ./dist/start.js ...后面的配置信息

FAQ

  • 为什么需要 cookie 信息

拉取文章内容的接口在 csdn 中需要登录后的 cookie 信息。这个登录只要是任意用户登录就可以了。本来想过账号密码模拟登录的,但是网上的 csdn 文章模拟登录似乎已经不适用了。自己抓包后有几个字段不知道怎么构建,于是直接简单粗暴指定 cookie 了

  • cookie 如何获取

最简单粗暴获取。登录后,到自己博客的一篇文章中,选择编辑,然后浏览器开发者工具查看请求,复制下面这段的 cookie 到配置文件或者指定运行。

cookie 获取

查看帮助

hsync --help

已知 bug

~~1、解析代码块不太好~~

~~2、获取 csdn 文章的标签和分类有点问题~~

单元测试

npm run test

ps: 测试  用自己的 csdn 博客作为  例子进行测试

license

MIT