inv files
This commit is contained in:
parent
72a39434e8
commit
ea5fe7f696
@ -34,16 +34,16 @@ ooooo_graphs="https://pad.constantvzw.org/p/atnofs-insert"
|
||||
|
||||
indexmd = requests.get('https://pad.vvvvvvaria.org/atnofs-index.md/export/txt').text
|
||||
# download the index of all contributions
|
||||
with open(localhost+'index.md','w') as file:
|
||||
with open(localhost+'.index.md','w') as file:
|
||||
file.write(indexmd)
|
||||
|
||||
basecssget = requests.get(BASECSS).text
|
||||
with open(localhost+'base.css','w') as file:
|
||||
with open(localhost+'.base.css','w') as file:
|
||||
file.write(basecssget)
|
||||
# download the base css style
|
||||
|
||||
|
||||
with open(localhost+'index.md') as file:
|
||||
with open(localhost+'.index.md') as file:
|
||||
for line in file:
|
||||
|
||||
# searches for the chapter links
|
||||
@ -116,7 +116,7 @@ for chapter in chapters:
|
||||
with open(previewfile, "r") as f:
|
||||
contents = f.readlines()
|
||||
|
||||
contents.insert(5, '<link href="stylesheet.css" rel="stylesheet" type="text/css"><link href="../base.css" rel="stylesheet" type="text/css">')
|
||||
contents.insert(5, '<link href="stylesheet.css" rel="stylesheet" type="text/css"><link href="../.base.css" rel="stylesheet" type="text/css">')
|
||||
|
||||
with open(previewfile, "w") as f:
|
||||
contents = "".join(contents)
|
||||
@ -137,8 +137,8 @@ for chapter in chapters:
|
||||
counter+=1
|
||||
pagenr=pypdftk.get_num_pages(localhost+pdffile)
|
||||
if (pagenr % 2) != 0:
|
||||
pypdftk.concat([localhost+pdffile,localhost+'blank.pdf'],localhost+'temp.pdf')
|
||||
os.replace(localhost+'temp.pdf',localhost+pdffile)
|
||||
pypdftk.concat([localhost+pdffile,localhost+'.blank.pdf'],localhost+'.temp.pdf')
|
||||
os.replace(localhost+'.temp.pdf',localhost+pdffile)
|
||||
pagenr+=1
|
||||
page=page+pagenr
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user