diff --git a/booklet/booklet.html b/booklet/booklet.html index aafbbae..7346dcb 100644 --- a/booklet/booklet.html +++ b/booklet/booklet.html @@ -8,7 +8,6 @@ -

SI20

The history of Tarot Cards According to History

Some Gossip on gossip

yay

diff --git a/booklet/booklet.py b/booklet/booklet.py index 2f84b49..5d96e0d 100644 --- a/booklet/booklet.py +++ b/booklet/booklet.py @@ -3,33 +3,49 @@ import os import subprocess # https://devdocs.io/python~3.9/library/glob#glob.glob -files = glob("content/**", recursive=True) -print(files) +# files = glob("content/**", recursive=True) +# print(files) print("---------") all_html = "" -for file in files: - #print(file) - if file.endswith(".md"): - print("===========") - file = file.replace(" ", "\ ") - print(file) +folders = glob("content/*") +print(folders) - html_file = file.replace(".md", ".html") - pandoc_cmd = "pandoc -s -c style.css -f markdown -t html " + file + " -o " + html_file - os.system(pandoc_cmd) - print("standalone html files saved!") +for folder in folders: + files = glob(folder + "/*") + print(files) + print("************") - pandoc2 = "pandoc -f markdown -t html " + file - html_data = subprocess.run(pandoc2, capture_output=True, text=True).stdout - print("This is the html data: ", html_data) + for file in files: + #print(file) + if file.endswith(".md"): + print("===========") + file = file.replace(" ", "\ ") + print(file) - # and then collect all that content into a variable called "all_html" - # add this content to all_html - all_html = all_html + html_data + html_file = file.replace(".md", ".html") + pandoc_cmd = "pandoc -s -c style.css -f markdown -t html " + file + " -o " + html_file + os.system(pandoc_cmd) + print("standalone html files saved!") + pandoc2 = "pandoc -f markdown -t html " + file + html_data = subprocess.run(pandoc2, capture_output=True, text=True).stdout + + #editing the html before creatings the main file + # filename = os.path.basename(file) + # print("filename", filename) + html_data = html_data.replace('