Coder Social home page Coder Social logo

geekwolverine / vivliostyle-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vivliostyle/vivliostyle-cli

0.0 0.0 0.0 9.05 MB

⚒ Supercharge command-line publication workflow.

Home Page: https://docs.vivliostyle.org/#/vivliostyle-cli

License: GNU Affero General Public License v3.0

JavaScript 0.66% TypeScript 97.13% Dockerfile 2.21%

vivliostyle-cli's Introduction

Vivliostyle CLI

npm npm: total downloads

Supercharge your command-line publication workflow.

Install

npm install -g @vivliostyle/cli

Use

Usage: vivliostyle [options] [command]

Options:
  -v, --version   output the version number
  -h, --help      display help for command

Commands:
  init            create vivliostyle config
  build           build and create PDF file
  preview         launch preview server
  help [command]  display help for command

init

create vivliostyle config file.

vivliostyle init

You are new to Vivliostyle? Check out our latest project Create Book. With Create Book, you can easily bootstrap your book project and start writing without any extra effort.

CLI Options

Options:
  --title <title>            title
  --author <author>          author
  -l, --language <language>  language
  -s, --size  <size>         paper size
  -T, --theme <theme>        theme
  -h, --help                 display help for command

build

build and create PDF file.

Put vivliostyle.config.js in the root directory, then:

vivliostyle build

build

CLI options

Options:
  -c, --config <config_file>       path to vivliostyle.config.js [vivliostyle.config.js]
  -o, --output <path>              specify output file name or directory [<title>.pdf]
                                   This option can be specified multiple, then each -o options
                                   can be supplied one -f option.
                                   ex: -o output1 -f webpub -o output2.pdf -f pdf
  -f, --format <format>            specify output format corresponding output target
                                   If an extension is specified on -o option, this field will be
                                   inferenced automatically.
  -s, --size <size>                output pdf size [Letter]
                                   preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal,
                                   ledger
                                   custom(comma separated): 182mm,257mm or 8.5in,11in
  -m, --crop-marks                 print crop marks
  --bleed <bleed>                  extent of the bleed area for printing with crop marks [3mm]
  --crop-offset <offset>           distance between the edge of the trim size and the edge of
                                   the media size. [auto (13mm + bleed)]
  --css <CSS>                      custom style CSS code. (ex: ":root {--my-color: lime;}")
  --style <stylesheet>             additional stylesheet URL or path
  --user-style <user_stylesheet>   user stylesheet URL or path
  -d, --single-doc                 single HTML document input
  -p, --press-ready                make generated PDF compatible with press ready PDF/X-1a
                                   [false]
                                   This option is equivalent with "--preflight press-ready"
  -t, --timeout <seconds>          timeout limit for waiting Vivliostyle process [120]
  -T, --theme <theme>              theme path or package name
  --title <title>                  title
  --author <author>                author
  -l, --language <language>        language
  --render-mode <mode>             if docker is set, Vivliostyle try to render PDF on Docker
                                   container [local] (choices: "local", "docker")
  --preflight <mode>               apply the process to generate PDF for printing (choices:
                                   "press-ready", "press-ready-local")
  --preflight-option <options...>  options for preflight process (ex: gray-scale,
                                   enforce-outline)
                                   Please refer the document of press-ready for further
                                   information.
                                   https://github.com/vibranthq/press-ready
  --verbose                        verbose log output
  --no-sandbox                     launch chrome without sandbox. use this option when
                                   ECONNREFUSED error occurred.
  --executable-browser <path>      specify a path of executable browser you installed
  --image <image>                  specify a docker image to render
  --http                           launch an HTTP server hosting contents instead of file
                                   protocol
                                   It is useful that requires CORS such as external web fonts.
  --viewer <URL>                   specify a URL of displaying viewer instead of
                                   vivliostyle-cli's one
                                   It is useful that using own viewer that has staging features.
                                   (ex: https://vivliostyle.vercel.app/)
  -h, --help                       display help for command

preview

open preview page and save PDF interactively.

vivliostyle preview

CLI options

Options:
  -c, --config <config_file>      path to vivliostyle.config.js
  -T, --theme <theme>             theme path or package name
  -s, --size <size>               output pdf size [Letter]
                                  preset: A5, A4, A3, B5, B4, JIS-B5, JIS-B4, letter, legal,
                                  ledger
                                  custom(comma separated): 182mm,257mm or 8.5in,11in
  -m, --crop-marks                print crop marks
  --bleed <bleed>                 extent of the bleed area for printing with crop marks [3mm]
  --crop-offset <offset>          distance between the edge of the trim size and the edge of
                                  the media size. [auto (13mm + bleed)]
  --css <CSS>                     custom style CSS code. (ex: ":root {--my-color: lime;}")
  --style <stylesheet>            additional stylesheet URL or path
  --user-style <user_stylesheet>  user stylesheet URL or path
  -d, --single-doc                single HTML document input
  -q, --quick                     quick loading with rough page count
  --title <title>                 title
  --author <author>               author
  -l, --language <language>       language
  --verbose                       verbose log output
  --no-sandbox                    launch chrome without sandbox (use this option to avoid
                                  ECONNREFUSED error)
  --executable-browser <path>     specify a path of executable browser you installed
  --http                          launch an HTTP server hosting contents instead of file
                                  protocol
                                  It is useful that requires CORS such as external web fonts.
  --viewer <URL>                  specify a URL of displaying viewer instead of
                                  vivliostyle-cli's one
                                  It is useful that using own viewer that has staging features.
                                  (ex: https://vivliostyle.vercel.app/)
  --browser <browser>             EXPERIMENTAL SUPPORT: Specify a browser type to launch
                                  Vivliostyle viewer [chromium]
                                  Currently, Firefox and Webkit support preview command only!
                                  (choices: "chromium", "firefox", "webkit")
  -h, --help                      display help for command

User Guide

See User Guide

Contribute

See Contribution Guide.

License

Licensed under AGPL Version 3.

vivliostyle-cli's People

Contributors

akabekobeko avatar ayumutakai avatar dependabot[bot] avatar kamijin-fanta avatar murakamishinyu avatar spring-raining avatar takanakahiko avatar tatamo avatar uetchy avatar yamasy1549 avatar zwaldowski avatar

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.