Documentation
¶
Index ¶
- Constants
- func ParseEHDL(metaPath string, metaData []byte, internal bool) (model.Gallery, []model.Tag, model.Reference, error)
- func ParseHath(metaPath string, metaData []byte, internal bool) (model.Gallery, []model.Tag, model.Reference, error)
- func ParseMetadata(metaTypes map[MetaType]bool)
- func ParseTitles(tryNative bool, overwrite bool)
- func ParseX(metaData []byte, metaPath string, archivePath string, internal bool) (model.Gallery, []model.Tag, model.Reference, error)
- type FuzzyResult
- type MetaType
- type NoMatchPaths
- type Tags
- type TitleMeta
- type XMetadata
Constants ¶
const ( XMeta MetaType = "xmeta" HathMeta = "hathmeta" EHDLMeta = "ehdlmeta" FuzzyMatch = "fuzzy" )
Variables ¶
This section is empty.
Functions ¶
func ParseEHDL ¶ added in v0.3.0
func ParseEHDL(metaPath string, metaData []byte, internal bool) (model.Gallery, []model.Tag, model.Reference, error)
ParseEHDL parses given text file. Input file is expected to be in the H@H (Hath) format (galleryinfo.txt). Input file is expected to be in the E-Hentai-Downloader format (info.txt).
func ParseHath ¶ added in v0.3.0
func ParseHath(metaPath string, metaData []byte, internal bool) (model.Gallery, []model.Tag, model.Reference, error)
ParseHath parses given text file. Input file is expected to be in the H@H (Hath) format (galleryinfo.txt).
func ParseMetadata ¶ added in v0.3.0
ParseMetadata scans all libraries for metadata files (json, txt).
func ParseTitles ¶
ParseTitles parses all filenames and titles of the saved galleries in db. tryNative tries to preserve the native language (usually Japanese) text. overwrite writes over the previous values.
Types ¶
type FuzzyResult ¶
type NoMatchPaths ¶
type NoMatchPaths struct {
// contains filtered or unexported fields
}
type TitleMeta ¶
type TitleMeta struct {
Released string
Circle string
Artists []string
Title string
Series string
Language string
}
func ParseTitle ¶
ParseTitle parses the filename or title following the standard: (Release) [Circle (Artist)] Title (Series) [<usually> Language] or (Release) [Artist] Title (Series) [<usually> Language]
type XMetadata ¶
type XMetadata struct {
GalleryInfo struct {
Title *string `json:"title"`
TitleOriginal *string `json:"title_original"`
Link *string `json:"link"`
Category *string `json:"category"`
Tags Tags `json:"tags"`
Language *string `json:"language"`
Translated *bool `json:"translated"`
UploadDate *[]int `json:"upload_date"`
Source *struct {
Site *string `json:"site"`
Gid *int32 `json:"gid"`
Token *string `json:"token"`
} `json:"source"`
} `json:"gallery_info"`
GalleryInfoFull *struct {
Gallery struct {
Gid *int32 `json:"gid"`
Token *string `json:"token"`
} `json:"gallery"`
Title *string `json:"title"`
TitleOriginal *string `json:"title_original"`
DateUploaded *int64 `json:"date_uploaded"`
Category *string `json:"category"`
Uploader *string `json:"uploader"`
ImageCount *int32 `json:"image_count"`
ImagesResized *bool `json:"images_resized"`
TotalFileSizeApprox *int32 `json:"total_file_size_approx"`
Language *string `json:"language"`
Translated *bool `json:"translated"`
Tags Tags `json:"tags"`
TagsHaveNamespace *bool `json:"tags_have_namespace"`
Source *string `json:"source"`
SourceSite *string `json:"source_site"`
} `json:"gallery_info_full"`
}