Bug#501457: odt2txt fails to recognize legit .odt file

2008-11-12 Thread Aurelien Bompard
As I replied privately to the reporter, I've looked at this issue: I've 
fixed a few things in the ODT generation code, and now the wiki:syntax 
export passes the validator cited here. These changes are only in the git 
repo for now.
(use git clone http://aurelien.bompard.org/projects/dokuwiki/odt.git;)

However, odt2txt still fails to recognize it as a valid ODT file.
The strange thing is : if I unzip the odt file, and re-zip it without 
changing anything, odt2txt handles it just fine !

Therefore, I'm not sure the bug is in my ODT generation code. It's probably 
the zipping part, which is done in PHP by Dokuwiki, and is perfectly 
usable with unzip or OpenOffice. Maybe the kunzip library bundled with 
odt2txt lacks something to handle this uncommon archive. I'm no C expert, 
so that's where my investigation stops.

Thanks for the report.

By the way, the odfpy library 
(http://opendocumentfellowship.com/development/projects/odfpy) has some 
nice command line tools to convert ODT to other formats (like XHTML).
I don't think it's packaged in Debian yet, but you may find it interesting.

Aurélien
-- 
http://aurelien.bompard.org    Jabber : [EMAIL PROTECTED]
Computer Science is no more about computers than astronomy is about
telescopes. -- E. W. Dijkstra



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#501457: odt2txt fails to recognize legit .odt file

2008-11-12 Thread Nelson A. de Oliveira
Hi Aurélien!

On Wed, Nov 12, 2008 at 6:05 AM, Aurelien Bompard [EMAIL PROTECTED] wrote:
 As I replied privately to the reporter, I've looked at this issue: I've
 fixed a few things in the ODT generation code, and now the wiki:syntax
 export passes the validator cited here. These changes are only in the git
 repo for now.
 (use git clone http://aurelien.bompard.org/projects/dokuwiki/odt.git;)

Thank you for your work!

 However, odt2txt still fails to recognize it as a valid ODT file.
 The strange thing is : if I unzip the odt file, and re-zip it without
 changing anything, odt2txt handles it just fine !

Is it possible to you send me some .odt files generated by your new
code and that odt2txt fails to recognize, please?

Best regards,
Nelson



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#501457: odt2txt fails to recognize legit .odt file

2008-10-07 Thread Arie Skliarouk
Package: odt2txt
Version: 0.4-1

I am using an wiki system dokuwiki (apt-get install dokuwiki). The
system has an plugin that allows one to export content of a page as a
.odt file:
http://www.dokuwiki.org/plugin:odt

The resulting file can be read using openoffice's oowriter, but
attempt to open it using odt2txt causes following error:
Can't read from a.odt: Is it an OpenDocument Text?

Could well be that the problem is in the way the dokuwiki's plugin
creates the file, but unfortunately I am not in the position to tell
that.

BTW, if I save the save back from openoffice, the file grows from 5kb
to 9kb and then it *can* be opened using odt2txt...

-- 
Arie


a.odt
Description: application/vnd.oasis.opendocument.text


Bug#501457: odt2txt fails to recognize legit .odt file

2008-10-07 Thread Nelson A. de Oliveira
Hi Arie!

On Tue, Oct 7, 2008 at 12:12 PM, Arie Skliarouk [EMAIL PROTECTED] wrote:
 Could well be that the problem is in the way the dokuwiki's plugin
 creates the file, but unfortunately I am not in the position to tell
 that.

I am almost sure that the problem is with the plugin that generates
the ODT file.
Using this ODF validator [1], from [2], it gives (there is an online
validator at [3], that seems to be more updated, but it's giving
internal server error now):

$ ./validator --file=a.odt
ERROR: missing required file settings.xml
0 warning(s), 1 error(s)
Document does not validate

file also doesn't recognize it:

$ file a.odt
a.odt: data

With a valid ODT file I have:

$ ./validator --file=a2.odt
0 warning(s), 0 error(s)
Document does validate

$ file a2.odt
a2.odt: OpenDocument Text

Is the plugin included in the package dokuwiki or it's installed separately?

What I can do is forward this problem to odt2txt upstream and ask, if
possible, for a better support of broken ODT files.

[1] http://opendocumentfellowship.com/~alex/odf-validator.tar.gz
[2] http://opendocumentfellowship.com/development/projects/odftools
[3] http://opendocumentfellowship.com/validator

Best regards,
Nelson



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]