Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(44)

Issue 4717041: fodt parsing with Relatorio

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by martinleon.sebastien
Modified:
12 years, 8 months ago
Reviewers:
ced
Visibility:
Public.

Patch Set 1 : correct upload #

Total comments: 8

Patch Set 2 : version which contains errors #

Total comments: 5

Patch Set 3 : third version #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1475 lines, -1 line) Patch
A examples/basic.fodt View 1 2 1 chunk +659 lines, -0 lines 0 comments Download
A examples/test/content.xml View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A examples/test/meta.xml View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
A examples/test/settings.xml View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A examples/test/styles.xml View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M relatorio/templates/opendocument.py View 1 2 2 chunks +72 lines, -0 lines 0 comments Download
A relatorio/tests/test.fodt View 1 2 1 chunk +722 lines, -0 lines 0 comments Download
M relatorio/tests/test_odt.py View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
ced
http://codereview.appspot.com/4717041/diff/7/relatorio/templates/opendocument.py File relatorio/templates/opendocument.py (right): http://codereview.appspot.com/4717041/diff/7/relatorio/templates/opendocument.py#newcode48 relatorio/templates/opendocument.py:48: import xml.dom.minidom Don't use minidom, use lxml http://codereview.appspot.com/4717041/diff/7/relatorio/templates/opendocument.py#newcode267 relatorio/templates/opendocument.py:267: ...
12 years, 9 months ago (2011-07-14 10:35:40 UTC) #1
ced
12 years, 8 months ago (2011-08-14 10:30:31 UTC) #2
https://codereview.appspot.com/4717041/diff/27001/relatorio/templates/opendoc...
File relatorio/templates/opendocument.py (right):

https://codereview.appspot.com/4717041/diff/27001/relatorio/templates/opendoc...
relatorio/templates/opendocument.py:89: from lxml import etree
Why not use lxml.etree imported above?

https://codereview.appspot.com/4717041/diff/27001/relatorio/templates/opendoc...
relatorio/templates/opendocument.py:90: class MyZip(zipfile.ZipFile):
I don't like the behavior of this class because it doesn't call ZipFile.__init__
in each cases. Then it can have strang behavior, because dev will expect it is a
ZipFile.
I think the best is to construct the zipfile if it is a flatten file.

https://codereview.appspot.com/4717041/diff/27001/relatorio/templates/opendoc...
relatorio/templates/opendocument.py:100: if extension.upper() == self.FODT:
Could not the test be made on a test if it is a zipped file or not. Because
extensions are not always reliable and relatorio doesn't parse only odt file but
kind of OpenDocument like odc, ods etc.

https://codereview.appspot.com/4717041/diff/27001/relatorio/templates/opendoc...
relatorio/templates/opendocument.py:108: parser =
etree.XMLParser(remove_blank_text = True)
Why removing blank_text?

https://codereview.appspot.com/4717041/diff/27001/relatorio/templates/opendoc...
relatorio/templates/opendocument.py:111: meta = (root.getroot())[0]
Must use tag name
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b