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
|
indexmd = requests.get('https://pad.vvvvvvaria.org/atnofs-index.md/export/txt').text
|
||||||
# download the index of all contributions
|
# 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)
|
file.write(indexmd)
|
||||||
|
|
||||||
basecssget = requests.get(BASECSS).text
|
basecssget = requests.get(BASECSS).text
|
||||||
with open(localhost+'base.css','w') as file:
|
with open(localhost+'.base.css','w') as file:
|
||||||
file.write(basecssget)
|
file.write(basecssget)
|
||||||
# download the base css style
|
# download the base css style
|
||||||
|
|
||||||
|
|
||||||
with open(localhost+'index.md') as file:
|
with open(localhost+'.index.md') as file:
|
||||||
for line in file:
|
for line in file:
|
||||||
|
|
||||||
# searches for the chapter links
|
# searches for the chapter links
|
||||||
@ -116,7 +116,7 @@ for chapter in chapters:
|
|||||||
with open(previewfile, "r") as f:
|
with open(previewfile, "r") as f:
|
||||||
contents = f.readlines()
|
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:
|
with open(previewfile, "w") as f:
|
||||||
contents = "".join(contents)
|
contents = "".join(contents)
|
||||||
@ -137,8 +137,8 @@ for chapter in chapters:
|
|||||||
counter+=1
|
counter+=1
|
||||||
pagenr=pypdftk.get_num_pages(localhost+pdffile)
|
pagenr=pypdftk.get_num_pages(localhost+pdffile)
|
||||||
if (pagenr % 2) != 0:
|
if (pagenr % 2) != 0:
|
||||||
pypdftk.concat([localhost+pdffile,localhost+'blank.pdf'],localhost+'temp.pdf')
|
pypdftk.concat([localhost+pdffile,localhost+'.blank.pdf'],localhost+'.temp.pdf')
|
||||||
os.replace(localhost+'temp.pdf',localhost+pdffile)
|
os.replace(localhost+'.temp.pdf',localhost+pdffile)
|
||||||
pagenr+=1
|
pagenr+=1
|
||||||
page=page+pagenr
|
page=page+pagenr
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user