mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
f88951546d
Another small useful tool
17 lines
322 B
JavaScript
Executable File
17 lines
322 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
var fs = require('fs');
|
|
|
|
var gitbook = require('../../');
|
|
|
|
if(process.argv < 3) {
|
|
console.error('Please specify a filename');
|
|
process.exit(1);
|
|
}
|
|
|
|
var content = fs.readFileSync(process.argv[2], 'utf8');
|
|
|
|
var lexed = gitbook.parse.summary(content);
|
|
|
|
console.log(JSON.stringify(lexed, null, 2));
|