From 51901634b55c3ea8ee1e1174f49c8c1519f4894b Mon Sep 17 00:00:00 2001 From: sthope Date: Sat, 19 Aug 2023 23:30:28 +0200 Subject: [PATCH] Initial commit --- scripts/1.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 scripts/1.py diff --git a/scripts/1.py b/scripts/1.py deleted file mode 100644 index fa51523..0000000 --- a/scripts/1.py +++ /dev/null @@ -1,21 +0,0 @@ -# Read the original mkdocs.yml content -with open('mkdocs.yml', 'r') as file: - lines = file.readlines() - -# Find the start and end indexes of the section to replace -start_index = None -end_index = None -for i, line in enumerate(lines): - if line.strip() == '- Portainer Stacks:': - start_index = i - elif line.strip() == '- Swag:': - end_index = i - break - -# Replace the lines between start and end indexes with the new content -if start_index is not None and end_index is not None: - lines[start_index:end_index + 1] = [' - Portainer Stacks:\n', ' - Swag:\n'] - -# Write the modified content back to the mkdocs.yml file -with open('mkdocs.yml', 'w') as file: - file.writelines(lines)