getnovel

command module
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 25 Imported by: 0

README

getnovel

顾名思义~

Appveyor Build status Travis Build Status GitHub Releases Github All Releases Download Count License

编译

go get github.com/missdeer/getnovel

使用方法

  1. 首先,在当前目录创建名为fonts的目录,并将你喜欢的字体文件改名为CustomFont.ttf后放入该目录;
  2. 然后,在当前目录执行命令获取小说内容:getnovel 小说目录网址,如getnovel https://www.aszw.org/book/192/192150/,可以通过命令行参数对程序行为进行设置,比如指定输出文件格式为PDF或epub等等;
  3. 最后,如果需要得到mobi文件,则继续执行命令打包成mobi文件:kindlegen -c2 -o xxxx.mobi content.opf, kindlegen工具可在Amazon官网下载。可以将kindlegen的路径设置到环境变量KINDLEGEN_PATH中,或者将kindlegen所在目录路径添加到环境变量PATH中,则getnovel会自动调用kindlegen生成mobi文件,省去手动输入命令的步骤。
常用用法
  • 输出适合在电脑上看的PDF格式:getnovel -f pdf -c pc https://www.aszw.org/book/192/192150/
  • 输出适合在电脑上看的PDF格式,但只要其中第11章~第20章内容:getnovel -f pdf -c pc --fromChapter=11 --toChapter=20 https://www.aszw.org/book/192/192150/
  • 输出适合在电脑上看的PDF格式,但以每100章为一个文件:getnovel -f pdf -c pc --chaptersPerFile=100 https://www.aszw.org/book/192/192150/
  • 输出适合在Kindle DXG上看的PDF格式:getnovel -f pdf -c dxg https://www.aszw.org/book/192/192150/
  • 输出适合在6寸或7寸Kindle上看的mobi格式:getnovel -f mobi https://www.aszw.org/book/192/192150/,之后需要运行kindlegen工具,参考上面第3步

支持小说网站

注意事项

  • 输出为PDF格式时,如果遇到打开PDF文件为空白,原因可能是所使用的自定义字体文件中未包含某些字符却被使用了,可以尝试更换嵌入字体文件为字符集较大的,比如“方正准雅宋GBK”等。

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package ebook generate ebook files such as .mobi or it's input, currently only mobi is supported
Package ebook generate ebook files such as .mobi or it's input, currently only mobi is supported
bs

Jump to

Keyboard shortcuts

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