Documentation ¶
Index ¶
- Constants
- Variables
- func NormalizeCharacterID(id string) string
- func ParseDirectiveParams(rawParams string) map[string]string
- type Directive
- type JsonComponent
- type JsonPic
- type JsonResPic
- type JsonStory
- type JsonStoryGroup
- type JsonStoryReviewMetaTable
- type JsonStoryTag
- type Parser
- func (p *Parser) GetInfo(infoPath string) (string, error)
- func (p *Parser) GetText(textPath string) (string, error)
- func (p *Parser) Parse() (*StoryTree, error)
- func (p *Parser) ParseCharacters(directives []Directive) []*StoryCharacter
- func (p *Parser) ParsePictures(directives []Directive) []*StoryPicture
- func (p *Parser) ParseStoryReviewMetaTable() (*JsonStoryReviewMetaTable, error)
- func (p *Parser) ParseStoryReviewTable() ([]*JsonStoryGroup, error)
- func (p *Parser) ParseStoryText(storyTextPath string) ([]Directive, error)
- type Story
- type StoryCharacter
- type StoryGroup
- type StoryPicture
- type StoryTree
Constants ¶
View Source
const ( TypeMain string = "MAIN_STORY" TypeActivity string = "ACTIVITY_STORY" TypeMiniActivity string = "MINI_STORY" TypeNone string = "NONE" TagBefore string = "BEFORE" TagAfter string = "AFTER" TagInterlude string = "INTERLUDE" TagBeforeCN string = "行动前" TagAfterCN string = "行动后" TagInterludeCN string = "幕间" TagBeforeEN string = "Before Operation" TagAfterEN string = "After Operation" TagInterludeEN string = "Interlude" TagBeforeJP string = "戦闘前" TagAfterJP string = "戦闘後" TagInterludeJP string = "幕間" TagBeforeKR string = "작전 전" TagAfterKR string = "작전 후" TagInterludeKR string = "브릿지" )
Variables ¶
View Source
var DirectiveRegex = regexp.MustCompile(`\[(\w*)(?:\((.*)\))?]|\[name="(.*)"]`)
Functions ¶
func NormalizeCharacterID ¶
func ParseDirectiveParams ¶
Types ¶
type Directive ¶
func ParseDirectives ¶
type JsonComponent ¶
type JsonResPic ¶
type JsonStoryGroup ¶
type JsonStoryReviewMetaTable ¶
type JsonStoryReviewMetaTable struct { ActArchiveResData struct { Pics orderedmap.OrderedMap[string, JsonResPic] `json:"pics"` } `json:"actArchiveResData"` ActArchiveData struct { Components orderedmap.OrderedMap[string, JsonComponent] `json:"components"` } `json:"actArchiveData"` }
type JsonStoryTag ¶
func (*JsonStoryTag) UnmarshalJSON ¶
func (t *JsonStoryTag) UnmarshalJSON(data []byte) error
type Parser ¶
func (*Parser) ParseCharacters ¶
func (p *Parser) ParseCharacters(directives []Directive) []*StoryCharacter
func (*Parser) ParsePictures ¶
func (p *Parser) ParsePictures(directives []Directive) []*StoryPicture
func (*Parser) ParseStoryReviewMetaTable ¶
func (p *Parser) ParseStoryReviewMetaTable() (*JsonStoryReviewMetaTable, error)
func (*Parser) ParseStoryReviewTable ¶
func (p *Parser) ParseStoryReviewTable() ([]*JsonStoryGroup, error)
type Story ¶
type Story struct { ID string GroupID string Code string Name string Info string TagType string TagText string Pictures []*StoryPicture Characters []*StoryCharacter }
type StoryCharacter ¶
type StoryPicture ¶
type StoryTree ¶
type StoryTree struct {
StoryGroups []*StoryGroup
}
Click to show internal directories.
Click to hide internal directories.