Generate single pages for locked fics, link to single pages from RSS feed, use local CSS file in local build

This commit is contained in:
trémeur 2023-09-09 21:11:12 +01:00
parent e56699d480
commit a5adb44c0d
4 changed files with 22 additions and 471 deletions

View file

@ -27,22 +27,22 @@ def singlepage(ficno,directory,local=False):
singlestatus = True
except:
singlestatus = True
if singlestatus:
singlepath = "build/single/" + ficnostring
if not os.path.isdir(singlepath):
os.mkdir(singlepath)
if os.path.exists(singlepath + "/index.html"):
os.remove(singlepath + "/index.html")
# write to output file
output = singlepath + "/index.html"
headerfooter.headerwrite(output,"Fic no. " + ficnostring,"Fic no. <span id=\"ficno\">" + ficnostring + "</span>","",False,local)
try:
if fileread.original:
makeheader.ficgen(fileread.original,False,output,local)
else:
makeheader.ficgen(ficno,False,output,local)
except:
singlepath = "build/single/" + ficnostring
if not os.path.isdir(singlepath):
os.mkdir(singlepath)
if os.path.exists(singlepath + "/index.html"):
os.remove(singlepath + "/index.html")
# write to output file
output = singlepath + "/index.html"
headerfooter.headerwrite(output,"Fic no. " + ficnostring,"Fic no. <span id=\"ficno\">" + ficnostring + "</span>","",False,local)
try:
if fileread.original:
makeheader.ficgen(fileread.original,False,output,local)
else:
makeheader.ficgen(ficno,False,output,local)
except:
makeheader.ficgen(ficno,False,output,local)
if singlestatus:
filewrite = open(output, "a")
filewrite.write("<iframe src=\"")
if local:
@ -61,7 +61,7 @@ def singlepage(ficno,directory,local=False):
filewrite = open(output, "a")
filewrite.write("</div>\n")
filewrite.close()
headerfooter.footerwrite(output,False,local)
headerfooter.footerwrite(output,False,local)
"""
Generate all single pages