ystyle / kaf-cli Goto Github PK
View Code? Open in Web Editor NEW把txt文本转成epub和mobi电子书的命令行工具(原TmdTextEpub)
Home Page: https://ystyle.top/2019/12/31/txt-converto-epub-and-mobi/
License: Other
把txt文本转成epub和mobi电子书的命令行工具(原TmdTextEpub)
Home Page: https://ystyle.top/2019/12/31/txt-converto-epub-and-mobi/
License: Other
求求大大,是服务器换了吗•́ ‿ ,•̀
小说下载链接:https://dl1.wenku8.com/down.php?type=txt&id=1
kaf-cli.exe -author 乱 -filename C:\Users\USER\Downloads\Book\1.txt -cover C:\Users\USER\Downloads\Book\1.jpg -tips=0
转换信息:
软件版本: v1.3.5
文件名: C:\Users\USER\Downloads\Book\1.txt
书籍书名: 1
书籍作者: 乱
书籍封面: C:\Users\USER\Downloads\Book\1.jpg
书籍语言: zh
匹配条件: 自动匹配
卷匹配条件: ^第[0-9一二三四五六七八九十零〇百千两 ]+[卷部]
转换格式: all
正在读取txt文件...
读取文件耗时: 332.4224ms
匹配章节: 96
kindlegen: C:\Users\USER\Desktop\a\kindlegen.exe
正在生成epub
正在生成电子书...
生成EPUB电子书耗时: 384.937ms
使用第三方库生成azw3, 不保证所有样式都能正常显示
正在生成azw3...
生成azw3电子书耗时: 38.8024ms
kindlegen: C:\Users\USER\Desktop\a\kindlegen.exe
检测到Kindle格式转换器: C:\Users\USER\Desktop\a\kindlegen.exe,正在把书籍转换成Kindle格式...
转换mobi比较花时间, 大约耗时1-10分钟, 请等待...
*************************************************************
Amazon kindlegen(Windows) V2.9 build 1029-0897292
命令行电子书制作软件
Copyright Amazon.com and its Affiliates 2014
*************************************************************
信息:I9018:选项:-donotaddsource:不会添加源文件
信息:I9006:选项:-c1:标准 DOC 压缩
信息(prcgen):I1047: 已添加的元数据dc:Title "1"
信息(prcgen):I1047: 已添加的元数据dc:Creator "乱"
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\cover.xhtml 行: 0000008
信息(prcgen):I1052: Kindle 支持封面图像,但不支持封面采用 HTML。因此,在内容中使用指定的封面图像并禁止采用 HTML 封面。 网址: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\cover.xhtml
信息(prcgen):I1002: 解析文件 0000096
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0001.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0002.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0003.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0004.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0005.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0006.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0007.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0008.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0009.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0010.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0011.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0012.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0013.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0014.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0015.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0016.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0017.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0018.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0019.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0020.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0021.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0022.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0023.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0024.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0025.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0026.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0027.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0028.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0029.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0030.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0031.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0032.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0033.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0034.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0035.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0036.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0037.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0038.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0039.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0040.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0041.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0042.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0043.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0044.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0045.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0046.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0047.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0048.xhtml 行: 0000008
警告(inputpreprocessor):W29008: 由于用法不当,不使用的标签为: </link>
文件中: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\xhtml\section0049.xhtml 行: 0000008
信息(prcgen):I1015: 创建 PRC 文件
信息(prcgen):I1006: 分析超链接
警告(prcgen):W14019: 封面太小: C:\Users\USER\AppData\Local\Temp\mbp_7E7_7_16_0_13_3_346_6DC_3CF8_1\EPUB\images\1.jpg
信息(pagemap):I8000: 没有在本书中发现页面图像
信息(prcgen):I1045: 本书中使用 UNICODE 范围计算
信息(prcgen):I1046: 已发现的 UNICODE 范围:Basic Latin [20..7E]
信息(prcgen):I1046: 已发现的 UNICODE 范围:CJK Unified Ideographs [4E00..9FFF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Miscellaneous Symbols [2600..26FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:General Punctuation - Windows 1252 [2013..2014]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Halfwidth and Fullwidth Forms [FF00..FFEF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Chinese, Japanese, and Korean (CJK) Symbols and Punctuation [3000..303F]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Hiragana [3040..309F]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Latin-1 Supplement [A0..FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Katakana [30A0..30FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Small Form Variants [FE50..FE6F]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Geometric Shapes [25A0..25FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:General Punctuation - other than Windows 1252 [203B..206F]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Box Drawing [2500..257F]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Specials [FFF0..FFFD]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Enclosed Alphanumerics [2460..24FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Arrows [2190..21FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Basic Greek [370..3FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Mathematical Operators [2200..22FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Cyrillic [400..4FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:Spacing Modifier Letters [2B0..2FF]
信息(prcgen):I1046: 已发现的 UNICODE 范围:CJK Compatibility Forms [FE30..FE4F]
信息(prcgen):I1017: 创建 PRC 文件,记录数: 0002193
信息(prcgen):I1039: 最终统计 - 文本压缩为(原始大小的 %): 56.91%
信息(prcgen):I1040: 文档标识符是: "1"
信息(prcgen):I1041: 文件格式版本是 V6
信息(prcgen):I1031: 保存 PRC 文件
信息(prcgen):I1033: 创建 PRC 出现警告!
信息(prcgen):I1016: 创建改进的 PRC 文件
信息(prcgen):I1007: 分析媒体链接
信息(prcgen):I1011: 写入媒体链接
信息(prcgen):I1009: 分析指导项
信息(prcgen):I1017: 创建 PRC 文件,记录数: 0002079
信息(prcgen):I1039: 最终统计 - 文本压缩为(原始大小的 %): 60.30%
信息(prcgen):I1041: 文件格式版本是 V8
信息(prcgen):I1032: 成功创建 PRC
信息(prcgen):I15000:可交付标准Mobi文件大小约为: 0005073KB
信息(prcgen):I15001: KF8 可交付文件大小约为: 0005123KB
信息(prcgen):I1037: 创建 Mobi 域名文件出现警告!
panic: exit status 1
goroutine 1 [running]:
github.com/ystyle/kaf-cli.converToMobi({0xc0015fccca, 0x6}, {0x10d7221, 0x2})
/home/runner/work/kaf-cli/kaf-cli/tools.go:64 +0x274
github.com/ystyle/kaf-cli.(*Book).Convert(0xc0001482c0)
/home/runner/work/kaf-cli/kaf-cli/convert.go:411 +0x318
main.main()
/home/runner/work/kaf-cli/kaf-cli/cmd/cli.go:38 +0x2d2
不知为何就是不识别,一开始用的是\[\d{4}\]
,不识别,然后我把每个章节前面的一个特殊字符批量替换成了“第1节”,这个第1节居然也识别不了。用的是1.2.12版。
可以自动从文件名适配书名和作者么?
例如固定一种取名方式
如雪中悍刀行 - 烽火戏诸侯
或《雪中悍刀行》作者:烽火戏诸侯
拖曳的时候自动适配书名雪中悍刀行,作者烽火戏诸侯
这样就没必要用命令行生成了。
另外,我改名cover.png生成epub文件,在calibre里在线观看会看不到封面,不知道是软件的文件还是calibre的问题?
首先我是小白,我尽力表达
在我电脑里我是这么写的
.\kaf-cli -format "epub" -lang "zh" -cover "cover.png" -filename E:\LCL\Documents\novel/《朕的爱妃只想吃瓜》作者:延琦.txt
转换出来的epub文件是0kb
但是当我用直接拖入的时候,epub是正常生成且带封面的
就。。
挺奇怪的
当文件里 同时有卷号和章号的时候转换会自动忽略其中一个
编辑(已通过正则解决,现在问题是下面二楼的问题。)
凡人修仙传.txt
转化时如果遇到文章中有 "<" “>”等字符时会导致内容缺失等
例如,原文是“ abcdef <666> iiiiiiiiii” 在“>”会断开变成"abcdef <666"
建议提前进行转义变成 & l t ; & g t ;
我只要在-tips=false前面加上"^第[0-9一二三四五六七八九十零〇百千两 ]+卷 "就会在开头和结尾出现2个制作说明
删除正常!
手机版1.0.9 txt转成mobi格式,生成文件在软件内部能看到正常书名,实际保存的文件名是乱码
Darwin localhost 20.1.0 Darwin Kernel Version 20.1.0: root:xnu-7195.50.7~2/RELEASE_X86_64 x86_64
在Darwin上测试本项目时,发现无论如何都去不掉tips的内容,具体研究发现貌似在Darwin命令行传递参数是传递的是String类型的数据,最后到代码中会把string强制转换成bool,导致无法去掉tips
我当然是为了白嫖才会发现的
求一个精简版,只需要生成epub格式的文本功能即可,不需要azw3、mobi文件。
求求
如标题,可否增加“添加封面”的功能呢?
windows版本
源文件(txt格式)如果放在中文目录下,转换到一半就闪退了,换到英文目录就没事
不知道这个Bug能不能复现
epub
→ txt
互转功能,在接触kaf之前一直都是使用本地txt阅读器看小说,优点:没有广告,app体积小,启动速度快,缺点:没有书源,需要手动导入txt、界面简陋、功能太少。后面无意发现ios自带图书软件apple books
可以导入epub格式,使用体验感远超之前使用的txt阅读器。便换成books
阅读小说,将所有收集的资源一次性都转换成了epub格式。这些资源大多都是从盗版网站下载的txt文本,有好多广告信息、错别字等无用字符,想修改替换掉。百度查询后发现编辑epub文本非常麻烦,且效率低。之前转换epub前考虑后面不会在使用txt阅读,都删了只留了epub文本。重新从网上下载一个个找txt资源效率太低,且许多小众资源都搜索不到,都是之前无意中一点点收集的。网上有在线转换网站,但发现转换太慢,且转换后的文本换行格式全乱了,体验很差。所以希望作者可以抽空开发epub
→ txt
互转功能。001 xxx
修改后 第001章 xxx
大概思路是如果目录下没有cover.png
文件,并且也没有在命令中手动指定封面图片,则自动为生成的 epub 等格式添加纯文本的封面。
cover.css
:
从 easypub 生成的 epub 文件里扒过来的样式表
.bookname {
margin-top: 30%;
margin-bottom: 0;
border-style: none solid none none;
border-width: 50px;
border-color: #4e594d;
font-size: 3em;
line-height: 120%;
text-align: right;
}
.bookauthor {
margin-top: 0;
border-style: none solid none none;
border-width: 50px;
border-color: #4e594d;
page-break-after: always;
font-size: large;
line-height: 120%;
text-align: right;
}
对应的cover.xhtml
的 body 部分:
<body>
<div>
<h1 class="bookname">Bookname</h1>
<h3 class="bookauthor">Author</h3>
</div>
</body>
封面效果如图所示
思路再放飞一下,作者大大也可以开放自定义 css 功能,比如加一个引入自定义样式表的参数:satisfied:
有时候会把有后记等...等归纳到最后一卷,这类的想不开启卷的匹配
正在读取txt文件...
读取文件耗时: 177.413113ms
正在生成epub
正在生成电子书...
生成EPUB电子书耗时: 745.950082ms
使用第三方库生成azw3, 不保证所有样式都能正常显示
正在生成azw3...
生成Mobi电子书耗时: 114.61942ms
检测到Kindle格式转换器: kindlegen,正在把书籍转换成Kindle格式...
转换mobi比较花时间, 大约耗时1-10分钟, 请等待...
转换为Kindle格式耗时: 64.2µs
转换完成! 总耗时: 1.038733901s
请问怎样生成二级目录?
比如 xx 章是一级,xx 节 是二级。
go install
时失败,由于含有replace关键字。请问这里为什么replace, 是否可以移除. Go version: go version go1.18.3 windows/amd64
.
$ go install github.com/ystyle/kaf-cli@latest
go: downloading github.com/ystyle/kaf-cli v1.3.6
go: github.com/ystyle/kaf-cli@latest (in github.com/ystyle/[email protected]):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
作者你好,
我是 "kaf-cli" 的用户,我对你的软件非常感兴趣,非常感谢你开发出如此实用的工具,并在最近更新中增加了“二级目录”功能。
最近,我在尝试使用该功能时遇到了一个问题,希望能向你反馈并寻求解决方案。
具体如下:
我的文本目录结构为:
第一部
第一章、第二章、第三章、第四章……第二部
第一章、第二章、第三章、第四章……
以此类推。
kaf-cli 在“二级目录”匹配时,会把“第一部”的最后一章,错误的放在了“第二部”的第一章。
我注意到 kaf-cli 的默认正则可以识别“卷”,无法识别“部”;
为了排除是否因为我的命令出了问题,我又做了测试,把标题改为“第一卷”、“第二卷”……,把文本拖拽到 kaf-cli 上,以完全自动识别,依然是此结果。
此问题让我有些困扰,因此非常希望能得到你的帮助。如果你需要更多信息,或者我可以做些什么来帮助你调试和解决这个问题,请随时告诉我。
再次感谢你提供如此出色的软件,它为我在制作EPUB小说时,提供了巨大的帮助和便利。
望回复为盼。
谢谢!
请问,生成的azw3和mobi文件能压缩么
求指点该命令行指令是否有问题
kaf-cli.exe -align center -author 卖报小郎君 -cover [卖报小郎君]大奉打更人.jpg -filename [卖报小郎君]大奉打更人.txt -line-height 1rem -match "^第.{1,8}章" -max 35 -format epub -volume-match "^第[0-9一二三四五六七八九十零〇百千两 ]+[卷部]" -tips=false
我在测试二级目录
的时候,发现在命令行模式下标题匹配条件
和卷匹配条件
两者不能共存,只能保留一个,-volume-match string
会失效,卷名称会被识别为章节正文
。
如果去除标题匹配规则
,可以识别出卷
目录,但没有达到二级目录
的效果,只是将一级目录卷
识别为同级的标题
经过测试,可以排除掉app(SumatraPDF)不支持二级目录的可能性
您好,请问您是否能增加以下对于epub格式添加字体的支持呢?不胜感激!
下载链接:请移步我的项目进行下载
https://github.com/Mikachu2333/kaf-cli-gui
已更新功能:可自动根据题目生成封面图片
你好,转换过程中出现警告 错误使用 什么什么 之类的是什么原因,有什么影响吗
感谢作者提供的程序,建议加个封面图片选择和awz3格式和epub格式的选择
Mac电脑
使用命令
kaf-cli -filename '小说.txt' -format 'epub' -tips false
或是
kaf-cli -filename '小说.txt' -format 'epub' -tips 0
都无法去除生成文件中的 "制作说明" 内容
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.