![]() |
#586 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Thanks, I just uploaded it to the distribution directory also.
|
![]() |
![]() |
![]() |
#587 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
|
|
![]() |
![]() |
![]() |
#588 | |
reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,977
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#589 | |
Junior Member
![]() ![]() ![]() ![]() Posts: 6
Karma: 361
Join Date: May 2008
Device: kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#590 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2008
Device: Kindle
|
Yes, I removed all javascript, and, as Tompe said in an earlier post, it solved the problem. I guess Kindles choke on javascript.
|
![]() |
![]() |
![]() |
#591 |
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
|
Hi,
I do have problems with lit2mobi under ubuntu linux. My .lit is exploded into the ctmp subdir apparently ok, but subsequent generation seems unable to parse the .opf file Same result if I try to use directly opf2mobi on the generated .opf If I debug the opf2mobi it chokes in: ... </guide> </package> no element found at /usr/local/share/perl/5.8.8/XML/Parser/LiteCopy.pm line 167 XML::Parser::LiteCopy::_final() called at /usr/local/share/perl/5.8.8/XML/Parser/LiteCopy.pm line 154 XML::Parser::LiteCopy: ![]() XML::Parser::Lite::Tree: ![]() MobiPerl::Opf::initialize_from_file('MobiPerl::Opf =HASH(0x8a3c208)', 'ctmp/Pippo.opf') called at /home/mauro/workspace/MobiPerl/MobiPerl/Opf.pm line 29 MobiPerl::Opf::new('MobiPerl::Opf', 'ctmp/Pippo.opf') called at /home/mauro/workspace/MobiPerl/MobiPerl/Util.pm line 49 MobiPerl::Util::get_tree_from_opf('ctmp/Pippo.opf', 'MobiPerl::Config=HASH(0x8a61968)', 'MobiPerl::LinksInfo=HASH(0x8343068)') called at /home/mauro/workspace/MobiPerl/opf2mobi.pl line 96 Peculiar thing is if I just run it (no debugging) the error is different: ... </guide> </package> OPF: TITLE: OPF: CREATOR: OPFTITLE: OPFAUTHOR: Coverimage: All spine elements have been added Have Read in HTML tree from opf FIX PRE TAGS Saving mobi file (version 4): Pippo.mobi COVEROFFSET: -1 THUMBOFFSET: -1 MobiFile.pm: before get_data() EXTH setting data: author - 100 - - 0x EXTH add: author - 100 - MOBIHDR: imgrecpointer: 2 EXTH setting data: author - 100 - - 0x EXTH add: author - 100 - MobiFile.pm: after get_data() MobiFile.pm: before Write() Can't write a database with no name The effect is the same, it continues, but has an empty opf structure, so nothing is written (if I give a title on the command line it completes, but with an empty .mobi) What am I doing wrong? TiA ZioNemo |
![]() |
![]() |
![]() |
#592 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
You can always run html2mobi on the html file.
If you give me the lit file I will debug it and try to fix it. It seems like the opf file is not correct or that the parser lit2mobi uses are to strict. |
![]() |
![]() |
![]() |
#593 | |
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
|
Quote:
thanks for the fast answer. I *can* send You the .lit file (if You tell me just where and how), but I strongly doubt the problem lies there since I tried several ones (including a few I fetched from the Internet for this test) and *all* behave in the same way. This is one example of the generated .opf file: ============================================= <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE package PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0.1 Package//EN" "http://openebook.org/dtds/oeb-1.0.1/oebpkg101.dtd"> <package unique-identifier="OverDriveGUID"> <metadata> <dc-metadata xmlns:dc="http://purl.org/dc/elements/1.0/" xmlns ![]() <dc:Title>La Maschera Di Cthulhu</dc:Title> <dc:Creator role="aut">Gianni Pilo</dc:Creator> <dc:Identifier id="OverDriveGUID" scheme="GUID">{1FF51F09-CD18-43CA-AF7A-83734D9EE29A}</dc:Identifier> </dc-metadata> <x-metadata> <meta name="rwver-ReaderWorks-SDK-Control" content="2, 0, 2, 0215 (02/15/2002)" /> <meta name="rwver-HTML-Input-Filter" content="2, 0, 3, 1212 (12/12/2003)" /> <meta name="rwver-Image-Input-Filter" content="2, 0, 2, 0215 (02/15/2002)" /> <meta name="rwver-Text-Input-Filter" content="2, 0, 2, 0215 (02/15/2002)" /> <meta name="rwver-LIT-file-generator" content="1.5.1.0280 (12/19/2003)" /> <meta name="rw-License-Key" content="RWPTL" /> </x-metadata> </metadata> <manifest> <item id="Gianni_Pilo_-_La_Maschera_Di_Cthulhu" href="Gianni Pilo - La Maschera Di Cthulhu.htm" media-type="text/html" /> <item id="RW_~Cover01" href="~Cover01.jpg" media-type="image/jpeg" /> <item id="RW_~Cover02" href="~Cover02.jpg" media-type="image/jpeg" /> <item id="RW_~Cover03" href="~Cover03.jpg" media-type="image/jpeg" /> <item id="RW_~Cover04" href="~Cover04.jpg" media-type="image/jpeg" /> <item id="RW_~Cover05" href="~Cover05.jpg" media-type="image/jpeg" /> </manifest> <spine> <itemref idref="Gianni_Pilo_-_La_Maschera_Di_Cthulhu" /> </spine> <guide> <reference type="other.ms-thumbimage-standard" href="~Cover01.jpg" /> <reference type="other.ms-coverimage-standard" href="~Cover02.jpg" /> <reference type="other.ms-titleimage-standard" href="~Cover03.jpg" /> <reference type="other.ms-thumbimage" href="~Cover04.jpg" /> <reference type="other.ms-coverimage" href="~Cover05.jpg" /> </guide> </package> ============================================= This looks like a valid XML file, but I don't really know what a .opf file should look like, so... ![]() I should mention I self-compiled clit (+---[ ConvertLIT (Version 1.8) ]---------------[ Copyright (c) 2002,2003 ]---) and I, very likely, goofed somewhere there. The generated .htm files look ok though. Regards ZioNemo |
|
![]() |
![]() |
![]() |
#594 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
I tested the opf file above but cannot reproduce the error. But in:
Quote:
|
|
![]() |
![]() |
![]() |
#595 | |
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
|
Quote:
my system does *not* have the "en_US" locale; nearest thing are "en_us.utf8" and plain old "C". I tried both but nothing changed. The "strange" "\x{a}" characters I guess they are just plain linefeed encoded in an XML-friendly way. If I just run lit2mobi I get the following: ========================================= mauro@heimdall:/tmp$ LC_ALL=C PATH=~/bin/mobiperl-0.0.39:$PATH lit2mobi Gianni\ Pilo\ -\ La\ Maschera\ Di\ Cthulhu.lit Unpack file Gianni Pilo - La Maschera Di Cthulhu.lit in dir ctmp +---[ ConvertLIT (Version 1.8) ]---------------[ Copyright (c) 2002,2003 ]--- ConvertLIT comes with ABSOLUTELY NO WARRANTY; for details see the COPYING file or visit "http://www.gnu.org/license/gpl.html". This is free software, and you are welcome to redistribute it under certain conditions. See the GPL license for details. LIT INFORMATION......... DRM = 1 Timestamp = 24d8c9eb Creator = 00140000 Language = 00000410 Writing out "Gianni_Pilo_-_La_Maschera_Di_Cthulhu" as "Gianni Pilo - La Maschera Di Cthulhu.htm" ... Successfully written to "ctmp/Gianni Pilo - La Maschera Di Cthulhu.htm". Writing out "RW_~Cover01" as "~Cover01.jpg" ... Successfully written to "ctmp/~Cover01.jpg". Writing out "RW_~Cover02" as "~Cover02.jpg" ... Successfully written to "ctmp/~Cover02.jpg". Writing out "RW_~Cover03" as "~Cover03.jpg" ... Successfully written to "ctmp/~Cover03.jpg". Writing out "RW_~Cover04" as "~Cover04.jpg" ... Successfully written to "ctmp/~Cover04.jpg". Writing out "RW_~Cover05" as "~Cover05.jpg" ... Successfully written to "ctmp/~Cover05.jpg". Exploded "Gianni Pilo - La Maschera Di Cthulhu.lit" into "ctmp/". Read in HTML tree from opf Opf: Initialize from file: Gianni Pilo - La Maschera Di Cthulhu.opf CONTENT: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE package PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0.1 Package//EN" "http://openebook.org/dtds/oeb-1.0.1/oebpkg101.dtd"> <package unique-identifier="OverDriveGUID"> <metadata> <dc-metadata xmlns:dc="http://purl.org/dc/elements/1.0/" xmlns ![]() <dc:Title>La Maschera Di Cthulhu</dc:Title> <dc:Creator role="aut">Gianni Pilo</dc:Creator> <dc:Identifier id="OverDriveGUID" scheme="GUID">{1FF51F09-CD18-43CA-AF7A-83734D9EE29A}</dc:Identifier> </dc-metadata> <x-metadata> <meta name="rwver-ReaderWorks-SDK-Control" content="2, 0, 2, 0215 (02/15/2002)" /> <meta name="rwver-HTML-Input-Filter" content="2, 0, 3, 1212 (12/12/2003)" /> <meta name="rwver-Image-Input-Filter" content="2, 0, 2, 0215 (02/15/2002)" /> <meta name="rwver-Text-Input-Filter" content="2, 0, 2, 0215 (02/15/2002)" /> <meta name="rwver-LIT-file-generator" content="1.5.1.0280 (12/19/2003)" /> <meta name="rw-License-Key" content="RWPTL" /> </x-metadata> </metadata> <manifest> <item id="Gianni_Pilo_-_La_Maschera_Di_Cthulhu" href="Gianni Pilo - La Maschera Di Cthulhu.htm" media-type="text/html" /> <item id="RW_~Cover01" href="~Cover01.jpg" media-type="image/jpeg" /> <item id="RW_~Cover02" href="~Cover02.jpg" media-type="image/jpeg" /> <item id="RW_~Cover03" href="~Cover03.jpg" media-type="image/jpeg" /> <item id="RW_~Cover04" href="~Cover04.jpg" media-type="image/jpeg" /> <item id="RW_~Cover05" href="~Cover05.jpg" media-type="image/jpeg" /> </manifest> <spine> <itemref idref="Gianni_Pilo_-_La_Maschera_Di_Cthulhu" /> </spine> <guide> <reference type="other.ms-thumbimage-standard" href="~Cover01.jpg" /> <reference type="other.ms-coverimage-standard" href="~Cover02.jpg" /> <reference type="other.ms-titleimage-standard" href="~Cover03.jpg" /> <reference type="other.ms-thumbimage" href="~Cover04.jpg" /> <reference type="other.ms-coverimage" href="~Cover05.jpg" /> </guide> </package> OPF: TITLE: OPF: CREATOR: OPFTITLE: OPFAUTHOR: GUESSING COVERIMAGE: ~Cover02.jpg Coverimage: ~Cover02.jpg All spine elements have been added Have Read in HTML tree from opf FIX PRE TAGS Saving mobi file (version 4): Gianni Pilo - La Maschera Di Cthulhu.mobi COVEROFFSET: 0 THUMBOFFSET: 1 MobiFile.pm: before get_data() EXTH setting data: author - 100 - - 0x EXTH add: author - 100 - EXTH setting data: coveroffset - 201 - 0 - 0x30 EXTH add: coveroffset - 201 - 0 - 0x30 EXTH setting data: thumboffset - 202 - 1 - 0x31 EXTH add: thumboffset - 202 - 1 - 0x31 MOBIHDR: imgrecpointer: 2 EXTH setting data: author - 100 - - 0x EXTH add: author - 100 - EXTH setting data: coveroffset - 201 - 0 - 0x30 EXTH add: coveroffset - 201 - 0 - 0x30 EXTH setting data: thumboffset - 202 - 1 - 0x31 EXTH add: thumboffset - 202 - 1 - 0x31 MobiFile.pm: after get_data() Reading data from file: ~Cover02.jpg - 510 x 680 - GIF SCALE GD: 510 680 -> 480 640 Reading data from file: ~Cover02.jpg - 510 x 680 - GIF SCALE GD: 510 680 -> 480 640 MobiFile.pm: before Write() Can't write a database with no name mauro@heimdall:/tmp$ ========================================= I suspect I have some problem with XML::Parser::Lite::Tree. I will do some experimenting. Regards ZioNemo |
|
![]() |
![]() |
![]() |
#596 | |
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
|
![]() Quote:
Got it. It seems my version of XML::Parser::Lite::Tree (0.08) doe not use "tag" but uses "element" as "type" (see: XML::Parser::Lite::Tree.pm) so I had to modify in Opf.pm wherever You had "if ($type eq "tag"..." to "if ($type eq "tag" or $type eq "element"..." Essentially all the opf_get_xxx() and parse_yyy() functions in Opf.pl were failing miserably. I can send You a patch, if You want, but the changes are really trivial. Another glitch I found: opf2mobi should look for the various files referenced relative to the location of the .opf file. This is not done so I'm forced to cd to the directory containing the .opf file in order to make it work. Something like "opf2moby ctmp/Pippo.lit" dies because it is unable to find the files it needs. I did not look to see how hard would be to fix this. Please let me know what version of XML::Parser::Lite::Tree You are using. Best Regards ZioNemo |
|
![]() |
![]() |
![]() |
#597 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
Code:
invid:~> dpkg -l | grep lite-tree ii libxml-parser-lite-tree-perl 0.03-2 Lightweight XML tree builder |
|
![]() |
![]() |
![]() |
#598 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
I checked in a fix so both tag and element is OK. I probably should change to some other library...
|
![]() |
![]() |
![]() |
#599 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
|
|
![]() |
![]() |
![]() |
#600 | |
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
|
Quote:
If You want I can test Your code this way. Just tell me exactly what You want me to test... and where to find the latest version; should I get the SVN project or do I have to use some release (I didn't see it)? While I have You on line: Some time ago I wrote some non-trivial perl scripts to convert from TeX source to .mobi; are You interested in them? Regards ZioNemo |
|
![]() |
![]() |
![]() |
Tags |
mobi2mobi, mobils |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mobi2Mobi Mobi2Mobi v0.13 - GUI for Mobiperl tools | Jad | Kindle Formats | 476 | 03-15-2015 05:51 PM |
Tools for Editing Kindle .mobi Files? | GJN | Kindle Formats | 33 | 12-26-2013 02:05 PM |
Handy Perl Script to convert HTML0 files to smartquotes | maggotb0y | Sony Reader | 0 | 04-12-2007 11:49 AM |
PRS-500 Perl tools to generate Reader content | TadW | Sony Reader Dev Corner | 0 | 01-08-2007 05:55 AM |
gmail copy (gmcp) - Perl script to copy files to/from Gmail | Colin Dunstan | Lounge | 0 | 09-04-2004 01:24 PM |