Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

hantmac/juejinxiaoceToPDFByPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

juejinxiaoceToPDFByPy

将掘金小册制作成一整本PDF

由来

之前写过一个Golang的版本,但是阅读效果不是特别好,这个Python版本可以将所有章节制作成单个PDF文件。看起来会更加方便,转mobi格式的正在开发,遇到一点小问题,使用的kindle_maker库报错。如果想要在kindle上观看小册,可以使用这个工具将PDF转为mobi。

使用方法

  • 参照 https://github.com/hantmac/juejinxiaoceToMobi 的README,获取你想要转换的小册的idclient_iduidtoken、等信息,按照ini文件的格式填入conf.ini
  • pip3 install -r requirements.txt (环境为Python3)
  • python run.py
  • 等待片刻,即可出炉 🍺

注意事项

  • conf.ini中的bookName千万不能含有中文,不然PDF会乱码
  • 使用的pdfkit,可能会比较慢
  • 如果中间报错,很可能是没有安装 wkhtmltopdf,按照官方教程进行安装
  • Mac OS在安装过程中遇到一个错误 Error: Permission denied @ dir_s_mkdir - /usr/local/Caskroom/wkhtmltopdf,查了一下,解决方案是:sudo chown -R $(whoami):staff ~/Library/Caches/Homebrew /usr/local/Caskroom/

效果预览

Releases

No releases published

Packages

No packages published

Languages