feat: 添加自定义正则 & 番号大写转换配置

This commit is contained in:
TachibanaKimika
2023-08-06 15:45:12 +08:00
parent 46c0cd3030
commit e23a25b9b7
4 changed files with 26 additions and 0 deletions

View File

@@ -343,6 +343,18 @@ class Config:
except:
return False
def number_uppercase(self) -> bool:
try:
return self.conf.getboolean("Name_Rule", "number_uppercase")
except:
return False
def number_regexs(self) -> list[str]:
try:
return self.conf.get("Name_Rule", "number_regexs").split()
except:
return []
def update_check(self) -> bool:
try:
return self.conf.getboolean("update", "update_check")
@@ -473,6 +485,8 @@ class Config:
conf.set(sec4, "naming_rule", "number + '-' + title")
conf.set(sec4, "max_title_len", "50")
conf.set(sec4, "image_naming_with_number", "0")
conf.set(sec4, "number_uppercase", "0")
conf.set(sec4, "number_regexs", [])
sec5 = "update"
conf.add_section(sec5)