|
|
@ -52,19 +52,17 @@ for folder in materials:
|
|
|
|
md = file.read()
|
|
|
|
md = file.read()
|
|
|
|
card = markdown.markdown(md)
|
|
|
|
card = markdown.markdown(md)
|
|
|
|
#print(card) # the print of all the md files
|
|
|
|
#print(card) # the print of all the md files
|
|
|
|
|
|
|
|
card = f'<div class="card text">{ card }</div>'
|
|
|
|
cards[folder][card_folder].append(card)
|
|
|
|
cards[folder][card_folder].append(card)
|
|
|
|
elif my_file.endswith(('.jpg', '.jpeg', '.png')):
|
|
|
|
elif my_file.endswith(('.jpg', '.jpeg', '.png')):
|
|
|
|
if 'prototype_' in my_file:
|
|
|
|
if 'prototype_' in my_file:
|
|
|
|
my_file= my_file.replace('.jpg', '').replace('.jpeg', '').replace('.png', '').replace('prototype_', '').replace('_', ' ')
|
|
|
|
my_file= my_file.replace('.jpg', '').replace('.jpeg', '').replace('.png', '').replace('prototype_', '').replace('_', ' ')
|
|
|
|
image_html = f'<img src="{relative_file_path}" alt="{my_file}" />' + f"<div class='image_titles'>{my_file}</div>"
|
|
|
|
image_html = f'<img src="{relative_file_path}" alt="{my_file}" />' + f"<div class='image_titles'>{my_file}</div>"
|
|
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
image_html = f'<img src="{relative_file_path}" alt="{my_file}" />'
|
|
|
|
image_html = f'<img src="{relative_file_path}" alt="{my_file}" />'
|
|
|
|
mycard = f'<div class="card" style="background-image: url("{relative_file_path}");">{image_html}</div> '
|
|
|
|
mycard = f'<div class="card img" style="background-image: url(\'{relative_file_path}\');">{image_html}</div> '
|
|
|
|
cards[folder][card_folder].append(mycard)
|
|
|
|
cards[folder][card_folder].append(mycard)
|
|
|
|
#print(my_file)
|
|
|
|
# print(mycard)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#print(card_folder)
|
|
|
|
#print(card_folder)
|
|
|
|
#print(file_path)
|
|
|
|
#print(file_path)
|
|
|
@ -97,22 +95,19 @@ for page in range(number_pages):
|
|
|
|
card_8= choice(cards["4_add_ons"]["make-a-notebook-that"])
|
|
|
|
card_8= choice(cards["4_add_ons"]["make-a-notebook-that"])
|
|
|
|
cards["4_add_ons"]["make-a-notebook-that"].remove(card_8)
|
|
|
|
cards["4_add_ons"]["make-a-notebook-that"].remove(card_8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page_html = f'''
|
|
|
|
page_html = f'''
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page">
|
|
|
|
<div class="page">
|
|
|
|
<div class="card left-card">{card_1}</div>
|
|
|
|
{card_1}
|
|
|
|
<div class="card right-card">{card_2}</div>
|
|
|
|
{card_2}
|
|
|
|
<div class="card left-card">{card_3}</div>
|
|
|
|
{card_3}
|
|
|
|
<div class="card right-card">{card_4}</div>
|
|
|
|
{card_4}
|
|
|
|
<div class="card left-card">{card_5}</div>
|
|
|
|
{card_5}
|
|
|
|
<div class="card right-card">{card_6}</div>
|
|
|
|
{card_6}
|
|
|
|
<div class="card left-card">{card_7}</div>
|
|
|
|
{card_7}
|
|
|
|
<div class="card right-card">{card_8}</div>
|
|
|
|
{card_8}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
pages.append(page_html)
|
|
|
|
pages.append(page_html)
|
|
|
|