Skip to content

Commit

Permalink
write documentation class added
Browse files Browse the repository at this point in the history
  • Loading branch information
mursalatul committed Jan 16, 2024
1 parent 11a4988 commit db3c8b2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
21 changes: 10 additions & 11 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Code Park Documentation
This document encompasses all the current subjects within Code Park.
This documentation provides a front view of the content presented in the repository. Here, you can see the folders and the files with a tree-view structure.

## Folders
## Content
- [hello_diu](/hello_diu)
- [palindrom](/palindrom)
- [hello_diu.c](/hello_diu.c)
- [prime](/prime)
- [search](/search)
- [is_prime.cpp](/is_prime.cpp)
- [selection_sort](/selection_sort)

## Files
- [hello_diu.c](/hello_diu/hello_diu.c)
- [is_palindrom_number.c](/palindrom/is_palindrom_number.c)
- [is_prime.cpp](/prime/is_prime.cpp)
- [linear_search.cpp](/search/linear_search.cpp)
- [selection_sort_cpp.cpp](/selection_sort/selection_sort_cpp.cpp)
- [selection_sort_cpp.cpp](/selection_sort_cpp.cpp)
- [search](/search)
- [linear_search.cpp](/linear_search.cpp)
- [Binary_Search.cpp](/Binary_Search.cpp)
- [palindrom](/palindrom)
- [is_palindrom_number.c](/is_palindrom_number.c)
20 changes: 16 additions & 4 deletions READ_REPO.py → READY_REPO.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import os

class CreateDocumentation:
pass
def writedoc(self, folder_file: dict):
with open("DOCUMENTATION.md", "w") as doc:
doc.write("# Code Park Documentation\n\
This documentation provides a front view of the content presented in the repository. Here, you can see the folders and the files with a tree-view structure.\n\n")

doc.write("## Content\n")
for folder, file in folder_file.items():
doc.write(f"- [{folder}](/{folder})\n")
for files in file:
doc.write(f" - [{files}](/{files})\n")

class Files:
# this char will not accepted inside a class
Expand Down Expand Up @@ -111,9 +120,12 @@ def goodfolderformat(self, folder_name: str) -> dict:

def main():
ff = Files()
print(ff.get_all_valid_folder_files_dict())

data = (ff.get_all_valid_folder_files_dict())
if "ERROR" in data:
pass
else:
doc = CreateDocumentation()
doc.writedoc(data)
if __name__ == '__main__':
main()


0 comments on commit db3c8b2

Please sign in to comment.