From 9dcc29d891e5c8162e398c12100c62d3ab565b5a Mon Sep 17 00:00:00 2001 From: friend Date: Sun, 6 Nov 2022 23:43:54 +0100 Subject: [PATCH] rosa settings.. --- pdf-compile.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pdf-compile.py b/pdf-compile.py index 65e9a8f..53b54bc 100755 --- a/pdf-compile.py +++ b/pdf-compile.py @@ -8,10 +8,13 @@ import re import os import sys -NODE = '/home/dickreckard/.nvm/versions/node/v16.13.0/bin/node' -PAGEDJSCLI = '/home/dickreckard/.nvm/versions/node/v16.13.0/bin/pagedjs-cli' -localhost = '/var/www/html/atnofs/' -localurl = 'http://localhost/atnofs/' +# todo move this variable outta here.. + +NODE = '/home/friend/.nvm/versions/node/v16.13.0/bin/node' +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' @@ -88,15 +91,15 @@ for chapter in chapters: # end hack # 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: if('octomode.vvvvvvaria.org' in chapter): chapter=chapter.replace('://','://'+authu+':'+authp+'@') 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 @@ -108,5 +111,5 @@ if ooooo_insert: # compiling all the files in one big pdf! -output = pypdftk.concat(outputs,out_file=outputname) +output = pypdftk.concat(outputs,out_file=localhost+outputname)