removed temporary html
This commit is contained in:
parent
d71af2078a
commit
57ccecf3fa
12
main.py
12
main.py
|
@ -5,8 +5,8 @@ from mdutils import MdUtils
|
|||
|
||||
|
||||
markdown = True
|
||||
pdf = True
|
||||
html = False
|
||||
pdf = False
|
||||
html = True
|
||||
html_stylesheet = "styles/simple.css"
|
||||
title_animation = "fade-down"
|
||||
heading_animation = "fade-right"
|
||||
|
@ -136,14 +136,12 @@ if html:
|
|||
|
||||
|
||||
ifname = str(title.strip()) + ".md"
|
||||
ofname = "temp.html"
|
||||
fname = str(title.strip()) + ".html"
|
||||
ofname = str(title.strip()) + ".html"
|
||||
|
||||
convert = pypandoc.convert_file(ifname,'html5',outputfile=ofname,extra_args=['-s'])
|
||||
assert(convert) == ''
|
||||
|
||||
fp = open(ofname)
|
||||
|
||||
with open(ofname) as fp:
|
||||
soup = BeautifulSoup(fp,'html5lib')
|
||||
|
||||
aos_css = soup.new_tag('link',href='https://unpkg.com/aos@2.3.1/dist/aos.css',rel='stylesheet')
|
||||
|
@ -181,7 +179,7 @@ if html:
|
|||
if li.a == None:
|
||||
li['data-aos'] = list_animation
|
||||
|
||||
with open(fname, "w") as outf:
|
||||
with open(ofname, "w") as outf:
|
||||
outf.write(str(soup))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue