A library / CLI tool to convert deck of other formats to SealDice TOML format.
go install github.com/sealdice/deck-converter/cli/deck-converter@latest
Feed path(s) of input file(s) to the tool.
deck-converter path/to/input.json path/to/another/input.yaml
This converts each input file to a toml file in the same directory, or path/to/input.toml
and path/to/another/input.toml
.
Use -o
flag to sepcify output file for each input. This flag must occur 0 times or the same time as number of input files.
Specified output files are used one-by-one. The first input will be converted to the first output, and so on.
deck-converter path/to/input.json -o output/from_json.toml path/to/another/input.yaml -o output/from_yaml.toml
Output files will be output/from_json.toml
and output/from_yaml.toml
Use -p
flag to command all output files to be put under that directory.
Each output will have the same file name as input, with extension name changed to toml
.
This flag overrides all -o
flags.
deck-converter -p output/ path/to/input_json.json path/to/another/input_yaml.yaml
Output files will be output/input_json.toml
and output/input_yaml.toml
Use -O
flag to enable overwriting exist files.
deck-converter input.json -o output.toml
fails if output.toml
exist.
If it's wished to overwrites output.toml
, use:
deck-converter -O input.json -o output.toml
import "github.com/sealdice/deck-converter"