common

package
v0.0.0-...-5f907a7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CONFIGFILE   = "termfb2.conf"
	LASTFILE     = "last"
	DBFILE       = "book.db"
	DBCOLLECTION = "books"
	VENDOR       = ".rionnag"
	APPNAME      = "termfb2"
)
View Source
const (
	FIELD_AUTHOR    = "author"
	FIELD_TITLE     = "title"
	FIELD_ADDED     = "added"
	FIELD_COMPLETED = "completed"
	FIELD_GENRE     = "genre"
	FIELD_PERCENT   = "percent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BookDb

type BookDb interface {
	ReadDatabase()
	SetFilter(filter string)
	Filter() string
	FilteredBooks() []BookRecord
	DeleteBookByIndex(index int)
	BookList() []BookRecord
	UpdateBookInDb(bookPath string, position, length int, bookInfo *BookRecord)
	SetSortMode(field string, asc bool)
	BookByFilePath(filePath string) (BookRecord, bool)
}

type BookRecord

type BookRecord struct {
	// internal
	FilePath  string
	Id        string
	Added     string
	Completed string
	LineLast  int
	LineTotal int
	// from FB2
	FirstName string
	LastName  string
	Title     string
	Sequence  string
	Language  string
	Genre     string
}

Jump to

Keyboard shortcuts

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