Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于目录里面的卷章问题。 #12

Closed
ciskonc opened this issue Aug 7, 2022 · 5 comments
Closed

关于目录里面的卷章问题。 #12

ciskonc opened this issue Aug 7, 2022 · 5 comments

Comments

@ciskonc
Copy link

ciskonc commented Aug 7, 2022

当文件里 同时有卷号和章号的时候转换会自动忽略其中一个
编辑(已通过正则解决,现在问题是下面二楼的问题。)
凡人修仙传.txt

以凡人修仙传为例如下图
image
image
image

@ciskonc
Copy link
Author

ciskonc commented Aug 7, 2022

还发现一个问题在windows ltsc 用
v1.2.6_windows_amd64 直接将txt拖入kaf-cli.exe 转换上述txt 不会自动转换出epub格式而在1.2.5版本正常,
image

@ystyle
Copy link
Owner

ystyle commented Sep 19, 2022

不会自动转换出epub格式的问题已经好了, 随便问问你的正则是什么 ?

@Zhang668-z
Copy link

大兄弟 匹配卷、章的正则给一下呗 @ciskonc

@ciskonc
Copy link
Author

ciskonc commented Nov 21, 2022

@Zhang668-z
@ystyle 不好意思,之前以为问题解决了没看到你后面的追问,现在才看到之前的提问。我转换的话,是在notepad++里面做了正则替换处理然后,直接按章节转换
以之前发的凡人修仙传.txt为例,我直接在notepad++里面正则替换处理
第(.{1,8})卷(.{1,8})\n第(.{1,8})章(\s)(.{1,8})
替换成
第$3章$4$5 (第$1卷$2)
image
结果如图 然后 直接转换-match 第.{1,8}章

image

我这个方法并没有解决这个问题,只是用notepad++做了前处理取巧让他们出现在同一行而已,各个书有各个书的情况,不具备通用性,估计没有参考价值。

@Zhang668-z
Copy link

Zhang668-z commented Nov 21, 2022

非常感谢老哥@ciskonc 回答 这个方法对我也非常合适!!

之前导出成epub时经我测试正则就算匹配到卷名 如若没有正文也会进行跳过不显示卷名 没想到这种把卷名缀到章节后的方式

@ciskonc ciskonc closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants