This commit is contained in:
friend 2022-12-14 01:33:16 +01:00
parent 4da5373d16
commit 1542eae5e0

View File

@ -29,7 +29,7 @@ e2hprocessor='http://totalism.org:7777/glia2?sourceMethod=post&sinkFormat=text/g
chapters=[] chapters=[]
outputs=[] outputs=[]
counter=0 counter=0
page=0 page=1
ooooo_graphs="https://pad.constantvzw.org/p/atnofs-insert" ooooo_graphs="https://pad.constantvzw.org/p/atnofs-insert"
indexmd = requests.get('https://pad.vvvvvvaria.org/atnofs-index.md/export/txt').text indexmd = requests.get('https://pad.vvvvvvaria.org/atnofs-index.md/export/txt').text
@ -98,13 +98,13 @@ for chapter in chapters:
else: else:
preview = requests.get(chapter.replace('pad/','preview.html')) preview = requests.get(chapter.replace('pad/','preview.html'))
style = requests.get(chapter.replace('pad/','stylesheet.css')) style = requests.get(chapter.replace('pad/','stylesheet.css'))
style=style.text
if page > 0: if page > 0:
style+='@page:first { counter-increment: page '+str(page)+'; }' style=style+'@page:first { counter-increment: page '+str(page)+'; }'
stylefile=localhost+'.'+name+'/stylesheet.css' stylefile=localhost+'.'+name+'/stylesheet.css'
with open(stylefile, 'w') as file: with open(stylefile, 'w') as file:
file.write(style.text) file.write(style)
previewfile=localhost+'.'+name+'/preview.html' previewfile=localhost+'.'+name+'/preview.html'
localpreview=localurl+'.'+name+'/preview.html' localpreview=localurl+'.'+name+'/preview.html'