8.9.1 • Published 17 days ago

@vivliostyle/cli v8.9.1

Weekly downloads
144
License
AGPL-3.0
Repository
github
Last release
17 days ago

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
  --log-level <level>        specify a log level of console outputs (choices: "silent", "info",
                             "verbose", "debug", default: "info")
  -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
                                     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
  --reading-progression <direction>  Direction of reading progression (choices: "ltr", "rtl")
  --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
  --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/)
  --viewer-param <parameters>        specify viewer parameters. (ex:
                                     "allowScripts=false&pixelRatio=16")
  --log-level <level>                specify a log level of console outputs (choices: "silent",
                                     "info", "verbose", "debug", default: "info")
  -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
                                     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
  --reading-progression <direction>  Direction of reading progression (choices: "ltr", "rtl")
  --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/)
  --viewer-param <parameters>        specify viewer parameters. (ex:
                                     "allowScripts=false&pixelRatio=16")
  --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")
  --log-level <level>                specify a log level of console outputs (choices: "silent",
                                     "info", "verbose", "debug", default: "info")
  -h, --help                         display help for command

User Guide

See User Guide

Contribute

See Contribution Guide.

npm.ionpm.ionpm.ionpm.ionpm.ionpm.ionpm.ionpm.io

License

Licensed under AGPL Version 3.

8.9.1

17 days ago

8.9.0

25 days ago

8.8.0

2 months ago

8.7.0

2 months ago

8.6.0

4 months ago

8.1.0

8 months ago

8.1.2

8 months ago

8.1.1

8 months ago

8.3.1

6 months ago

8.2.0

8 months ago

8.4.1

5 months ago

8.4.0

5 months ago

8.3.0

6 months ago

8.5.0

5 months ago

8.5.1

5 months ago

7.3.0

11 months ago

7.4.0

10 months ago

8.0.1

9 months ago

8.0.0

10 months ago

6.3.0

1 year ago

6.3.1

1 year ago

7.1.1

1 year ago

7.1.0

1 year ago

7.2.5

11 months ago

7.2.4

11 months ago

7.2.3

11 months ago

6.2.3

1 year ago

7.0.0

1 year ago

7.2.2

12 months ago

7.2.1

12 months ago

7.2.0

12 months ago

6.2.1

1 year ago

6.2.0

1 year ago

6.2.2

1 year ago

6.1.0

1 year ago

5.8.1

1 year ago

5.8.0

1 year ago

6.0.0

1 year ago

5.9.0

1 year ago

5.7.0

1 year ago

5.5.1

2 years ago

5.5.0

2 years ago

5.6.2

1 year ago

5.6.1

1 year ago

5.6.0

2 years ago

5.4.0

2 years ago

5.3.0

2 years ago

5.2.4

2 years ago

5.2.3

2 years ago

5.2.2

2 years ago

5.2.1

2 years ago

5.2.0

2 years ago

4.12.3

2 years ago

5.1.0

2 years ago

4.12.4

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.9.0

2 years ago

4.12.0

2 years ago

4.12.1

2 years ago

4.12.2

2 years ago

4.10.0

2 years ago

4.8.4

2 years ago

4.8.3

2 years ago

4.11.0

2 years ago

4.8.1

2 years ago

4.8.0

2 years ago

4.8.2

2 years ago

4.7.0

2 years ago

4.6.0

2 years ago

4.5.0

2 years ago

4.4.1

2 years ago

4.4.0

2 years ago

4.3.2

2 years ago

4.3.1

2 years ago

4.3.0

2 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.5.2

3 years ago

3.5.1

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.0

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.2

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.2-beta.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

3.0.0-rc.1

3 years ago

3.0.0-rc.0

3 years ago

3.0.0-pre.6

3 years ago

2.1.3

3 years ago

3.0.0-pre.5

3 years ago

2.1.2

3 years ago

3.0.0-pre.4

3 years ago

2.1.1

3 years ago

3.0.0-pre.3

4 years ago

3.0.0-pre.2

4 years ago

3.0.0-pre.1

4 years ago

2.1.0

4 years ago

3.0.0-pre.0

4 years ago

2.0.0

4 years ago

2.0.0-pre.3

4 years ago

2.0.0-pre.2

4 years ago

2.0.0-pre.1

4 years ago

2.0.0-pre.0

4 years ago