Skip to content

Commit

Permalink
updated sphinx directory naming script
Browse files Browse the repository at this point in the history
  • Loading branch information
mail4umar committed Nov 9, 2023
1 parent b26d5b1 commit 29da343
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/replace_sphinx_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
search_directory = "../"

# Define the word to search for and the replacement
search_word = "/project/data/VerticaPy/docs"
search_word = "SPHINX_DIRECTORY"
replacement_word = "/project/data/VerticaPy/docs"


Expand All @@ -21,10 +21,8 @@ def search_replace_in_file(file_path):
# Recursively search for Python files and perform the search and replace
for root, dirs, files in os.walk(search_directory):
for file in files:
if (
file.endswith(".py")
or file.endswith(".rst")
and not file.endswith("replace_sphinx_dir.py")
if (file.endswith(".py") or file.endswith(".rst")) and not file.endswith(
"replace_sphinx_dir.py"
):
file_path = os.path.join(root, file)
search_replace_in_file(file_path)
Expand Down

0 comments on commit 29da343

Please sign in to comment.