Documentation ¶
Index ¶
- Variables
- type AttachmentFilter
- type Creator
- type CreatorFilter
- type DefaultLog
- type Downloader
- type FavoriteCreator
- type File
- type FileWithIndex
- type Kemono
- func (k *Kemono) DownloadPosts(creator Creator, posts []Post) (err error)
- func (k *Kemono) FetchCreators() (creators []Creator, err error)
- func (k *Kemono) FetchPosts(service, id string) (posts []Post, err error)
- func (k *Kemono) FilterAttachments(user string, attachments []File) []File
- func (k *Kemono) FilterCreators(creators []Creator) []Creator
- func (k *Kemono) FilterPosts(posts []Post) []Post
- func (k *Kemono) Start()
- type Log
- type Option
- func SetDownloader(downloader Downloader) Option
- func SetLog(log Log) Option
- func WithAttachmentFilter(filter ...AttachmentFilter) Option
- func WithBanner(banner bool) Option
- func WithCreatorFilter(filter ...CreatorFilter) Option
- func WithCreators(creators []Creator) Option
- func WithDomain(web string) Option
- func WithPostFilter(filter ...PostFilter) Option
- func WithUserAttachmentFilter(creator Creator, filter ...AttachmentFilter) Option
- func WithUserPostFilter(creator Creator, filter ...PostFilter) Option
- func WithUsers(user ...Creator) Option
- func WithUsersPair(serviceIdPairs ...string) Option
- type Post
- type PostFilter
- func EditDateAfterFilter(from time.Time) PostFilter
- func EditDateBeforeFilter(to time.Time) PostFilter
- func EditDateFilter(from, to time.Time) PostFilter
- func IdFilter(ids ...string) PostFilter
- func NumbFilter(f func(i int) bool) PostFilter
- func ReleaseDateAfterFilter(from time.Time) PostFilter
- func ReleaseDateBeforeFilter(to time.Time) PostFilter
- func ReleaseDateFilter(from, to time.Time) PostFilter
- type PostRaw
- type Timestamp
- type User
Constants ¶
This section is empty.
Variables ¶
var SiteMap = map[string]string{
"patreon": "kemono",
"fanbox": "kemono",
"gumroad": "kemono",
"subscribestar": "kemono",
"dlsite": "kemono",
"discord": "kemono",
"fantia": "kemono",
"boosty": "kemono",
"afdian": "kemono",
"onlyfans": "coomer",
"fansly": "coomer",
}
Functions ¶
This section is empty.
Types ¶
type AttachmentFilter ¶
func ExtensionExcludeFilter ¶
func ExtensionExcludeFilter(extension ...string) AttachmentFilter
ExtensionExcludeFilter A attachmentFilter filter that filters attachments without a specific extension
func ExtensionFilter ¶
func ExtensionFilter(extension ...string) AttachmentFilter
ExtensionFilter A attachmentFilter filter that filters attachments with a specific extension
type Creator ¶
type Creator struct { Favorited int `json:"favorited"` Id string `json:"id"` Indexed Timestamp `json:"indexed"` Name string `json:"name"` Service string `json:"service"` Updated Timestamp `json:"updated"` }
func FindCreator ¶
FindCreator Get the Creator by ID and Service
func NewCreator ¶
func (Creator) PairString ¶
type CreatorFilter ¶
type DefaultLog ¶
type DefaultLog struct {
// contains filtered or unexported fields
}
func (*DefaultLog) Print ¶
func (d *DefaultLog) Print(s string)
func (*DefaultLog) Printf ¶
func (d *DefaultLog) Printf(format string, v ...interface{})
type Downloader ¶
type FavoriteCreator ¶ added in v0.0.2
type FileWithIndex ¶
func AddIndexToAttachments ¶ added in v0.0.10
func AddIndexToAttachments(attachments []File) []FileWithIndex
type Kemono ¶
type Kemono struct { // kemono or coomer ... Site string //download Banner Banner bool // downloader Downloader Downloader // contains filtered or unexported fields }
func (*Kemono) DownloadPosts ¶
DownloadPosts download posts
func (*Kemono) FetchCreators ¶
FetchCreators fetch Creator list
func (*Kemono) FetchPosts ¶
FetchPosts fetch post list
func (*Kemono) FilterAttachments ¶
func (*Kemono) FilterCreators ¶
func (*Kemono) FilterPosts ¶
type Option ¶
type Option func(*Kemono)
func WithAttachmentFilter ¶
func WithAttachmentFilter(filter ...AttachmentFilter) Option
WithAttachmentFilter Attachment filter
func WithBanner ¶
func WithCreatorFilter ¶
func WithCreatorFilter(filter ...CreatorFilter) Option
WithCreatorFilter Creator filter
func WithUserAttachmentFilter ¶
func WithUserAttachmentFilter(creator Creator, filter ...AttachmentFilter) Option
func WithUserPostFilter ¶
func WithUserPostFilter(creator Creator, filter ...PostFilter) Option
func WithUsers ¶
WithUsers Select a specific creator, if not specified, all creators will be selected
func WithUsersPair ¶
WithUsersPair Select a specific creator, if not specified, all creators will be selected
type Post ¶
type Post struct { Added time.Time `json:"added"` Attachments []File `json:"attachments"` Content string `json:"content"` Edited time.Time `json:"edited"` Embed interface{} `json:"embed"` File File `json:"file"` Id string `json:"id"` Published time.Time `json:"published"` Service string `json:"service"` Title string `json:"title"` User string `json:"user"` }
type PostFilter ¶
func EditDateAfterFilter ¶
func EditDateAfterFilter(from time.Time) PostFilter
EditDateAfterFilter A Post filter that filters posts with edit date after
func EditDateBeforeFilter ¶
func EditDateBeforeFilter(to time.Time) PostFilter
EditDateBeforeFilter A Post filter that filters posts with edit date before
func EditDateFilter ¶
func EditDateFilter(from, to time.Time) PostFilter
EditDateFilter A Post filter that filters posts with edit date
func IdFilter ¶
func IdFilter(ids ...string) PostFilter
func NumbFilter ¶
func NumbFilter(f func(i int) bool) PostFilter
NumbFilter A Post filter that filters posts with a specific number
func ReleaseDateAfterFilter ¶
func ReleaseDateAfterFilter(from time.Time) PostFilter
ReleaseDateAfterFilter A Post filter that filters posts with release date after
func ReleaseDateBeforeFilter ¶
func ReleaseDateBeforeFilter(to time.Time) PostFilter
ReleaseDateBeforeFilter A Post filter that filters posts with release date before
func ReleaseDateFilter ¶
func ReleaseDateFilter(from, to time.Time) PostFilter
ReleaseDateFilter A Post filter that filters posts with release date
type PostRaw ¶
type PostRaw struct { Added string `json:"added"` Attachments []File `json:"attachments"` Content string `json:"content"` Edited string `json:"edited"` Embed interface{} `json:"embed"` File File `json:"file"` Id string `json:"id"` Published string `json:"published"` Service string `json:"service"` Title string `json:"title"` User string `json:"user"` }