Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tristan Cavelier
erp5
Commits
b5163597
Commit
b5163597
authored
Mar 24, 2016
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces/convertable: add api to put linked document into data
parent
bb77c51a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
product/ERP5/interfaces/convertable.py
product/ERP5/interfaces/convertable.py
+37
-0
No files found.
product/ERP5/interfaces/convertable.py
View file @
b5163597
...
@@ -115,3 +115,40 @@ class IConvertable(IFormatConvertable):
...
@@ -115,3 +115,40 @@ class IConvertable(IFormatConvertable):
kw -- optional parameters which can be passed to the
kw -- optional parameters which can be passed to the
conversion engine
conversion engine
"""
"""
def
buildEmbbededLinkedDocumentDataXXX
(
self
,
alternative_data
=
None
,
insert_image
=
True
,
insert_stylesheet
=
True
,
insert_other
=
False
):
"""
Fetches linked documents (stylesheets, images, ...) and replace their link
to actual fetched content. Returns a new build of the current document data
with the inserted components.
It is very useful for document conversion like HTML to PDF or SVG to any
image format.
Use it carefully! This can lead to share images that you don't want people
to see!
alternative_data is the data to use instead of self.getData().
XXX use portal_transforms ?
"""
def
extractAndBuildComponentAsLinkDataListXXX
(
self
,
alternative_data
=
None
,
extract_image
=
True
,
extract_stylesheets
=
True
,
extract_other
=
False
):
"""
Creates a list of document edit_kw containing the exploded data to several
documents, so that it is easy to convert into a mail format (mhtml) or to
export extracted documents to modules.
The result list contains at least one entry : the altered data
Result sample:
[
{"data": "..."},
{"title": "Image Title", "content_type": "image/png", "data": "
\
x01
\
x02
..."},
{"content_type": "text/css", "data": "body { background-color: fuchsia; }"},
]
alternative_data is the data to use instead of self.getData().
"""
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