tldr-parser

1.0.4 • Public • Published
Awesome

tldr-parser

A tldr pages parser

A Parse Tool for https://github.com/tldr-pages/tldr

Feature

  • Parse TLDR Pages into a Object (I call it TLDR Object)
  • Cli Support
  • Node Module support

Usage

Use as a Command line tool

Install TLDR Parser Global and use tldr-parser command

npm install -g tldr-parser

Parse single file

tldr-parser parse path_to_tldr_markdown_file path_to_export_file

Parse directory's File

tldr-parser dir path_to_directory --platform=linux

the option platform is the tldr command directory ,while you set this options , the TLDR Object will have a prop platform

use as a Node Modules

install tldr-parser

npm install tldr-parser --save

use it by require

const parser = require('tldr-parser')

parser.parse('Content Of a TLDR File')

TLDR Object

{
    "name": "7z",
    "platform":"common",
    "description": ["A file archiver with high compression ratio.", "Homepage: <https://www.7-zip.org/>."],
    "examples": [{
        "description": "Archive a file or folder",
        "command": "7z a {{archived.7z}} {{path/to/file}}"
    }, {
        "description": "Encrypt an existing archive (including headers)",
        "command": "7z a {{encrypted.7z}} -p{{password}} -mhe {{archived.7z}}"
    }]
}

LICENSE

This Project is opensource under GPL-2.0

Readme

Keywords

Package Sidebar

Install

npm i tldr-parser

Weekly Downloads

1

Version

1.0.4

License

GPL-2.0

Unpacked Size

27.5 kB

Total Files

14

Last publish

Collaborators

  • bestony