Reorged notes, ready for the next step. Glassdoor notes. Some small script changes.
This commit is contained in:
28
Notes_TOC_script.py
Normal file
28
Notes_TOC_script.py
Normal file
@ -0,0 +1,28 @@
|
||||
from pathlib import Path
|
||||
|
||||
path_dir = Path("/Users/normrasmussen/Documents/Work/CustomerNotes/")
|
||||
toc_file = Path("/Users/normrasmussen/Documents/Work/CustomerNotes/index.md")
|
||||
|
||||
|
||||
def company_path(path_dir):
|
||||
listdirs = [x for x in path_dir.iterdir() if x.is_dir()]
|
||||
for dirs in listdirs:
|
||||
company_list = []
|
||||
str_dirs = str(dirs)
|
||||
str_dirs = str_dirs.split("/")[6]
|
||||
company_list.append(str_dirs)
|
||||
listfiles = list(dirs.glob("**/*.*"))
|
||||
for item in listfiles:
|
||||
company_list.append(item)
|
||||
write_to_toc(company_list, toc_file)
|
||||
|
||||
|
||||
def write_to_toc(company_list, toc_file):
|
||||
pass
|
||||
# file = open(toc_file, "a")
|
||||
# file.write(str_dirs)
|
||||
# file.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
company_path(path_dir)
|
||||
Reference in New Issue
Block a user