From fdd07e6409c3412cd536cbc7eb657eb982392838 Mon Sep 17 00:00:00 2001 From: Gijs Date: Thu, 15 Sep 2022 12:06:56 +0200 Subject: [PATCH] Using more general binary name for paged.js to ease installation. --- .gitignore | 1 - settings.example.py | 11 ----------- settings.py | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 settings.example.py create mode 100644 settings.py diff --git a/.gitignore b/.gitignore index 3629ca1..409f080 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ __pycache__ *.pyc node_modules -settings.py diff --git a/settings.example.py b/settings.example.py deleted file mode 100644 index b32b82c..0000000 --- a/settings.example.py +++ /dev/null @@ -1,11 +0,0 @@ -PAGEDJS_BINARY_PATH = '' -# Path to the pagedjs-cli executable -# Find it with `whereis pagedjs-cli` -DEBUG = False -# When set to true, the application doesn't generate a PDF, -# but uses the pagedjs-polyfill to show a preview of the document -SITEURL = 'http://localhost:5000' -# The url pagedjs-cli tries to connect to, this url is the -# default of the Flask development server -BASEURL = '' -HTML_TMP_DIR = '/tmp/publishing_house/' \ No newline at end of file diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..4197623 --- /dev/null +++ b/settings.py @@ -0,0 +1,14 @@ +PAGEDJS_BINARY_PATH = 'pagedjs-cli' # os.path.join(os.path.dirname(__file__), 'node_modules/pagedjs-cli/bin/paged') +# Path to the pagedjs-cli executable +# Find it on linux with `whereis pagedjs-cli` +# Let's try the simple way first :-) +DEBUG = False +# When set to true, the application doesn't generate a PDF, +# but uses the pagedjs-polyfill to show a preview of the document +SITEURL = 'http://localhost:5000' +# The url pagedjs-cli tries to connect to, to retrieve the HTML of +# the book, default if the default url of the Flask development server +BASEURL = '' +# Baseurl on the server. For now only in devployment +HTML_TMP_DIR = '/tmp/publishing_house/' +# Location where the temporary html files are stored