mirror of
https://github.com/hacks-guide/Guide_3DS.git
synced 2024-11-23 01:19:49 +00:00
clean_translations: update for VitePress
This commit is contained in:
parent
95cb1f6894
commit
361f4c0e57
@ -5,21 +5,25 @@ files_in_main = []
|
||||
files_in_main_include = []
|
||||
|
||||
|
||||
for i in os.listdir("_pages/en_US/"):
|
||||
for i in os.listdir("docs"):
|
||||
if i.endswith(".md"):
|
||||
files_in_main.append(i)
|
||||
|
||||
for i in os.listdir("_pages/en_US/include"):
|
||||
for i in os.listdir("docs/_include"):
|
||||
if i.endswith(".md"):
|
||||
files_in_main_include.append(i)
|
||||
|
||||
for i in os.listdir("_pages/"):
|
||||
if i == "en_US":
|
||||
for i in os.listdir("docs"):
|
||||
if not os.path.isdir(f"docs/{i}"):
|
||||
continue
|
||||
for j in os.listdir(f"_pages/{i}"):
|
||||
if j == "include":
|
||||
for k in os.listdir(f"_pages/{i}/include"):
|
||||
if i in [".vitepress", "public", "_include", "_internal"]:
|
||||
continue
|
||||
for j in os.listdir(f"docs/{i}"):
|
||||
if j == "_include":
|
||||
for k in os.listdir(f"docs/{i}/_include"):
|
||||
if k not in files_in_main_include:
|
||||
print(f"Deleting _pages/{i}/include/{k}")
|
||||
os.remove(f"_pages/{i}/include/{k}")
|
||||
print(f"Deleting docs/{i}/_include/{k}")
|
||||
os.remove(f"docs/{i}/_include/{k}")
|
||||
elif j not in files_in_main:
|
||||
print(f"Deleting _pages/{i}/{j}")
|
||||
os.remove(f"_pages/{i}/{j}")
|
||||
print(f"Deleting docs/{i}/{j}")
|
||||
os.remove(f"docs/{i}/{j}")
|
||||
|
Loading…
Reference in New Issue
Block a user