Обновление вывода информации о патчах, добавление патча лайков/дизлайков

This commit is contained in:
2025-10-11 18:40:44 +03:00
parent b646dbf6fe
commit 28c60aa7a3
27 changed files with 313 additions and 114 deletions
+3 -3
View File
@@ -1,5 +1,4 @@
"""
Изменяет формат "поделиться"
"""Изменяет формат "поделиться"
"selectable_text": {
"enabled": true,
@@ -31,7 +30,7 @@ DEFAULT_FORMATS = {
}
class Config(PatchConfig):
format: Dict[str, str] = Field(DEFAULT_FORMATS)
format: Dict[str, str] = Field(DEFAULT_FORMATS, description="Строки для замены в `strings.xml`")
# Patch
def apply(config: Config, base: Dict[str, Any]) -> bool:
@@ -42,6 +41,7 @@ def apply(config: Config, base: Dict[str, Any]) -> bool:
tree = etree.parse(file_path, parser)
root = tree.getroot()
# Обновляем значения
for string in root.findall("string"):
name = string.get("name")
if name in config.format: