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:
parent
e56699d480
commit
a5adb44c0d
4 changed files with 22 additions and 471 deletions
32
single.py
32
single.py
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue