Documentation ¶
Index ¶
- Constants
- Variables
- func Backup() error
- func BackupHandler(_ *url.URL) error
- func Cascade() error
- func CascadeHandler(_ *url.URL) error
- func Complete(ids []string, action string) error
- func CompleteHandler(u *url.URL) error
- func Dehydrate(idSet map[string]bool, all, overwrite bool) error
- func DehydrateHandler(u *url.URL) error
- func DownloadLitResBooks(force bool, ids ...string) error
- func DownloadLitResBooksHandler(u *url.URL) error
- func DownloadLitResCovers(skipExisting, forceImported bool, ids ...string) error
- func DownloadLitResCoversHandler(u *url.URL) error
- func Export(ids []string) error
- func ExportHandler(u *url.URL) error
- func GetLitResArts(artsTypes []litres_integration.ArtsType, force bool, ids ...string) error
- func GetLitResArtsHandler(u *url.URL) error
- func GetLitResAuthors(authorTypes []litres_integration.AuthorType, force bool, ids ...string) error
- func GetLitResAuthorsHandler(u *url.URL) error
- func GetLitResContentsHandler(u *url.URL) error
- func GetLitResHistoryLog() error
- func GetLitResHistoryLogHandler(u *url.URL) error
- func GetLitResSeries(seriesTypes []litres_integration.SeriesType, force bool, ids ...string) error
- func GetLitResSeriesHandler(u *url.URL) error
- func GetLitresContents(force bool, ids ...string) error
- func GetLiveLibCover(id, src string) error
- func GetLiveLibDetails(ids []string, hc *http.Client, newOnly bool) error
- func GetLiveLibDetailsHandler(u *url.URL) error
- func Import() error
- func ImportHandler(_ *url.URL) error
- func IsImported(id string, rdx kvas.ReadableRedux) bool
- func MapLiveLibToFedorov(id string, lrdx map[string][]string, rdx map[string]map[string][]string)
- func Purge(id string, webhookUrl string, confirm bool) error
- func PurgeHandler(u *url.URL) error
- func ReduceLitResArtsDetails() error
- func ReduceLitResArtsDetailsHandler(u *url.URL) error
- func ReduceLitResHistoryLog() error
- func ReduceLitResHistoryLogHandler(_ *url.URL) error
- func ReduceLiveLibBookDetails(id string, kv kvas.KeyValues) (map[string][]string, error)
- func Serve(port int, stderr bool) error
- func ServeHandler(u *url.URL) error
- func Sync(force bool) error
- func SyncHandler(u *url.URL) error
- func VersionHandler(_ *url.URL) error
- type PersonalCabinetHistoryLog
Constants ¶
const ( SetComplete = "set" ClearComplete = "clear" )
const ( LitResDataSource = "litres" LiveLibDataSource = "livelib" )
Variables ¶
var (
GitTag string
)
Functions ¶
func BackupHandler ¶ added in v0.1.85
func CascadeHandler ¶ added in v0.2.1
func CompleteHandler ¶ added in v0.1.38
func DehydrateHandler ¶ added in v0.2.26
func DownloadLitResBooks ¶ added in v0.3.0
func DownloadLitResBooksHandler ¶ added in v0.3.0
func DownloadLitResCovers ¶ added in v0.3.0
func DownloadLitResCoversHandler ¶ added in v0.3.0
func ExportHandler ¶ added in v0.1.68
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 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 GetLitResContentsHandler ¶ added in v0.3.0
func GetLitResHistoryLog ¶ added in v0.3.0
func GetLitResHistoryLog() error
func GetLitResHistoryLogHandler ¶ added in v0.3.0
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 GetLitresContents ¶ added in v0.3.0
func GetLiveLibCover ¶ added in v0.2.6
func GetLiveLibDetails ¶ added in v0.2.6
func GetLiveLibDetailsHandler ¶ added in v0.2.6
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 IsImported ¶ added in v0.1.73
func IsImported(id string, rdx kvas.ReadableRedux) bool
func MapLiveLibToFedorov ¶ added in v0.2.6
func Purge ¶ added in v0.2.42
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 ReduceLitResArtsDetails ¶ added in v0.3.0
func ReduceLitResArtsDetails() error
func ReduceLitResArtsDetailsHandler ¶ added in v0.3.0
func ReduceLitResHistoryLog ¶ added in v0.3.0
func ReduceLitResHistoryLog() error
func ReduceLitResHistoryLogHandler ¶ added in v0.3.0
func ReduceLiveLibBookDetails ¶ added in v0.2.6
func ServeHandler ¶ added in v0.1.5
func SyncHandler ¶ added in v0.1.5
func VersionHandler ¶ added in v0.1.5
Types ¶
type PersonalCabinetHistoryLog ¶ added in v0.3.0
type PersonalCabinetHistoryLog struct {
Pages int `json:"pages"`
}
Source Files ¶
- backup.go
- cascade.go
- complete.go
- dehydrate.go
- download_litres_books.go
- download_litres_covers.go
- export.go
- get_litres_arts.go
- get_litres_authors.go
- get_litres_contents.go
- get_litres_history_log.go
- get_litres_series.go
- get_livelib_cover.go
- get_livelib_details.go
- import.go
- purge.go
- reduce_litres_arts_details.go
- reduce_litres_history_log.go
- reduce_livelib_details.go
- serve.go
- sync.go
- version.go