(filename, path = "", extension = ".md")
| 73 | |
| 74 | |
| 75 | def load_from_text(filename, path = "", extension = ".md") -> str: |
| 76 | full_path = os.path.join(path, filename) |
| 77 | full_path = add_extension_if_not_exist(full_path, extension) |
| 78 | with open(full_path, "r", encoding='utf-8') as md_file: |
| 79 | content = md_file.read() |
| 80 | logging.info(f"Information loaded from {full_path}") |
| 81 | return content |
| 82 | |
| 83 | def add_extension_if_not_exist(input_string, extension): |
| 84 | if not input_string.endswith(extension): |
no test coverage detected