Skip to content

Commit 4769adc

Browse files
committed
Update post-render.py
1 parent 52d1d1e commit 4769adc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/scripts/post-render.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1-
with open("reference/Actions.html", "r") as file:
1+
import os
2+
3+
# Print the working directory
4+
print("Current working directory:", os.getcwd())
5+
6+
# Get a list of all files in the current directory
7+
files = os.listdir("reference")
8+
print("Files in 'reference' directory:", files)
9+
10+
with open("docs/reference/Actions.html", "r") as file:
211
content = file.readlines()
312

413
# Replace `<h1>Actions</h1>` with `<h1><code>Actions</code></h1>`
514
content = [line.replace("<h1>Actions</h1>", "<h1><code>Actions</code></h1>") for line in content]
615

7-
with open("reference/Actions.html", "w") as file:
16+
with open("docs/reference/Actions.html", "w") as file:
817
file.writelines(content)

0 commit comments

Comments
 (0)