generate-bookl

main
ada 1 year ago
parent 3f42f444dc
commit 42d9cc04ab

@ -27,24 +27,16 @@ for folder in folders:
file = file.replace(" ", "\ ")
print(file)
# pandoc2 = "pandoc -f markdown -t html " + file
# html_data = subprocess.run(pandoc2, capture_output=True, text=True).stdout
# print("html_data: ", html_data)
# #editing the html before creatings the main file
# # filename = os.path.basename(file)
# # print("filename", filename)
# # html_data = html_data.replace('<img src="','<img src="' + folder + '/')
# print("This is the html data: ", html_data)
# # 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.append(html_data)
md_data = open(file).read()
all_md += "\n"+md_data
elif file.endswith((".jpg",".png")):
print("image found yay",file)
output_file=file.replace(folder,"./00-booklet")
copy_command=f"cp {file} {output_file}"
os.system(copy_command)
print("copied to booklet!",copy_command)
#create booklet.md
output = open("00-booklet/booklet.md", "w")

Loading…
Cancel
Save