更新 TXT目录规则

内容: 更新评论区和发送至邮箱(i@qnmlgb.trade)的,从2月份至今,反馈的所有目录规则问题(h书除外)

- 新增: 通用兼容规则  规则松,匹配次数多(默认关闭,需自行打开),支持匹配几十种非常见目录格式。包括但不限于以下 特殊标题格式
    ===第3章 大唐男儿===(有专用格式)
    33.
    1 | 章节名称
    vol.001
    [web] 406 猫猫烦恼的
    No.11
    李敬业番外:本色出演
    番外之一
    001 巨硬的反义词
- 更新:特殊符号 标题(成对)
    支持 (10)我奶常山赵子聋 等目录格式
- 新增:特定字符 标题 特定符号
    ===第一章 xxxxx===
- 新增: 字数分割 分节阅读   常见于按字数分割章节的网站
    分段阅读_1
    霸道赵四爱上我_分段阅读_1
    第一页
    第一节
- 新增: 默认分章规则(兜底规则)  在所有规则找不到目录时,启用此规则可以使用默认分章规则
- 新增: 纯数字、数字混合标题(限大小写)的识别
pull/2583/head
fisher 2 years ago
parent 8f4d9cef85
commit e00b3d490a
  1. 122
      app/src/main/assets/defaultData/txtTocRule.json

