rosa settings..
This commit is contained in:
parent
000bbcef8c
commit
9dcc29d891
@ -8,10 +8,13 @@ import re
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
NODE = '/home/dickreckard/.nvm/versions/node/v16.13.0/bin/node'
|
# todo move this variable outta here..
|
||||||
PAGEDJSCLI = '/home/dickreckard/.nvm/versions/node/v16.13.0/bin/pagedjs-cli'
|
|
||||||
localhost = '/var/www/html/atnofs/'
|
NODE = '/home/friend/.nvm/versions/node/v16.13.0/bin/node'
|
||||||
localurl = 'http://localhost/atnofs/'
|
PAGEDJSCLI = '/home/friend/.nvm/versions/node/v16.13.0/bin/pagedjs-cli'
|
||||||
|
|
||||||
|
localhost = '/var/www/html/pdfs/'
|
||||||
|
localurl = 'http://localhost/pdfs/'
|
||||||
|
|
||||||
outputname='atnofs-compiled.pdf'
|
outputname='atnofs-compiled.pdf'
|
||||||
|
|
||||||
@ -88,15 +91,15 @@ for chapter in chapters:
|
|||||||
# end hack
|
# end hack
|
||||||
|
|
||||||
# this is the pagedjs client version making the pdf out of the localhost version of the html
|
# this is the pagedjs client version making the pdf out of the localhost version of the html
|
||||||
subprocess.run([NODE, PAGEDJSCLI, localpreview, '-o', pdffile])
|
subprocess.run([NODE, PAGEDJSCLI, localpreview, '-o', localhost+pdffile])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if('octomode.vvvvvvaria.org' in chapter):
|
if('octomode.vvvvvvaria.org' in chapter):
|
||||||
chapter=chapter.replace('://','://'+authu+':'+authp+'@')
|
chapter=chapter.replace('://','://'+authu+':'+authp+'@')
|
||||||
preview = chapter.replace('pad/','pagedjs.html')
|
preview = chapter.replace('pad/','pagedjs.html')
|
||||||
subprocess.run([NODE, PAGEDJSCLI, preview, '-o', pdffile])
|
subprocess.run([NODE, PAGEDJSCLI, preview, '-o', localhost+pdffile])
|
||||||
|
|
||||||
outputs.append(pdffile)
|
outputs.append(localhost+pdffile)
|
||||||
|
|
||||||
counter+=1
|
counter+=1
|
||||||
|
|
||||||
@ -108,5 +111,5 @@ if ooooo_insert:
|
|||||||
|
|
||||||
# compiling all the files in one big pdf!
|
# compiling all the files in one big pdf!
|
||||||
|
|
||||||
output = pypdftk.concat(outputs,out_file=outputname)
|
output = pypdftk.concat(outputs,out_file=localhost+outputname)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user