cli

package
v0.2.78 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SetComplete   = "set"
	ClearComplete = "clear"
)
View Source
const (
	LitResDataSource  = "litres"
	LiveLibDataSource = "livelib"
)

Variables

View Source
var (
	GitTag string
)

Functions

func Backup added in v0.1.85

func Backup() error

func BackupHandler added in v0.1.85

func BackupHandler(_ *url.URL) error

func Cascade added in v0.2.1

func Cascade() error

func CascadeHandler added in v0.2.1

func CascadeHandler(_ *url.URL) error

func Complete added in v0.1.38

func Complete(ids []string, action string) error

func CompleteHandler added in v0.1.38

func CompleteHandler(u *url.URL) error

func Dehydrate added in v0.2.26

func Dehydrate(idSet map[string]bool, all, overwrite bool) error

func DehydrateHandler added in v0.2.26

func DehydrateHandler(u *url.URL) error

func DownloadLitRes added in v0.2.6

func DownloadLitRes(ids []string) error

func DownloadLitResHandler added in v0.2.6

func DownloadLitResHandler(u *url.URL) error

func Export added in v0.1.68

func Export(ids []string) error

func ExportHandler added in v0.1.68

func ExportHandler(u *url.URL) error

func GetLitResCovers added in v0.2.6

func GetLitResCovers(ids []string, forceImported bool) error

func GetLitResCoversHandler added in v0.2.6

func GetLitResCoversHandler(u *url.URL) error

func GetLitResDetails added in v0.2.6

func GetLitResDetails(ids []string, newOnly, noThrottle bool) error

func GetLitResDetailsHandler added in v0.2.6

func GetLitResDetailsHandler(u *url.URL) error

func GetLitResMyBooks added in v0.2.6

func GetLitResMyBooks() error

func GetLitResMyBooksHandler added in v0.2.6

func GetLitResMyBooksHandler(u *url.URL) error

func GetLiveLibCover added in v0.2.6

func GetLiveLibCover(id, src string) error

func GetLiveLibDetails added in v0.2.6

func GetLiveLibDetails(ids []string, hc *http.Client, newOnly bool) error

func GetLiveLibDetailsHandler added in v0.2.6

func GetLiveLibDetailsHandler(u *url.URL) error

func Import added in v0.1.73

func Import() error

Import adds external media to the library, e.g. DRM-free purchases from elsewhere. To do that you need to provide the following in the input directory: - BEFORE YOU START: book id should be a value that can be parsed into int64

- book media files, e.g. `id.mp4`, `id.epub`, `id.txt` - book cover named `id.jpg` - import.txt with the media metadata

  • id - ISBN is recommended or a LiveLib id
  • title, ... - as needed
  • data-source=litres - if the book (or similar book) is available on LitRes
  • > href - e.g. `/book/mihail-shishkin/pismovnik-447855/`
  • data-source=livelib - if the book (or similar book) is available on LiveLib
  • > id of the book should match LiveLib id, e.g. `1003406901`
  • download-links - filenames of the book media files, e.g. id.mp4, id.epub, id.txt
  • download-titles - human-readable titles corresponding to the download-links
  • > e.g. Audio-book (MP4), EPUB, Text file

Upon placing those files, you can run import command. When import completes - all those input files are removed. import.txt is moved to the _imported subdirectory of the input directory as YYYYMMDD-HHMM-import.txt, where YYYYMMDD-HHMM is the date and time of the import.

If needed you can move YYYYMMDD-HHMM-import.txt back to the input directory, rename to import.txt, change some values and import again. New data will overwrite any existing data.

Another suggestion is to consider exporting the book with similar metadata to use as a base for import.txt. export.txt and import.txt have identical structure.

func ImportHandler added in v0.1.73

func ImportHandler(_ *url.URL) error

func IsImported added in v0.1.73

func IsImported(id string, rxa kvas.ReduxAssets) bool

func MapLitResToFedorov added in v0.2.6

func MapLitResToFedorov(id string, lrdx map[string][]string, rdx map[string]map[string][]string)

func MapLiveLibToFedorov added in v0.2.6

func MapLiveLibToFedorov(id string, lrdx map[string][]string, rdx map[string]map[string][]string)

func PostCompletion added in v0.2.11

func PostCompletion(webhookUrl string) error

func PostCompletionHandler added in v0.2.11

func PostCompletionHandler(u *url.URL) error

func Purge added in v0.2.42

func Purge(id string, webhookUrl string, confirm bool) error

Purge will remove all book artefacts from the system: - details - covers - downloads - reductions (must be last to allow downloads to be resolved)

func PurgeHandler added in v0.2.42

func PurgeHandler(u *url.URL) error

func ReduceLitResBookDetails added in v0.2.6

func ReduceLitResBookDetails(id string, kv kvas.KeyValues) (map[string][]string, error)

func ReduceLitResBooksDetails added in v0.2.6

func ReduceLitResBooksDetails(scoreData bool) error

func ReduceLitResDetailsHandler added in v0.2.6

func ReduceLitResDetailsHandler(u *url.URL) error

func ReduceLitResMyBooks added in v0.2.6

func ReduceLitResMyBooks() error

func ReduceLitResMyBooksHandler added in v0.2.6

func ReduceLitResMyBooksHandler(_ *url.URL) error

func ReduceLiveLibBookDetails added in v0.2.6

func ReduceLiveLibBookDetails(id string, kv kvas.KeyValues) (map[string][]string, error)

func Serve

func Serve(port int, stderr bool) error

func ServeHandler added in v0.1.5

func ServeHandler(u *url.URL) error

func Sync

func Sync(webhookUrl string, newOnly, noThrottle bool) error

func SyncHandler added in v0.1.5

func SyncHandler(u *url.URL) error

func VersionHandler added in v0.1.5

func VersionHandler(_ *url.URL) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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