mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
parent
c86aa72cfa
commit
69cde43ca1
1658
DIRECTORY.md
1658
DIRECTORY.md
File diff suppressed because it is too large
Load Diff
|
@ -3,8 +3,6 @@
|
|||
import os
|
||||
from typing import Iterator
|
||||
|
||||
URL_BASE = "https://github.com/TheAlgorithms/Python/blob/master"
|
||||
|
||||
|
||||
def good_file_paths(top_dir: str = ".") -> Iterator[str]:
|
||||
for dir_path, dir_names, filenames in os.walk(top_dir):
|
||||
|
@ -36,7 +34,7 @@ def print_directory_md(top_dir: str = ".") -> None:
|
|||
if filepath != old_path:
|
||||
old_path = print_path(old_path, filepath)
|
||||
indent = (filepath.count(os.sep) + 1) if filepath else 0
|
||||
url = "/".join((URL_BASE, filepath, filename)).replace(" ", "%20")
|
||||
url = "/".join((filepath, filename)).replace(" ", "%20")
|
||||
filename = os.path.splitext(filename.replace("_", " ").title())[0]
|
||||
print(f"{md_prefix(indent)} [{filename}]({url})")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user