Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
cloudooo
Commits
dc75a261
Commit
dc75a261
authored
Jan 13, 2017
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wkhtmltopdf: disable cache by default
parent
42160d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
cloudooo/handler/wkhtmltopdf/handler.py
cloudooo/handler/wkhtmltopdf/handler.py
+6
-1
No files found.
cloudooo/handler/wkhtmltopdf/handler.py
View file @
dc75a261
...
@@ -30,7 +30,7 @@ from cloudooo.interfaces.handler import IHandler
...
@@ -30,7 +30,7 @@ from cloudooo.interfaces.handler import IHandler
from
cloudooo.file
import
File
from
cloudooo.file
import
File
from
cloudooo.util
import
logger
,
parseContentType
from
cloudooo.util
import
logger
,
parseContentType
from
subprocess
import
Popen
,
PIPE
from
subprocess
import
Popen
,
PIPE
from
tempfile
import
mktemp
from
tempfile
import
mktemp
,
mkdtemp
from
os.path
import
basename
from
os.path
import
basename
from
base64
import
b64decode
from
base64
import
b64decode
...
@@ -55,6 +55,9 @@ class Handler(object):
...
@@ -55,6 +55,9 @@ class Handler(object):
)
)
return
path
return
path
def
makeTempDir
(
self
,
*
args
,
**
kw
):
return
mkdtemp
(
*
args
,
dir
=
self
.
file
.
directory_name
,
**
kw
)
def
convertPathToUrl
(
self
,
path
):
def
convertPathToUrl
(
self
,
path
):
if
path
.
startswith
(
"/"
):
if
path
.
startswith
(
"/"
):
return
"file://"
+
path
return
"file://"
+
path
...
@@ -356,6 +359,8 @@ class Handler(object):
...
@@ -356,6 +359,8 @@ class Handler(object):
"include_in_outline"
,
"include_in_outline"
,
],
conversion_kw
)
],
conversion_kw
)
command
+=
self
.
makeSwitchOptionList
([
"default_header"
],
conversion_kw
)
command
+=
self
.
makeSwitchOptionList
([
"default_header"
],
conversion_kw
)
# put cache in the temp dir - to disable cache
command
+=
[
"--cache-dir"
,
self
.
makeTempDir
(
prefix
=
"cache"
)]
command
+=
self
.
makeOneStringArgumentOptionList
([
command
+=
self
.
makeOneStringArgumentOptionList
([
#"cache_dir", # we decide
#"cache_dir", # we decide
"encoding"
,
"encoding"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment