source

package
v0.0.0-...-07aeb4e Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CHAPTERS_COLUMN = "columns.chapter"
View Source
const CHAPTERS_QUERY = "SELECT id FROM calibre.custom_columns WHERE label = ?;"
View Source
const PREVIOUS_BOOKS_IN_SERIES_QUERY = `` /* 855-byte string literal not displayed */
View Source
const PREVIOUS_BOOKS_IN_SERIES_QUERY_NO_CHAPTERS = `` /* 807-byte string literal not displayed */
View Source
const RECENT_READS_QUERY = `` /* 1104-byte string literal not displayed */

I'd love to compress these into one query, but can't figure out a SQL query that still passes if a table doesn't exist

View Source
const RECENT_READS_QUERY_NO_CHAPTERS = `` /* 1056-byte string literal not displayed */
View Source
const RECENT_READS_QUERY_NO_CHAPTERS_RANKED = `` /* 1692-byte string literal not displayed */
View Source
const RECENT_READS_QUERY_RANKED = `` /* 1747-byte string literal not displayed */

Variables

This section is empty.

Functions

func GetActiveSources

func GetActiveSources() []string

func GetSources

func GetSources() map[string]Source

Types

type Book

type Book struct {
	BookID          int      `db:"book_id"`
	BookName        string   `db:"book_name"`
	SeriesID        *int     `db:"series_id"`
	BookSeriesIndex *int     `db:"book_series_index"`
	ReadStatus      int      `db:"read_status"`
	ISBN            *string  `db:"isbn"`
	AnilistID       *string  `db:"anilist_id"`
	HardcoverID     *string  `db:"hardcover_id"`
	ProgressPercent *float64 `db:"progress_percent"`
	ChapterCount    *int     `db:"chapter_count"`
}

type BookContext

type BookContext struct {
	Current  Book
	Previous []Book
}

type Source

type Source interface {
	Init() error
	GetRecentReads() ([]BookContext, error)
}

func NewDatabaseSource

func NewDatabaseSource() Source

Jump to

Keyboard shortcuts

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