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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
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
from
cloudooo.file
import
File
from
cloudooo.util
import
logger
,
parseContentType
from
subprocess
import
Popen
,
PIPE
from
tempfile
import
mktemp
from
tempfile
import
mktemp
,
mkdtemp
from
os.path
import
basename
from
base64
import
b64decode
...
...
@@ -55,6 +55,9 @@ class Handler(object):
)
return
path
def
makeTempDir
(
self
,
*
args
,
**
kw
):
return
mkdtemp
(
*
args
,
dir
=
self
.
file
.
directory_name
,
**
kw
)
def
convertPathToUrl
(
self
,
path
):
if
path
.
startswith
(
"/"
):
return
"file://"
+
path
...
...
@@ -356,6 +359,8 @@ class Handler(object):
"include_in_outline"
,
],
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
([
#"cache_dir", # we decide
"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