未提供项目说明

PyBookReader的Python项目详细描述


PyBookReader(WIP)

命令行界面(CLI)应用程序,使用Python文本到语音库pyttsx3和{}以及其他一些工具为您阅读PDF书籍。 您可以将所有书籍存储在一个目录中,并让pybookreader扫描、检测并将书籍存储到SQLite数据库中。数据库存储在本地计算机中,因此您不必担心书籍被盗。另外,数据库只存储图书名称、路径位置等基本信息,不存储图书内容。在

此项目正在使用pdftotext,因此您需要安装pdftotext所需的一些依赖项。在

操作系统依赖项

这些指令假设您正在最近的操作系统上使用Python3。程序包名称 对于Python2或更旧的操作系统,可能会有所不同。在

Debian、Ubuntu和朋友

sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev

软呢帽、红帽子和朋友

^{pr2}$

macOS

brew install pkg-config poppler python

Windows

当前仅在使用conda时测试:

  • 安装微软Visual C++构建工具< /LI>
  • 通过conda安装poppler:
    conda install -c conda-forge poppler
    

参考号:pdftotext Github

安装

pip install PyBookReader

使用

Usage: pybookreader [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  read-book-from-db  Read a book already stored in the database by the...
  scan-books         Scan books in a given directory
  show-all-books     Show all available books stored in the database

命令

扫描书籍

扫描--location参数后给出的目录并存储所有书籍

如果要在扫描书籍后将其保存到数据库,请添加--save标志。在

Usage: pybookreader scan-books [OPTIONS]

  Scan books in a given directory

Options:
  -l, --location TEXT  Path to the folder contains your books
  --save               Save the books after scanning them
  --help               Show this message and exit.

例如

pybookreader scan-books -l "/Users/don/Documents/Books/" --save

显示所有书籍

显示数据库中存储的所有可用图书

使用

pybookreader show-all-books

read book from db

通过指定名称或ID来读取存储在数据库中的书

从停止阅读的最后一页开始阅读,如果是第一次阅读,则从开始阅读。 您还可以通过传递--start-from-page参数指定要从中开始的特定页码

Usage: pybookreader read-book-from-db [OPTIONS]

  Read a book already stored in the database by the book's name or its ID.

Options:
  -b, --book TEXT            Name of the book you want to read
  -i, --id INTEGER           ID of the book if it is in the database
  --start-from-page INTEGER  Start reading from the specified page
  --help                     Show this message and exit.

示例:

pybookreader read-book-from-db -b "Learn Python the hard way.pdf" --start-from-page 20

停止阅读

要停止阅读,请按Ctrl + C,然后pybookreader将询问是否要存储进度,以便以后继续。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java我需要使用最小值1 while&for循环显示范围内的素数。并且得到了错误的输出   java报告Junit xml文件   socketJava FTP上载   重新启动SpringBatch时的java通知   java无法使用@Query更新spring数据jpa中的记录   javax与javax的区别。ejb。会话同步和javax。交易同步   SQL查询在TOAD中运行良好,但在java代码中则不行   java私有静态最终字符串未完成其工作   使用forName()动态调用类时java ClassNotFoundException   初始化SparkConf MLLIB时发生java非法访问错误   java JAR文件在Windows上运行,但在Linux上不运行   java JPA和spring处理带有异常和泛型的DAO   java缓存在Spring引导中未得到更新   正则表达式Java匹配器类优先级   java文件。delete()不起作用   java如何为安卓项目生成不同分辨率的图像?   java添加从my RecycleView中选择的项目   java以元素频率顺序遍历多集的最简单方法?   java将JDK路径从WSL2 Ubuntu添加到IntelliJ IDE冻结了屏幕