GithubHelp home page GithubHelp logo

marked-it-cli's Introduction

marked-it-cli

A command-line interface for marked-it that adds support for conref attributes, uniform headers/footers, and .pdf generation.

Install

npm install -g marked-it-cli

You may need to sudo the above command since it installs globally.

Usage

marked-it-cli <sourceDirectory> --output=<destinationDirectory> [OPTIONS]

Required Arguments

<sourceDirectory>
	The path of the directory containing source Markdown files.  Subdirectories will be recursed.
	
--output
	The path of the directory to write generated files to.  Directory structures from the source directory will be replicated here.

options

--overwrite
	Overwrite output files that already exist
--disable-attributes
	Disable processing of Kramdown-style attribute lists
--disable-front-matter
	Disable processing of Jekyll-style front matter blocks
--toc-xml
	Generate a toc.xml file for directories containing a valid toc file
--toc-depth=<maxHeaderLevel>
	Set the maximum header level that will appear in toc files (default=3)
--verbose
	Output verbose details
--debug
	Output even more verbose details
--gen-pdf
	Generate .pdf files
--pdf-options-file=<pdfOptionsFile>
	Path to the file with PDF generation options
--header-file=<headerSourceFile>
	Path to the file with content to be prepended to the generated .html
--footer-file=<footerSourceFile>
	Path to the file with content to be appended to the generated .html
--conref-file=<conrefFile>
	Path to the file containing DITA-style variable definitions

PDF Generation

For PDF file generation to succeed, wkhtmltopdf must be installed and the path to its binary must be in the OS' PATH environment variable. Note that on Windows the wkhtmltopdf arch (32-/64-bit) must match that of the node.js being used.

If --pdfOptionsFile is not specified then all default options will be used. Custom options are specified in strict JSON format as the camel-cased equivalents of the options described in the wkhtmltopdf options. For an example see included file example/examplePDFoptions.

Example

The "examples" directory demonstrates the CLI's features. To generate it use command:

node ./bin/marked-it-cli ./example --output=./exampleOutput --extension-file=./example/headerFooterExt.js --gen-pdf --pdf-options-file=./example/pdfOptions --conref-file=./example/conref.yml --toc-xml

marked-it-cli's People

Contributors

gianluca-bernardini1 avatar grant-g avatar jschweik avatar sirspidey avatar warmana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

recrwplay

marked-it-cli's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.