mirror of
https://github.com/tmedwards/tweego.git
synced 2025-07-07 07:00:35 -04:00
ADD: Add JSON output (-j, --json
).
This commit is contained in:
parent
33a6da381c
commit
3a8dfb2344
8 changed files with 175 additions and 92 deletions
12
storydata.go
12
storydata.go
|
@ -13,6 +13,18 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
type storyJSON struct {
|
||||
Name string `json:"name"`
|
||||
Ifid string `json:"ifid,omitempty"`
|
||||
Start string `json:"start,omitempty"`
|
||||
Options []string `json:"options,omitempty"`
|
||||
Format string `json:"format,omitempty"`
|
||||
FormatVersion string `json:"format-version,omitempty"`
|
||||
Creator string `json:"creator,omitempty"`
|
||||
CreatorVersion string `json:"creator-version,omitempty"`
|
||||
Passages []*passageJSON `json:"passages"`
|
||||
}
|
||||
|
||||
type storyDataJSON struct {
|
||||
Ifid string `json:"ifid,omitempty"`
|
||||
Format string `json:"format,omitempty"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue