Documentation ¶
Index ¶
- Constants
- Variables
- func GetNumberFromFilename(regexp *regexp.Regexp, filename string) string
- func GetRename(originalname string, metadata *Metadata) (canonicalName string, shouldRename bool)
- func Register(scraper *Scraper)
- func WriteMetadata(metafile string, metadata *Metadata) error
- type Metadata
- type Scraper
- type Scrapes
Constants ¶
View Source
const COVER = "cover"
View Source
const METAFILE = "metadata.nfo"
View Source
const TAG_R18 = "18禁"
View Source
const TAG_VOICEASMR = "ボイス・ASMR"
Variables ¶
Functions ¶
func GetNumberFromFilename ¶
regexp: must has a "number" sub group.
func WriteMetadata ¶
Types ¶
type Metadata ¶
type Metadata struct { Title string `yaml:"title,omitempty" json:"title,omitempty"` Author string `yaml:"author,omitempty" json:"author,omitempty"` Series string `yaml:"series name,omitempty" json:"series,omitempty"` YamlNarrator string `yaml:"narrator,omitempty" json:"yaml_narrator,omitempty"` YamlTags string `yaml:"tags,omitempty" json:"yaml_tags,omitempty"` Number string `yaml:"number,omitempty" json:"number,omitempty"` YamlOtherEditionNumber string `yaml:"other edition number,omitempty"` Date string `yaml:"date,omitempty" json:"date,omitempty"` Source string `yaml:"source,omitempty" json:"source,omitempty"` GeneratedBy string `yaml:"generated by,omitempty" json:"generated_by,omitempty"` Narrator []string `yaml:"-" json:"narrator,omitempty"` Tags []string `yaml:"-" json:"tags,omitempty"` OtherEditionNumber []string `yaml:"-" json:"other_edition_number,omitempty"` Text string `yaml:"-" json:"text,omitempty"` // full text. Must not has leading or trailing whitespaces. Files []string `yaml:"-" json:"files,omitempty"` // additional meta files saved in tmpdir. CanonicalFilename string `yaml:"-" json:"canonical_filename,omitempty"` // If empty, fallback to use metadata.GetCanonicalName() ShouldRename bool `yaml:"-" json:"should_rename,omitempty"` // Indicate the content-dir should be renamed to canonical filename }
Stored in metadata.nfo header using YAML front matter. See. https://jekyllrb.com/docs/front-matter/ . Title is a must field, all other fields are optional. All array type meta must be comprised of non-empty unique items, Tags should be sorted in lexical order. For now, write all array type meta to metadata.nfo as csv style string, instead of strict yaml array, this is for compatibility with other programs.
func ReadMetadata ¶
func (*Metadata) GetCanonicalFilename ¶
Return canonical filename of the resource. The default name is "[number][author]title", title is truncated if it's too long.
Directories ¶
Path | Synopsis |
---|---|
Scrape dlsite asmr meta info from https://asmr.one/works
|
Scrape dlsite asmr meta info from https://asmr.one/works |
https://hentaicovid.com/index.php/voices-asmr/
|
https://hentaicovid.com/index.php/voices-asmr/ |
https://hvdb.me/Dashboard/Details/01201812 Pure-english.
|
https://hvdb.me/Dashboard/Details/01201812 Pure-english. |
Click to show internal directories.
Click to hide internal directories.