Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 3.8
# 3.8 Given a scenario implement authentication and authorization solutions

## Authentication management

Expand Down
4 changes: 3 additions & 1 deletion security-plus-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ def generate_security_plus_file():
with open(markdown_file, "w") as f:
f.write("# **CompTIA Security+ (SY0-601)**\n\n")
folders = [f for f in os.listdir() if os.path.isdir(f) and re.match(r"\d\.\d-[a-z-]+", f)]
folders = sorted(folders)
for folder in folders:
folder_path = os.path.join(os.getcwd(), folder)
files = [f for f in os.listdir(folder_path) if os.path.isfile(os.path.join(folder_path, f)) and re.match(r"\d+\.\d+-[a-z-]+\.md", f)]
files = [f for f in os.listdir(folder_path) if os.path.isfile(os.path.join(folder_path, f)) and re.match(r"\d+\.\d+-[a-zA-Z-]+\.md", f)]
files = sorted(files)
if files:
folder_title = "-".join(folder.split("-")[1:]).replace("-", " ").title()
f.write(f"# **{folder_title}**\n\n")
for file in files:
with open(os.path.join(folder_path, file), "r") as fp:
f.write(fp.read() + "\n")
f.write("\n")

if __name__ == "__main__":
generate_security_plus_file()