We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 609f936 commit 7855a4aCopy full SHA for 7855a4a
AllUp_utils/wiki.py
@@ -39,8 +39,16 @@ def pull(title: str, split_line=False):
39
return ""
40
41
42
+def extract_after_last_colon(s):
43
+ last_colon_index = s.rfind(":")
44
+ return s[last_colon_index + 1 :] if last_colon_index != -1 else s
45
+
46
47
def push(title: str, content_id: str, content: str):
- open(f"{title}.wikitext", "w").write(content)
48
+ with open(
49
+ f"{extract_after_last_colon(title)}.wikitext", "w", encoding="utf-8"
50
+ ) as f:
51
+ f.write(content)
52
if MAIN_REPO_BRANCH or TEST_DISPATCH:
53
wiki.edit(title, content, "Edit via AllUp-Satwiki")
54
if TEST_PR:
0 commit comments