Documentation ¶
Index ¶
- func CreateMD5(filename string) (md5Str string, err error)
- func GenerateCover(this BookInfo)
- func KindlegenCmd(args ...string) *exec.Cmd
- func ReadAllString(filename string) string
- func WriteFile(filename string, data []byte) error
- type BookInfo
- func (this *BookInfo) ChangeVolumeState(hasVolume bool)
- func (this BookInfo) GenerateEPUB() error
- func (this *BookInfo) GenerateISBN()
- func (this BookInfo) GenerateJSON() error
- func (this BookInfo) GenerateMobi()
- func (this BookInfo) GenerateTxt()
- func (this *BookInfo) GenerateUUID()
- func (this BookInfo) ISBN() string
- func (this BookInfo) PrintVolumeInfo()
- func (this *BookInfo) SetISBN(value string)
- func (this *BookInfo) SetKindleEbookType(isMobi bool, isAzw3 bool)
- func (this BookInfo) Split() []BookInfo
- func (this BookInfo) UUID() string
- func (this BookInfo) VolumeState() bool
- type Chapter
- type EBookDLInterface
- type LatestReleasesInfo
- type Meta
- type ProxyChapter
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KindlegenCmd ¶ added in v1.2.0
KindlegenCmd 执行外部kindlegen命令
Types ¶
type BookInfo ¶
type BookInfo struct { EBHost string `json:"ebook_host"` //下载小说的网站 EBookID string `json:"ebook_id"` //对应小说网站的bookid BookISBN string `json:"isbn"` //生成一个isbn码 BookUUID string `json:"uuid"` //生成一个uuid码,准备用于boltdb Name string `json:"bookname"` Author string `json:"author"` Description string `json:"novel_description"` IsMobi bool `json:"is_mobi"` //当为true的时候生成mobi IsAzw3 bool `json:"is_azw3"` //当为true的时候生成azw3, HasVolume bool `json:"has_volume"` //是否有小说分卷,默认为false;当设置为true的时候,Volumes里面需要包含分卷信息 Volumes []Volume `json:"volumes"` //小说分卷信息,一般不设置 Chapters []Chapter `json:"chapters"` //小说章节信息 }
BookInfo 小说信息
func LoadBookJSONData ¶ added in v1.7.2
LoadBookJSONData 从文件中读取BookInfo信息,并返回
func (*BookInfo) ChangeVolumeState ¶ added in v1.6.0
ChangeVolumeState 设置 是否包含分卷信息
func (BookInfo) GenerateEPUB ¶ added in v1.7.3
GenerateEPUB 生成ebpub小说
func (*BookInfo) GenerateISBN ¶ added in v1.7.4
func (this *BookInfo) GenerateISBN()
GenerateISBN GenerateISBN
func (BookInfo) GenerateJSON ¶ added in v1.7.2
GenerateJSON 生成json格式的数据
func (*BookInfo) GenerateUUID ¶ added in v1.7.4
func (this *BookInfo) GenerateUUID()
GenerateUUID 根据小说的作者名和小说名 生成uuid码,使用UUID_V5格式
func (BookInfo) PrintVolumeInfo ¶ added in v1.6.0
func (this BookInfo) PrintVolumeInfo()
PrintVolumeInfo 用于打印 小说分卷信息
func (*BookInfo) SetKindleEbookType ¶ added in v1.5.0
SetKindleEbookType 现在设置,mobi和awz3格式不能同时设置为true
func (BookInfo) Split ¶ added in v1.7.1
Split BookInfo里面的Chapter,以300章为一组进行分割 当少于300章的里面,全部分为一卷;当有1000卷的时候,分为4卷; 当分割有n个卷的时候,剩下的章节大于50章,重开一个分卷,当少于50的时候,分割到最后一个分卷里面
func (BookInfo) VolumeState ¶ added in v1.6.0
VolumeState 返回 HasVolume的状态,true,false
type Chapter ¶
type Chapter struct { Title string `json:"title"` Content string `json:"content"` Link string `json:"chapter_url_link"` }
Chapter 定义小说章节信息
type EBookDLInterface ¶ added in v1.4.0
type EBookDLInterface interface { GetBookInfo(bookid string, proxy string) BookInfo //获取小说的所有信息,包含小说名,作者,简介等信息 GetBookBriefInfo(bookid string, proxy string) BookInfo //获取小说最基本的信息,不包含章节信息 DownloaderChapter(ResultChan chan chan Chapter, pc ProxyChapter, wg *sync.WaitGroup) DownloadChapters(Bi BookInfo, proxy string) BookInfo }
EBookDLInterface 小说下载器接口interface
type LatestReleasesInfo ¶ added in v1.7.3
LatestReleasesInfo 获取最新的Releases信息
func UpdateCheck ¶ added in v1.7.3
func UpdateCheck() (obj LatestReleasesInfo, err error)
UpdateCheck 检查更新
func (LatestReleasesInfo) Compare ¶ added in v1.7.3
func (ri LatestReleasesInfo) Compare(CurVersion string) string
Compare 对版本进行对比
func (LatestReleasesInfo) String ¶ added in v1.7.3
func (ri LatestReleasesInfo) String() string
String ReleaseInfo String()
type Meta ¶ added in v1.7.1
type Meta struct { Ebhost string `json:"ebhost"` Bookid string `json:"bookid"` BookName string `json:"bookname"` BookISBN string `json:"isbn"` BookUUID string `json:"uuid"` Author string `json:"author"` CoverURL string `json:"cover_url"` Description string `json:"description"` TxtURLPath string `json:"txt_url_path"` MobiURLPath string `json:"mobi_url_path"` EPUBURLPath string `json:"epub_url_path"` AZW3URLPath string `json:"azw3_url_path"` TxtMD5 string `json:"txt_md5_info"` MobiMD5 string `json:"mobi_md5_info"` EPUBMD5 string `json:"epub_md5_info"` AZW3MD5 string `json:"azw3_md5_info"` }
Meta 小说的metainfo
func GetMetaData ¶ added in v1.7.1
GetMetaData 从文件中读取meta信息,并返回
type ProxyChapter ¶ added in v1.3.0
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package main Code generated by go-bindata.
|
Package main Code generated by go-bindata. |