Documentation ¶
Index ¶
- type Kobo
- func (k *Kobo) Close()
- func (k *Kobo) GetDeviceOptions() (ext []string, model string, thumbSz image.Point)
- func (k *Kobo) SaveCoverImage(contentID string, size image.Point, imgB64 string)
- func (k *Kobo) SaveDeviceInfo() error
- func (k *Kobo) UpdateIfExists(cID string, len int) error
- func (k *Kobo) UpdateNickelDB() (bool, error)
- func (k *Kobo) WriteMDfile() error
- func (k *Kobo) WriteUpdateMDfile() error
- type KuOptions
- type MetaIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kobo ¶
type Kobo struct { Device kobo.Device KuConfig *KuOptions DBRootDir string BKRootDir string ContentIDprefix cidPrefix MetadataMap map[string]uc.CalibreBookMeta UpdatedMetadata map[string]struct{} BooksInDB map[string]struct{} Passwords *uncagedPassword DriveInfo uc.DeviceInfo Wg *sync.WaitGroup // contains filtered or unexported fields }
Kobo contains the variables and methods required to use the UNCaGED library
func (*Kobo) GetDeviceOptions ¶
GetDeviceOptions gets some device options that UNCaGED requires
func (*Kobo) SaveCoverImage ¶
SaveCoverImage generates cover image and thumbnails, and save to appropriate locations
func (*Kobo) SaveDeviceInfo ¶
SaveDeviceInfo save device info to file
func (*Kobo) UpdateIfExists ¶
UpdateIfExists updates onboard metadata if it exists in the Nickel database
func (*Kobo) UpdateNickelDB ¶
UpdateNickelDB updates the Nickel database with updated metadata obtained from a previous run, or this run if updating via triggers
func (*Kobo) WriteUpdateMDfile ¶
WriteUpdateMDfile writes updated metadata to file
type KuOptions ¶
type KuOptions struct { PreferSDCard bool PreferKepub bool PasswordList []string EnableDebug bool AddMetadataByTrigger bool Thumbnail thumbnailOption }
KuOptions contains some options that are required
type MetaIterator ¶ added in v0.4.0
type MetaIterator struct {
// contains filtered or unexported fields
}
MetaIterator Kobo UNCaGED to lazy load book metadata
func NewMetaIter ¶ added in v0.4.0
func NewMetaIter(k *Kobo) *MetaIterator
NewMetaIter creates a new MetaIterator for use
func (*MetaIterator) Add ¶ added in v0.4.0
func (m *MetaIterator) Add(cid string)
Add a client ID to the iterator
func (*MetaIterator) Count ¶ added in v0.4.0
func (m *MetaIterator) Count() int
Count gets the number items in the iterator
func (*MetaIterator) Get ¶ added in v0.4.0
func (m *MetaIterator) Get() (uc.CalibreBookMeta, error)
Get the metadata of the current iteration
func (*MetaIterator) Next ¶ added in v0.4.0
func (m *MetaIterator) Next() bool
Next advances the iterator