Skip to content

citeccyr/xml-quote-md-to-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XML's <Quote/> Markdown to HTML

Convert the Markdown content in the XML's <Quote> tag to the HTML

Node.js private module for extracting the Markdown content from XML via XPath and converting it to the HTML in a terminal.

Based on Camaro and Markdown-it libraries.

Table of Contents

Install

Prerequisites

You need Node.js version 10+. Then install node module globally:

npm install --global citeccyr/xml-quote-md-to-html

Usage

Convert

Write to STDOUT

xml-quote-md-to-html input.xml

Write to file

xml-quote-md-to-html input.xml -o output.html  

Read from STDIN

Linux/macOS

cat input.xml | xml-quote-md-to-html

Windows

type input.xml | xml-quote-md-to-html

Change XPath

xml-quote-md-to-html input.xml -q "//Quote" 

Show help

xml-quote-md-to-html --help

  Usage: xml-quote-md-to-html [options] [input.xml]

  Defaults:
    input.xml   - STDIN
    output.html - STDOUT

  Options:

    -v, --version               output the version number
    -o, --output [output.html]  Output HTML result (default: STDOUT)
    -q, --quote [xpath]         XPath for extraction of the markdown quote (default: /root/Linkage/Object/Annotation/Quote)
    -h, --help                  output usage information

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

Apache-2.0

© 2018 Sergey N

About

Convert the Markdown content in the XML's <Quote/> tag to the HTML

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors