Kindle 电子书转换 azw3 mobi

下载一本azw3格式的电子书,通过邮箱推送到kindle时,邮件会被退信,提示不支持的格式,因此需要将azw格式转为mobi格式。

在kindle伴侣网上看到转换方法

将 azw3 格式转换为 mobi 格式并保持原有排版格式

一、准备软件

Calibre 下载:http://kindlefere.com/tools#calibre
Kindlegen 下载:http://kindlefere.com/tools#KindleGen

二、azw3 转 epub

1、安装并打开 Calibre,将 azw3 格式的电子书拖进 Calibre;
2、右键点击它,依次展开菜单“转换书籍” -> “逐个转换”(多本也可选择“批量转换”);
3、在弹出的窗口中将“输出格式”选择为“EPUB”,点击确定开始转换;
4、转换完成后,再次右键点击这本书,点击菜单中的“打开所在目录”得到 epub 格式电子书;
5、将此 epub 格式电子书复制到桌面上备用。

* 如果电子书本来就是 epub 格式可略过这一步。把电子书放到桌面上是为了方便演示,如果愿意您可以将它放到任何位置。

三、epub 转 mobi

1、将下载的 KindleGen 压缩包解压,得到 kindlegen.exe 并放置到桌面上;
2、打开“命令提示符”(Mac OS X 系统打开“终端”),输入下面的命令将目录定位到桌面:

cd desktop

3、输入下面的命令将 epub 格式电子书转换成 mobi 格式:

Windows 系统请输入:kindlegen.exe "bookname.epub"
Mac OS X 系统请输入:/users/你的用户名/desktop/kindlegen "bookname.epub"

* 注意为避免文件名中的字符导致错误,文件名如 bookname.epub 最好用英文双引号包裹。

* Windows 系统用户也可以将电子书直接拖放到 kindlegen.exe 文件上实现转换。

4、得到最终的 mobi 格式电子书,可以推送或拷贝到 Kindle 中阅读。

--------------------------------------------------------------------------------------------------------

在通过kindlegen将epub转换为mobi时,系统会提示错误

```

Warning(prcgen):W14001: Hyperlink not resolved: /home/xxx/Downloads/kindlegen_linux_2.6_i386_v2_9/jingjin_FILES/text/part0000.html#0-c6789ac79b5c427b831de25d238bf6fa

Warning(prcgen):W14001: Hyperlink not resolved: /home/xxx/Downloads/kindlegen_linux_2.6_i386_v2_9/jingjin_FILES/text/part0001.html#UGI0-c6789ac79b5c427b831de25d238bf6fa
Warning(prcgen):W14002: Some hyperlinks could not be resolved.
Info(prcgen):I1008: Resolving start reading location
Info(prcgen):I1049: Building table of content URL: /home/xxx/Downloads/kindlegen_linux_2.6_i386_v2_9/jingjin_FILES/toc.ncx
Error(prcgen):E24010: Hyperlink not resolved in toc (One possible reason can be that the link points to a tag with style display:none):/home/xxx/Downloads/kindlegen_linux_2.6_i386_v2_9/jingjin_FILES/text/part0000.html#0-c6789ac79b5c427b831de25d238bf6fa

````

将epub文件解压后,文档链接所指向的id时存在的,只是id值0-c6789ac79b5c427b831de25d238bf6fa值对应的tag是part0000.html的<body>,需要将body修改为div标签kindlegen才认识,同时额外在外层补一个<body>.

再次通过

`kindlegen  解压epub文件目录/conten.opf -o xxx.mobi`

即可成功生成mobi文件,这个文件比直接使用Calibre转换得到的文件大一点

 

posted @ 2016-07-24 10:29  莫忆往西  阅读(6291)  评论(0编辑  收藏  举报