@jser/post-parser
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@jser/post-parser

JSer.info post item category parser.

JSer.infoの記事から、各アイテムURLのカテゴリ(記事中の分類)を返す。

Install

Install with npm:

npm install @jser/post-parser

Usage

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"
          }
      ]
  }]

 */

Category

const Category = {
    Headline: "ヘッドライン",
    Article: "アーティクル",
    SlideVideo: "スライド、動画関係",
    websiteDocument: "サイト、サービス、ドキュメント",
    SoftwareLibrary: "ソフトウェア、ツール、ライブラリ関係",
    Book: "書籍関係",
};

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Readme

Keywords

Package Sidebar

Install

npm i @jser/post-parser

Weekly Downloads

22

Version

2.0.0

License

MIT

Unpacked Size

47.9 kB

Total Files

23

Last publish

Collaborators

  • azu
  • jser-user