mirror of
https://github.com/tmedwards/tweego.git
synced 2025-07-06 06:30:31 -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
|
@ -10,6 +10,12 @@ import (
|
|||
"encoding/json"
|
||||
)
|
||||
|
||||
type passageJSON struct {
|
||||
Name string `json:"name"`
|
||||
Tags []string `json:"tags,omitempty"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
type passageMetadataJSON struct {
|
||||
Position string `json:"position,omitempty"` // Twine 2 (`position`) & Twine 1 (`twine-position`).
|
||||
Size string `json:"size,omitempty"` // Twine 2 (`size`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue