cli

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 32 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 DownloadLitResBooks added in v0.3.0

func DownloadLitResBooks(force bool, ids ...string) error

func DownloadLitResBooksHandler added in v0.3.0

func DownloadLitResBooksHandler(u *url.URL) error

func DownloadLitResCovers added in v0.3.0

func DownloadLitResCovers(skipExisting, forceImported bool, ids ...string) error

func DownloadLitResCoversHandler added in v0.3.0

func DownloadLitResCoversHandler(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 GetLitResArts added in v0.2.82

func GetLitResArts(artsTypes []litres_integration.ArtsType, force bool, ids ...string) error

func GetLitResArtsHandler added in v0.2.82

func GetLitResArtsHandler(u *url.URL) error

func GetLitResAuthors added in v0.2.82

func GetLitResAuthors(authorTypes []litres_integration.AuthorType, force bool, ids ...string) error

func GetLitResAuthorsHandler added in v0.2.82

func GetLitResAuthorsHandler(u *url.URL) error

func GetLitResContentsHandler added in v0.3.0

func GetLitResContentsHandler(u *url.URL) error

func GetLitResHistoryLog added in v0.3.0

func GetLitResHistoryLog() error

func GetLitResHistoryLogHandler added in v0.3.0

func GetLitResHistoryLogHandler(u *url.URL) error

func GetLitResSeries added in v0.2.82

func GetLitResSeries(seriesTypes []litres_integration.SeriesType, force bool, ids ...string) error

func GetLitResSeriesHandler added in v0.2.82

func GetLitResSeriesHandler(u *url.URL) error

func GetLitresContents added in v0.3.0

func GetLitresContents(force bool, ids ...string) 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, rdx kvas.ReadableRedux) bool

func MapLiveLibToFedorov added in v0.2.6

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

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 ReduceLitResArtsDetails added in v0.3.0

func ReduceLitResArtsDetails() error

func ReduceLitResArtsDetailsHandler added in v0.3.0

func ReduceLitResArtsDetailsHandler(u *url.URL) error

func ReduceLitResHistoryLog added in v0.3.0

func ReduceLitResHistoryLog() error

func ReduceLitResHistoryLogHandler added in v0.3.0

func ReduceLitResHistoryLogHandler(_ *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(force 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

type PersonalCabinetHistoryLog added in v0.3.0

type PersonalCabinetHistoryLog struct {
	Pages int `json:"pages"`
}

Jump to

Keyboard shortcuts

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