added id to story-page

This commit is contained in:
Bachir Soussi Chiadmi
2017-04-30 11:08:58 +02:00
parent 1732ab3df4
commit c23d1bb8c2
+3 -2
View File
@@ -98,7 +98,8 @@ def generate_html(book, toc):
# os.mkdir(book_build_d_pages)
for p in toc:
# print(toc[p]['file'])
print(toc[p]['file'])
pagename = toc[p]['file'].replace('.md', '')
# files
in_f = os.path.join(_BOOKS_SRC, toc[p]['file'])
@@ -121,7 +122,7 @@ def generate_html(book, toc):
# outputfile=out_f)
# append html story page to template_dom
story_page = BeautifulSoup('<div class="story-page"></div>')
story_page = BeautifulSoup('<div class="story-page" id="'+pagename+'"></div>')
story_page.div.append(BeautifulSoup(output))
story_dom.append(story_page)