epublifier

package module
v0.0.0-...-006b906 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 12 Imported by: 0

README

go-epublifier

A simple library to convert web novels / news articles into ePub files for your shiny kindle.

Since more and more of my recreational reading has been happening on Kindle these days, and I quite enjoy reading webnovels/fan fiction by hobbyist writers, this library makes it very easy to convert those webpages into ePub novels which can then be sent to your Kindle over USB using Calibre tool.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultChapterSanitiser

func DefaultChapterSanitiser(a readability.Article) (readability.Article, error)

Types

type Epublifier

type Epublifier struct {
	Title             string
	Author            string
	CoverImagePath    string
	CoverImageCSSPath string
	URLIterator       func() string
	ChapterSanitiser  func(readability.Article) (readability.Article, error)
	SavePath          string
}

func (*Epublifier) Create

func (e *Epublifier) Create() error

type EpublifierError

type EpublifierError string
const (
	TitleNotProvidedErr             EpublifierError = "title not provided"
	IteratorNotProvidedErr          EpublifierError = "iterator not provided to iterate through urls"
	AuthorNotProvidedErr            EpublifierError = "author not provided"
	SavePathNotProvidedErr          EpublifierError = "save path not provided"
	CoverImageCSSPathNotProvidedErr EpublifierError = "cover image css path which is necessary when providing cover image"
)

func (EpublifierError) Error

func (e EpublifierError) Error() string

Jump to

Keyboard shortcuts

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