Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2009, 10:49 PM   #1
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,369
Karma: 3161371
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
html problem

I'm posting a set of files that have me stumped.

The ZIP file contains 6 HTML files from the CIA World Fact Book. One file does not display the same as the other 5. I cannot figure out why. There are a minimum number of tags in the files.

Eternal gratitude and karma to the first person who figures it out. Thanks.
Attached Files
File Type: zip stumped.zip (97.6 KB, 99 views)
Nate the great is offline   Reply With Quote
Old 03-11-2009, 11:00 PM   #2
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN


OK, the first five .html's have a problem with the heading tags surrounding the Appendix title. There's no closing </h2> as it's currently a typo <h2> in all the html's except the last one.

The last one (6th) .html file has no <link> in the <head> section as well as a spurious ">" near the bottom of the file.

Hope this helps!

Last edited by nrapallo; 03-12-2009 at 10:31 PM. Reason: typo
nrapallo is offline   Reply With Quote
 
Enthusiast
Old 03-11-2009, 11:03 PM   #3
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,369
Karma: 3161371
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by nrapallo View Post


OK, the first five .html's have a problem with the heading tags surrounding the Appendix title. There's no closing </h2> as it's currently a typo <h2> in all the html's except the last one.

The last one (6th) .html file has no <link> in the <head> section as well as a spurious ">" near the bottom of the file.

Hope this helps!
closing the tag...

Thank you.
Nate the great is offline   Reply With Quote
Old 03-11-2009, 11:18 PM   #4
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by Nate the great View Post
closing the tag...

Thank you.
You're welcome.

Also, the second file, appendix-b.html, has a mismatched number of "<" and ">". You should change the 56 occurences of "<br<I>" to "<br><I>".

Looks like you're progressing along quite well. I'm still hand editing/fixing appendix-b.html for my REB1200 version and will have to figure out a better method when I get to the rankorder/fields pages!

Cheers,
nrapallo is offline   Reply With Quote
Old 03-12-2009, 08:50 AM   #5
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 7,953
Karma: 22621990
Join Date: Dec 2008
Location: Krewerd
Device: HTC Flyer; BBMini; Sony PRS650; Onyx Boox T68
One thing I often do if I run into a problem like that, is to open the file in a XML editor.

Or lately, just create an ebook out of it, then check it and it will give you all the closing errors (and other HTML mistakes )

(I've had a lot of books that had most of the text center aligned/in italic/bold/underline, just because I hadn't closed the tag correctly!)
Sweetpea is offline   Reply With Quote
Old 03-12-2009, 10:29 PM   #6
FizzyWater
You kids get off my lawn!
FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.
 
FizzyWater's Avatar
 
Posts: 2,853
Karma: 5153443
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Dell Axim, PRS350/650, Nook Glow, PB Touch Lux 623
Quote:
Originally Posted by Sweetpea View Post
One thing I often do if I run into a problem like that, is to open the file in a XML editor.
Any one in particular you would recommend?
FizzyWater is offline   Reply With Quote
Old 03-12-2009, 10:33 PM   #7
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 10,369
Karma: 3161371
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by Sweetpea View Post
One thing I often do if I run into a problem like that, is to open the file in a XML editor.

Or lately, just create an ebook out of it, then check it and it will give you all the closing errors (and other HTML mistakes )

(I've had a lot of books that had most of the text center aligned/in italic/bold/underline, just because I hadn't closed the tag correctly!)
Firefox does this job pretty good.
Nate the great is offline   Reply With Quote
Old 03-13-2009, 04:28 AM   #8
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 7,953
Karma: 22621990
Join Date: Dec 2008
Location: Krewerd
Device: HTC Flyer; BBMini; Sony PRS650; Onyx Boox T68
Quote:
Originally Posted by FizzyWater View Post
Any one in particular you would recommend?
I'm a web developer, so I use tools I wouldn't buy for personal use

But, as Nate also said, just rename the file to .XML and open it in your browser. It will point out any mistakes you made with the elements.
Sweetpea is offline   Reply With Quote
Old 03-13-2009, 05:23 AM   #9
mtravellerh
book creator
mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.
 
mtravellerh's Avatar
 
Posts: 9,612
Karma: 1609196
Join Date: Oct 2008
Location: Luxembourg
Device: PB360°
You know what's really a bummer and no XML will help you prevent? If you have an anchor within a header, say

Code:
<h2><a name""></a>whatever</h2>
this will give a bad mistake in mobi files.

