gitbook-parsers

Includes GitBook parsers and normalize output

Apache-2.0 34 个版本
安装
npm install gitbook-parsers
yarn add gitbook-parsers
pnpm add gitbook-parsers
bun add gitbook-parsers
README

GitBook Parsers

NPM version Build Status

This Javascript module provides a low level parsing interface for GitBooks. The API is promise-based, and this module can be used in both Node.js and the Browser.

Parsers

Parser Latest Version Tests
Markdown NPM version Build Status
AsciiDoc NPM version Build Status
reStructuredText NPM version Build Status

Usage

This module can be used in node.js and in the browser

In the Browser:

Include the file:

<script src="library/gitbook-parsers.min.js" />
In Node.js:
npm install gitbook-parsers

Then include it using:

var gitbookParsers = require("gitbook-parsers");
Find a parser for a file:
var parser = gitbookParsers.getForFile("FILE.md");
Use this parser:

Parse the summary:

parser.summary("* [An entry](./test.md)")
.then(function(summary) { ... });

Parse the glossary:

parser.glossary("...")
.then(function(glossary) { ... });

Parse the languages index:

parser.langs("...")
.then(function(languages) { ... });

Parse a page to html:

parser.page("...")
.then(function(sections) { ... });
版本列表
0.8.9 2015-12-02
0.8.8 2015-12-02
0.8.7 2015-10-21
0.8.6 2015-10-21
0.8.5 2015-10-16
0.8.4 2015-10-05
0.8.3 2015-09-28
0.8.2 2015-09-10
0.8.1 2015-09-05
0.8.0 2015-09-04
0.7.7 2015-08-09
0.7.6 2015-06-02
0.7.5 2015-05-27
0.7.4 2015-04-02
0.7.3 2015-04-02
0.7.2 2015-03-24
0.7.1 2015-03-24
0.7.0 2015-03-24
0.6.0 2015-03-23
0.5.4 2015-03-12
0.5.3 2015-03-11
0.5.2 2015-03-08
0.5.1 2015-03-08
0.5.0 2015-03-06
0.4.3 2015-02-23
0.4.2 2015-02-23
0.4.1 2015-02-14
0.4.0 2015-02-09
0.3.1 2015-02-03
0.3.0 2015-01-30
0.2.2 2015-01-24
0.2.1 2015-01-24
0.2.0 2015-01-24
0.1.0 2015-01-23