mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-25 18:58:11 +00:00
update doc
This commit is contained in:
@@ -26,11 +26,18 @@ def fix_path(doc_root_path):
|
|||||||
context = read_file(file)
|
context = read_file(file)
|
||||||
matches = pattern.findall(context)
|
matches = pattern.findall(context)
|
||||||
|
|
||||||
|
edited = False
|
||||||
for match in matches:
|
for match in matches:
|
||||||
target = "](" + file_map[match.split("/")[-1].replace("](", "")]
|
target = "](" + file_map[match.split("/")[-1].replace("](", "")]
|
||||||
context = context.replace(match, target)
|
context = context.replace(match, target)
|
||||||
|
if target != match:
|
||||||
print(match, target)
|
print(match, target)
|
||||||
|
edited = True
|
||||||
|
print(file, match, target)
|
||||||
|
|
||||||
|
if edited:
|
||||||
with open(file, "w", encoding="utf-8") as f:
|
with open(file, "w", encoding="utf-8") as f:
|
||||||
f.write(context)
|
f.write(context)
|
||||||
|
|
||||||
|
fix_path("doc/zh")
|
||||||
|
fix_path("doc/en")
|
||||||
Reference in New Issue
Block a user