archive

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cobra.Command{
	Use:   "archive",
	Short: "create a wiki dump",
	RunE: func(cmd *cobra.Command, args []string) error {
		if err := mysql.SetLogger(logger.Std()); err != nil {
			return errgo.Wrap(err, "can't replace mysql driver's errLog")
		}

		fmt.Println("dumping data with args:", os.Args)

		var out string
		pflag.StringVar(&out, "out", "archive.zip", "zip file output location")
		pflag.Parse()

		start(out)

		return nil
	},
}

Functions

This section is empty.

Types

type Character

type Character struct {
	ID      model.CharacterID `json:"id"`
	Role    uint8             `json:"role"`
	Name    string            `json:"name"`
	Infobox string            `json:"infobox"`
	Summary string            `json:"summary"`
}

type Episode

type Episode struct {
	ID          model.EpisodeID `json:"id"`
	Name        string          `json:"name"`
	NameCn      string          `json:"name_cn"`
	Description string          `json:"description"`
	AirDate     string          `json:"airdate"`
	Disc        uint8           `json:"disc"`
	SubjectID   model.SubjectID `json:"subject_id"`
	Sort        float32         `json:"sort"`
	Type        model.EpType    `json:"type"`
}

type Person

type Person struct {
	ID      model.PersonID `json:"id"`
	Name    string         `json:"name"`
	Type    uint8          `json:"type"`
	Career  []string       `json:"career"`
	Infobox string         `json:"infobox"`
	Summary string         `json:"summary"`
}

type PersonCharacter

type PersonCharacter struct {
	PersonID    model.PersonID    `json:"person_id"`
	SubjectID   model.SubjectID   `json:"subject_id"`
	CharacterID model.CharacterID `json:"character_id"`
	Summary     string            `json:"summary"`
}

type Subject

type Subject struct {
	ID       model.SubjectID   `json:"id"`
	Type     model.SubjectType `json:"type"`
	Name     string            `json:"name"`
	NameCN   string            `json:"name_cn"`
	Infobox  string            `json:"infobox"`
	Platform uint16            `json:"platform"`
	Summary  string            `json:"summary"`
	Nsfw     bool              `json:"nsfw"`
}

type SubjectCharacter

type SubjectCharacter struct {
	CharacterID model.CharacterID `json:"character_id"`
	SubjectID   model.SubjectID   `json:"subject_id"`
	Type        uint8             `json:"type"`
	Order       uint8             `json:"order"`
}

type SubjectPerson

type SubjectPerson struct {
	PersonID  model.PersonID  `json:"person_id"`
	SubjectID model.SubjectID `json:"subject_id"`
	Position  uint16          `json:"position"`
}

type SubjectRelation

type SubjectRelation struct {
	SubjectID        model.SubjectID `json:"subject_id"`
	RelationType     uint16          `json:"relation_type"`
	RelatedSubjectID model.SubjectID `json:"related_subject_id"`
	Order            uint8           `json:"order"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL