解决PC端Calibre使用过程遇到的一些问题

解决PC端Calibre使用过程遇到的一些问题

前言Calibre 是个管理电子书的工具,简单来说,如果你的电子书乱成一团,它能帮你整理得井井有条。Calibre 能转换电子书格式,改书名、换封面、整理分类,批量修改元数据等。

本期分享PC端Calibre使用过程中遇到的的一些问题和解决办法

Pc端Calibre下载

书籍载入错误点击阅读时出现无法加载书籍

错误图片

错误详情123456789101112131415161718192021calibre, version 8.0.1错误: 无法加载书籍: 无法打开位于 P:\书籍\__Zhu Rong Ji Da Ji Zhe Wen __ Bian\Zhu Rong Ji Da Ji Zhe Wen (175)\Zhu Rong Ji Da Ji Zhe Wen - __Zhu Rong Ji Da Ji Zhe Wen __ .epub 的书籍,点击“显示详情”获取更多信息。Failed to convert book: P:\书籍\__Zhu Rong Ji Da Ji Zhe Wen __ Bian\Zhu Rong Ji Da Ji Zhe Wen (175)\Zhu Rong Ji Da Ji Zhe Wen - __Zhu Rong Ji Da Ji Zhe Wen __ .epub with error:InputFormatPlugin: EPUB Input runningon P:\书籍\__Zhu Rong Ji Da Ji Zhe Wen __ Bian\Zhu Rong Ji Da Ji Zhe Wen (175)\Zhu Rong Ji Da Ji Zhe Wen - __Zhu Rong Ji Da Ji Zhe Wen __ .epubFound HTML cover OPS/coverpage.htmlFailed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main()Traceback (most recent call last): File "runpy.py", line 198, in _run_module_as_main File "runpy.py", line 88, in _run_code File "site.py", line 83, in File "site.py", line 78, in main File "site.py", line 50, in run_entry_point File "calibre\utils\ipc\worker.py", line 196, in main File "", line 1, in File "calibre\srv\render_book.py", line 845, in viewer_main File "calibre\srv\render_book.py", line 836, in render_for_viewer File "calibre\srv\render_book.py", line 814, in render File "calibre\srv\render_book.py", line 616, in process_exploded_bookcalibre.srv.render_book.Spineless: Book is empty, no content in spine

查找原因改epub文件后缀为.zip,解压软件解压

如果.epub 缺少content.opf文件或即使存在content.opf文件但是里面没有spine标签,就会导致 Calibre 无法正确解析。

解决方法选中这本书,右键转换书籍,单个转换,输入输出格式默认epub即可,其他也默认,直接点击确定。

会把这本epub格式的书籍重新转换成标准的epub格式,输出的目录和源书籍同一个目录。

调整行间距有的书籍的行距很小,影响阅读体验。Calibre支持自定义书籍行间距。

调整前后的对比

调整方法点击查看调整方法

打开你想阅读的电子书,在calibre电子书查看器中,依次“右键 - 首选项 - 样式”,然后, 在css样式框里添加自定义样式,如下:

1body{line-height:36px}

如果以上代码对样式无效,就换下面的代码:

1p{line-height:36px}

书库拼音目录问题添加书籍后书库的目录命名是以作者名字的字母拼音命名

问题详情中文书籍的目录名字是拼英,非常不直观。

解决方法安装 NoTrans插件解决

NoTrans插件的github地址

下载 NoTrans.zip

打开 Calibre - 首选项 - [高级选项] 插件 - 从文件加载插件(右下角) - 选择下载的 zip 文件

重启 Calibre

享受

插件推荐大部分摘自Calibre 插件推荐

Douban books,Calibre 豆瓣元数据下载插件;

NLCISBNPlugin,基于中国国家图书馆ISBN检索的元数据插件。

Goodreads,下载 Goodreads 元数据;

Calibre Power Search Plugin,开启全文搜索功能,默认快捷键是 Ctrl+Shift+S;

Ebook Translator,使用 OpenAI、Google Translate、DeepL 等 api 翻译书籍;

English Noun Frequency,统计书中的英语名词频率;

EpubMerge,合并书籍;

EpubSplit,拆分书籍;

Highlights to Obsidian,将 Calibre 中的高亮和笔记同步到 Obsidian 中。

书籍元数据修改导入书籍后出现书名有推广,或者有有其他“废话”

问题详情

书名不对,影响后续元数据下载

解决方法书籍不多的情况下,可以导入后右键编辑元数据进行修改。

书籍多的情况,可以结合以下命令通过脚本批量修改。

查看书籍元数据

1ebook-meta "你的书籍.azw3"

更改数据元数据(以标题为例)

1ebook-meta "三体全集.套装共3册.azw3" --title "三体全集"

Txt转Epubtxt转成epub标准格式的书籍,主页涉及以下三个方面

字体

文字样式

目录

字体选中要转换的书籍,右键,转换书籍,选择界面外观,点击嵌入字体选项,选择或上传字体

文字样式在界面外观选线里面自定义喜欢的样式

这里给个样式

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265少数派CSS:/* Sspai Web Theme A theme to [sspai](ssp.ai) default theme. Developed by Codegass(wchweichenhao@gmial.com) & Yves(yves@sspai.com) Download Cuto on the App Store and Google Play! */body { font-size: 15px; color: #333; background: #fff; font-family: Helvetica, Arial, "PingFang SC", "Microsoft YaHei", "WenQuanYi Micro Hei", "tohoma,sans-serif"; margin: 0; padding: 10%;}h1 { font-size: 2.2em; font-weight: 700; line-height: 1.1; padding-top: 16px; margin-bottom: 4px;}h2, h3, h4, h5, h6 { line-height: 1.5em; margin-top: 2.2em; margin-bottom: 4px;}h2 { font-size: 1.4em; margin: 40px 10px 20px 0; padding-left: 9px; border-left: 6px solid #ff7e79; font-weight: 700; line-height: 1.4;}h3 { font-weight: 700; font-size: 1.2em; line-height: 1.4; margin: 10px 0 5px; padding-top: 10px;}h4 { font-weight: 700; text-transform: uppercase; font-size: 1.1em; line-height: 1.4; margin: 10px 0 5px; padding-top: 10px}h5, h6 { font-size: .9em;}h5 { font-weight: bold; text-transform: uppercase;}h6 { font-weight: normal; color: #AAA;}img { width: 100%; border-radius: 5px; display: block; margin-bottom: 15px; height: auto;}dl, ol, ul { margin-top: 12px; margin-bottom: 20px; padding-left: 5%; line-height: 1.8;}p { margin: 0 0 20px; padding: 0; line-height: 1.8;}a { color: #f22f27; text-decoration: none;}a:hover { color: #f55852; text-decoration: underline;}a:focus { outline-offset: -2px;}blockquote { font-size: 1em; font-style: normal; padding: 30px 38px; margin: 0 0 15px; position: relative; line-height: 1.8; text-indent: 0; border: none; color: #888;}blockquote:before { content: "“"; left: 12px; top: 0; color: #E0E0E0; font-size: 4em; font-family: Arial, serif; line-height: 1em; font-weight: 700; position: absolute;}blockquote:after { content: "”"; right: 12px; bottom: -26px; color: #E0E0E0; font-size: 4em; font-family: Arial, serif; line-height: 1em; font-weight: 700; position: absolute; bottom: -31px;}strong, dfn { font-weight: 700;}em, dfn { font-style: italic; font-weight: 400;}del { text-decoration: line-through;}/*code {font-size:90%;}*//*pre {text-align:left; overflow-x: scroll; color: #257fa0; background: #f6f6f6; padding: 10pt 15pt; border-radius: 3px; border: solid 1px #e2e2e2;}*/pre { margin: 0 0 10px; font-size: 13px; line-height: 1.42857; word-break: break-all; word-wrap: break-word; border-radius: 4px; white-space: pre-wrap; display: block; background: #f8f8f8; padding: 10px 20px; border: none; margin-bottom: 25px; color: #666; font-family: Courier, sans-serif;}code { color: #c7254e; background-color: #f9f2f4; border-radius: 4px; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; padding: 2px 4px; font-size: 90%;}p>code { color: #c7264e; background-color: #f9f2f4; font-size: .95em; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;}figure { margin: 1em 0;}figcaption { font-size: 0.75em; padding: 0.5em 2em; margin-bottom: 2em;}figure img { margin-bottom: 0px;}hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee;}ol p, ul p { margin-bottom: 0px;}li { margin-bottom: 0.75em; margin-top: 0.75em;}ol#footnotes { font-size: 0.95em; padding-top: 1em; margin-top: 1em; margin-left: 0; border-top: 1px solid #eaeaea; counter-reset: footer-counter; list-style: none; color: #555; padding-left: 5%; margin: 20px 0;}ol#footnotes li { margin-bottom: 10px; margin-left: 16px; font-weight: 400; line-height: 2; list-style-type: none;}ol#footnotes li:before { content: counter(footer-counter) ". "; counter-increment: footer-counter; font-weight: 800; font-size: .95em;}@keyframes highfade { 0% { background-color: none; } 20% { background-color: yellow; } 100% { background-color: none; }}@-webkit-keyframes highfade { 0% { background-color: none; } 20% { background-color: yellow; } 100% { background-color: none; }}a:target, ol#footnotes li:target, sup a:target { animation-name: highfade; animation-duration: 2s; animation-iteration-count: 1; animation-timing-function: ease-in-out; -webkit-animation-name: highfade; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: 1; -webkit-animation-timing-function: ease-in-out;}a:target { border: 0; outline: 0;}animation-iteration-count: 1;-webkit-animation-timing-function: ease-in-out;}a:target { border: 0; outline: 0;}tion-iteration-count: 1;-webkit-animation-timing-function: ease-in-out;}a:target { border: 0; outline: 0;}

样式使用前后对比:

目录生成通过calibre的结构检测可以生成目录。

目录结构的生成,需要根据txt书籍的章节特征来写对应的正则表达式。

纯数字的章节特征

比如某个txt的结构如下

1234567891011121 内容2 内容3 内容4 内容5 内容6 内容检测章节的Xpath表达式就要这么写

1//*[re:test(., "^\s*[0-9]+\s*$")]

其他

PC端Calibre人工精准抓取元数据常规步骤

拖动书籍到软件页面

选中添加的书籍

右键编辑元数据,逐个编辑元数据

设置Calibre抓取元数据的数据源(“下载元数据”旁边的按钮,勾选安装的豆瓣插件,后续不用再设置)

确保书名没有多余内容,点击“下载元数据”,等待抓取数据

核对抓取的数据和书籍是否一致(从书名和作者看),点击确定,选择封面,点击确定,点击确定

书籍尽量找epub格式,一般都自带侧边栏目录和样式,而且Calibre也支持epub在线看,其他格式好像不支持。

找好书源,实在找不到好书源再折腾转换格式之类。

点击下载以上出现的Caliber相关文件

清芳推荐

黄历中的冠笄是什么意思,现在指什么?
365彩票网3d专家预测

黄历中的冠笄是什么意思,现在指什么?

📅 09-08 👀 2429
《骑马与砍杀2:霸主》骑砍2怎么离婚?
约彩365安卓老版本

《骑马与砍杀2:霸主》骑砍2怎么离婚?

📅 09-01 👀 1273
如何正确蒸制糯米?
365bet亚洲版登录

如何正确蒸制糯米?

📅 10-30 👀 360