ADD: Add JSON output (-j, --json).

This commit is contained in:
Thomas M. Edwards 2021-02-10 16:22:52 -06:00
parent 33a6da381c
commit 3a8dfb2344
8 changed files with 175 additions and 92 deletions

View file

@ -42,6 +42,7 @@ Options:
-h, --help Print this help, then exit.
--head=FILE Name of the file whose contents will be appended
as-is to the <head> element of the compiled HTML.
-j, --json Output JSON, instead of compiled HTML.
--list-charsets List the supported input character sets, then exit.
--list-formats List the available story formats, then exit.
--log-files Log the processed input files.
@ -121,7 +122,7 @@ func usageVersion() {
fmt.Fprintf(os.Stderr, "\n%s, %s\n", tweegoName, tweegoVersion)
fmt.Fprint(os.Stderr, `
Tweego (a Twee compiler in Go) [http://www.motoslave.net/tweego/]
Copyright (c) 2014-2020 Thomas Michael Edwards. All rights reserved.
Copyright (c) 2014-2021 Thomas Michael Edwards. All rights reserved.
`)
os.Exit(1)