pst

command module
v0.0.0-...-d782889 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

README

Program Specification Tools

Tool to generate program specification document from .yml to .docx

Note: the string in the .yml (except module/name and scenarios/desc) allow input string or string array.

e.g.

...
# single string
  name: this is single line of string
# array of string
  name: [first line, second line]
  # or
  name:
    - first line
    - second line
...

Usage

NAME:
   pst - Program specfication tool

USAGE:
   pst [global options] command [command options] [arguments...]

VERSION:
   development

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --config value, -c value    config file
   --debug, -d                 debug mode (default: false)
   --document value, -m value  existing .docx file
   --help, -h                  show help (default: false)
   --input value, -i value     input file
   --output value, -o value    output file
   --version, -v               print the version (default: false)
Example
# -- Sample file can be found at example/example.yml

# -- Generate in new document
$ pst -i sample.yml -o sample.docx

# -- Append to existing document
$ pst -i sample.yml -o sample.docx -m spec.docx

# -- Support multiple files
$ pst -i sample1.yml,sample2.yml,sample3.yml -o sample.docx

# -- Support wildcard input files (sorted by ascending)
$ pst -i samp*.yml -o sample.docx

Configuration

You may create configuration file to custom the properties of the output

Create a file config.yml with below content

# font name, e.g. Calibri. Default: Arial
fontfamily: Calibri
# font size. Default: 10
fontsize: 10
logging:
  # available level: PANIC, FATAL, ERROR, WARN, INFO, DEBUG, TRACE. Default: INFO
  level: INFO

Pass the configuration file to the application when execute, e.g.

$ pst -i sample.yml -o sample.docx -c config.yml

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
docb
document constructor
document constructor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL