JSer.info post item category parser.
JSer.infoの記事から、各アイテムURLのカテゴリ(記事中の分類)を返す。
Install with npm:
npm install @jser/post-parser
const parse = require("@jser/post-parser").parse;
const Category = require("@jser/post-parser").Category;
const results = parse(fs.readFileSync(path.join(__dirname, "fixtures", "2017-01-11-Node.js-v7.4.0-npm-v4-PhantomJS-2.5.0-Beta-clean-code.md"), "utf-8"));
/*
[{
category: "Headline",
url: "https://groups.google.com/d/topic/phantomjs/AefOuwkgBh0",
tags: ["browser", "ReleaseNote", "webkit"],
content: "PhantomJS 2.5.0βリリース。\nQtWebKitがアップデートされES2015のサポート、WebPのサポートなど",
title: "[Release] PhantomJS 2.5.0 Beta - Google グループ",
relatedLinks: [
{
title: "Comparison with QtWebKit 5.6 · annulen/webkit Wiki",
url: "https://github.com/annulen/webkit/wiki/Comparison-with-QtWebKit-5.6"
}
]
}]
*/
const Category = {
Headline: "ヘッドライン",
Article: "アーティクル",
SlideVideo: "スライド、動画関係",
websiteDocument: "サイト、サービス、ドキュメント",
SoftwareLibrary: "ソフトウェア、ツール、ライブラリ関係",
Book: "書籍関係",
};
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
MIT © azu