What happens? Well the link jumps right to the anchor, ignoring the header tag and displaying the "whatever" as simple text without formatting. Took me a while to figure that one out.
mtravellerh is offline   Reply With Quote
Old 03-13-2009, 12:48 PM   #10
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by mtravellerh View Post
You know what's really a bummer and no XML will help you prevent? If you have an anchor within a header, say

Code:
<h2><a name""></a>whatever</h2>
this will give a bad mistake in mobi files.

What happens? Well the link jumps right to the anchor, ignoring the header tag and displaying the "whatever" as simple text without formatting. Took me a while to figure that one out.
And Mobi2IMP (really eBook Publisher) hates the Feedbooks.com encoding of some of their news fetched .mobi (like Wired: Beyond the beyond) where they insert the <a name> within the <a href>:
Code:
<a href="4.html"><a name="0000000699"></a><h3>Four Horsemen of Climate Apocalypse Rev Up their Fossil-Fueled Engines</h3></a>
I'd prefer <a name> before the <a href> for the same reason it doesn't work with the header tags if after. It's cleaner and more appropriate!
nrapallo is offline   Reply With Quote
Old 03-16-2009, 08:47 AM   #11
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 7,953
Karma: 22621990
Join Date: Dec 2008
Location: Krewerd
Device: HTC Flyer; BBMini; Sony PRS650; Onyx Boox T68
Quote:
Originally Posted by nrapallo View Post
And Mobi2IMP (really eBook Publisher) hates the Feedbooks.com encoding of some of their news fetched .mobi (like Wired: Beyond the beyond) where they insert the <a name> within the <a href>:
Code:
<a href="4.html"><a name="0000000699"></a><h3>Four Horsemen of Climate Apocalypse Rev Up their Fossil-Fueled Engines</h3></a>
I'd prefer <a name> before the <a href> for the same reason it doesn't work with the header tags if after. It's cleaner and more appropriate!
I've done away with the <a name=""></a> completely.

this: <h2><a name""></a>whatever</h2>
will be this: <h2 id="name">whatever</h2>

And it gives the same functionality and is even epub valid!
Sweetpea is offline   Reply With Quote
Old 03-17-2009, 07:35 AM   #12
Hadrien
Feedbooks.com Co-Founder
Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.Hadrien understands the importance of being earnest.
 
Hadrien's Avatar
 
Posts: 2,265
Karma: 145123
Join Date: Nov 2006
Location: Paris, France
Device: Sony PRS-t-1/350/300/500/505/600/700, Nexus S, iPad
Quote:
Originally Posted by nrapallo View Post
And Mobi2IMP (really eBook Publisher) hates the Feedbooks.com encoding of some of their news fetched .mobi (like Wired: Beyond the beyond) where they insert the <a name> within the <a href>
We don't do this, Wired does. Cleaning up RSS feeds is incredibly annoying believe me: messy XHTML, wrong character encoding, entities encoded twice etc...
Hadrien is offline   Reply With Quote
Old 03-17-2009, 08:38 AM   #13
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530531
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by Hadrien View Post
We don't do this, Wired does. Cleaning up RSS feeds is incredibly annoying believe me: messy XHTML, wrong character encoding, entities encoded twice etc...
It's OK, I try and cope with badly coded (at the source) RSS feeds by RegEx'ing a workable solution as well as quirks and limitations of the eBook Publisher software I rely on within Mobi2IMP.

I'm currently updating Mobi2IMP to properly convert your Feedbooks.com feeds (stored in mobipocket format) and I think I can say I'm winning the battle.

Most of the times, the resulting conversion does work as it's supposed to!

BTW, Hadrien, there's one quirk that you may try and fix. I did notice (though I can't off hand remember where I saw this) in some exploded .mobi RSS feeds that the HTML tag <br \> was used. I needed to substitute <br /> instead.

Here's my solution, utilized to properly convert your RSS feeds, written as Perl RegEx:
Code:
#fix up feedbooks.com news feeds quirks 
$html =~ s/<br(\s)*\\>/<br \/>/gi;
$html =~ s/<a href([^>]*)><a name([^>]*)><\/a>/<a name$2><\/a><a href$1>/gi;

Last edited by nrapallo; 03-17-2009 at 10:24 AM. Reason: typo
nrapallo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML importing problem PaladinBL Sigil 13 03-16-2010 05:03 PM
HTML Conversion Problem bigtymer Calibre 7 01-14-2010 08:15 PM
Problem bei html Insider Erste Hilfe 3 01-07-2010 12:49 AM
html to epub problem cstal_star Calibre 4 08-15-2009 07:54 AM
Problem converting HTML to Mobi AprilHare Calibre 3 05-02-2009 09:34 PM


All times are GMT -4. The time now is 03:23 AM.


MobileRead.com is a privately owned, operated and funded community.