@ -43,120 +43,168 @@
"id": -6, "id": -6,
"enable": false, "enable": false,
"name": "大写数字(纯数字标题)", "name": "大写数字(纯数字标题)",
"rule": "(?<=[ \\s])[零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,12}[  \\t]{0,4}$", "rule": "(?<=[ \\s])[零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,12}[  \\t]{0,4}$",
"example": "一百七十", "example": "一百七十",
"serialNumber": 4 "serialNumber": 5
}, },
{ {
"id": -7, "id": -7,
"enable": false,
"name": "数字混合(纯数字标题)",
"rule": "(?<=[ \\s])[零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟\\d]{1,12}[  \\t]{0,4}$",
"example": "12\n一百七十",
"serialNumber": 6
},
{
"id": -8,
"enable": true, "enable": true,
"name": "数字 分隔符 标题名称", "name": "数字 分隔符 标题名称",
"rule": "^[  \\t]{0,4}\\d{1,5}[::,., 、_—\\-].{1,30}$", "rule": "^[  \\t]{0,4}\\d{1,5}[::,., 、_—\\-].{1,30}$",
"example": "1、这个就是标题", "example": "1、这个就是标题",
"serialNumber": 5 "serialNumber": 7
}, },
{ {
"id": -8, "id": -9,
"enable": true, "enable": true,
"name": "大写数字 分隔符 标题名称", "name": "大写数字 分隔符 标题名称",
"rule": "^[  \\t]{0,4}(?:序章|楔子|正文(?!完|结)|终章|后记|尾声|番外|[零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8})[ 、_—\\-].{1,30}$", "rule": "^[  \\t]{0,4}(?:序章|楔子|正文(?!完|结)|终章|后记|尾声|番外|[零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8})[ 、_—\\-].{1,30}$",
"example": "一、只有前面的数字有差别", "example": "一、只有前面的数字有差别",
"serialNumber": 6 "serialNumber": 8
}, },
{ {
"id": -9, "id": -10,
"enable": false,
"name": "数字混合 分隔符 标题名称",
"rule": "^[  \\t]{0,4}(?:序章|楔子|正文(?!完|结)|终章|后记|尾声|番外|[零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}[ 、_—\\-]|\\d{1,5}[::,., 、_—\\-]).{0,30}$",
"example": "1、人参公鸡\n二百二十、boy next door",
"serialNumber": 9
},
{
"id": -11,
"enable": true, "enable": true,
"name": "正文 标题/序号", "name": "正文 标题/序号",
"rule": "^[  \\t]{0,4}正文[  ]{1,4}.{0,20}$", "rule": "^[  \\t]{0,4}正文[  ]{1,4}.{0,20}$",
"example": "正文 我奶常山赵子龙", "example": "正文 我奶常山赵子龙",
"serialNumber": 7 "serialNumber": 10
}, },
{ {
"id": -10, "id": -12,
"enable": true, "enable": true,
"name": "Chapter/Section/Part/Episode 序号 标题", "name": "Chapter/Section/Part/Episode 序号 标题",
"rule": "^[  \\t]{0,4}(?:[Cc]hapter|[Ss]ection|[Pp]art|PART|[Nn][oO]\\.|[Ee]pisode|(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外)\\s{0,4}\\d{1,4}.{0,30}$", "rule": "^[  \\t]{0,4}(?:[Cc]hapter|[Ss]ection|[Pp]art|PART|[Nn][oO][.、]|[Ee]pisode|(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外)\\s{0,4}\\d{1,4}.{0,30}$",
"example": "Chapter 1 MyGrandmaIsNB", "example": "Chapter 1 MyGrandmaIsNB",
"serialNumber": 8 "serialNumber": 11
}, },
{ {
"id": -11, "id": -13,
"enable": false, "enable": false,
"name": "Chapter(去简介)", "name": "Chapter(去简介)",
"rule": "^[  \\t]{0,4}(?:[Cc]hapter|[Ss]ection|[Pp]art|PART|[Nn][Oo]\\.|[Ee]pisode)\\s{0,4}\\d{1,4}.{0,30}$", "rule": "^[  \\t]{0,4}(?:[Cc]hapter|[Ss]ection|[Pp]art|PART|[Nn][Oo]\\.|[Ee]pisode)\\s{0,4}\\d{1,4}.{0,30}$",
"example": "Chapter 1 MyGrandmaIsNB", "example": "Chapter 1 MyGrandmaIsNB",
"serialNumber": 9 "serialNumber": 12
}, },
{ {
"id": -12, "id": -14,
"enable": true, "enable": true,
"name": "特殊符号 序号 标题", "name": "特殊符号 序号 标题",
"rule": "(?<=[\\s ])[【〔〖「『〈[\\[](?:第|[Cc]hapter)[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,10}[章节].{0,20}$", "rule": "(?<=[\\s ])[【〔〖「『〈[\\[](?:第|[Cc]hapter)[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,10}[章节].{0,20}$",
"example": "【第一章 后面的符号可以没有", "example": "【第一章 后面的符号可以没有",
"serialNumber": 10 "serialNumber": 13
}, },
{ {
"id": -13, "id": -15,
"enable": false, "enable": false,
"name": "特殊符号 标题(成对)", "name": "特殊符号 标题(成对)",
"rule": "(?<=[\\s ]{0,4})(?:[\\[〈「『〖〔《(【\\(].{1,30}[\\)】)》〕〗』」〉\\]]?|(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外)[  ]{0,4}$", "rule": "(?<=[\\s ]{0,4})(?:[\\[〈「『〖〔《(【\\(].{1,30}[\\)】)》〕〗』」〉\\]]?|(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外)[  ]{0,4}$",
"example": "『加个直角引号更专业』", "example": "『加个直角引号更专业』\n(11)我奶常山赵子聋",
"serialNumber": 11 "serialNumber": 14
}, },
{ {
"id": -14, "id": -16,
"enable": true, "enable": true,
"name": "特殊符号 标题(单个)", "name": "特殊符号 标题(单个)",
"rule": "(?<=[\\s ]{0,4})(?:[☆★✦✧].{1,30}|(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外)[  ]{0,4}$", "rule": "(?<=[\\s ]{0,4})(?:[☆★✦✧].{1,30}|(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外)[  ]{0,4}$",
"example": "☆、晋江作者最喜欢的格式", "example": "☆、晋江作者最喜欢的格式",
"serialNumber": 12 "serialNumber": 15
}, },
{ {
"id": -15, "id": -17,
"enable": true, "enable": true,
"name": "章/卷 序号 标题", "name": "章/卷 序号 标题",
"rule": "^[ \\t ]{0,4}(?:(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外|[卷章][\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8})[  ]{0,4}.{0,30}$", "rule": "^[ \\t ]{0,4}(?:(?:内容|文章)?简介|文案|前言|序章|楔子|正文(?!完|结)|终章|后记|尾声|番外|[卷章][\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8})[  ]{0,4}.{0,30}$",
"example": "卷五 开源盛世", "example": "卷五 开源盛世",
"serialNumber": 13 "serialNumber": 16
}, },
{ {
"id": -16, "id": -18,
"enable": false, "enable": false,
"name": "顶格标题", "name": "顶格标题",
"rule": "^\\S.{1,20}$", "rule": "^\\S.{1,20}$",
"example": "不超过20字顶格写的都是标题", "example": "20字以内顶格写的都是标题",
"serialNumber": 14 "serialNumber": 17
}, },
{ {
"id": -17, "id": -19,
"enable": false, "enable": false,
"name": "双标题(前向)", "name": "双标题(前向)",
"rule": "(?m)(?<=[ \\t ]{0,4})第[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章.{0,30}$(?=[\\s ]{0,8}第[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章)", "rule": "(?m)(?<=[ \\t ]{0,4})第[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章.{0,30}$(?=[\\s ]{0,8}第[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章)",
"example": "第一章 真正的标题并假装换行第一章 这个不要", "example": "第一章 真正的标题\n第一章 这个不要",
"serialNumber": 15 "serialNumber": 18
}, },
{ {
"id": -18, "id": -20,
"enable": false, "enable": false,
"name": "双标题(后向)", "name": "双标题(后向)",
"rule": "(?m)(?<=[ \\t ]{0,4}第[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章.{0,30}$[\\s ]{0,8})第[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章.{0,30}$", "rule": "(?m)(?<=[ \\t ]{0,4}第[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章.{0,30}$[\\s ]{0,8})第[\\d零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}章.{0,30}$",
"example": "第一章 这个标题不要并假装换行第一章真正的标题", "example": "第一章 这个标题不要\n第一章真正的标题",
"serialNumber": 16 "serialNumber": 19
}, },
{ {
"id":-19, "id": -21,
"enable": true, "enable": true,
"name": "书名 括号 序号", "name": "书名 括号 序号",
"rule": "^.{1,20}[((][\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}[))][  \t]{0,4}$", "rule": "^.{1,20}[((][\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}[))][  \t]{0,4}$",
"example": "标题后面数字有括号(12)", "example": "标题后面数字有括号(12)",
"serialNumber": 17 "serialNumber": 20
}, },
{ {
"id":-20, "id": -22,
"enable": true, "enable": true,
"name": "书名 序号", "name": "书名 序号",
"rule": "^.{1,20}[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}[  \t]{0,4}$", "rule": "^.{1,20}[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]{1,8}[  \t]{0,4}$",
"example": "标题后面数字没有括号124", "example": "标题后面数字没有括号124",
"serialNumber": 18 "serialNumber": 21
},
{
"id": -23,
"enable": true,
"name": "特定字符 标题 特定符号",
"rule": "(?<=\\={3,6}).{1,40}?(?=\\=)",
"example": "===起这种标题干什么===",
"serialNumber": 22
},
{
"id": -24,
"enable": true,
"name": "字数分割 分节阅读",
"rule": "(?<=[  \\t]{0,4})(?:.{0,15}分[页节章段]阅读[-_ ]|第\\s{0,4}[\\d零一二两三四五六七八九十百千万]{1,6}\\s{0,4}[页节]).{0,30}$",
"example": "分节|分页|分段阅读\n第一页",
"serialNumber": 23
},
{
"id": -25,
"enable": false,
"name": "通用规则",
"rule": "(?im)^.{0,6}(?:[引楔]子|正文(?!完|结)|[引序前]言|[序终]章|扉页|[上中下][部篇卷]|卷首语|后记|尾声|番外|={2,4}|第\\s{0,4}[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟]+?\\s{0,4}(?:章|节(?!课)|卷|页[、  ]|集(?![合和])|部(?![分是门落])|篇(?!张))).{0,40}$|^.{0,6}[\\d〇零一二两三四五六七八九十百千万壹贰叁肆伍陆柒捌玖拾佰仟a-z]{1,8}[、.  ].{0,20}$",
"example": "激进规则,适配更多非常用格式",
"serialNumber": 24
},
{
"id": -100,
"enable": false,
"name": "默认分章规则",
"rule": "",
"example": "兜底规则,请勿改动此内容",
"serialNumber": 99
} }
] ]
Loading…
Cancel
Save