Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 02-18-2008, 03:49 PM   #286
DMcCunney
New York Editor
DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.
 
DMcCunney's Avatar
 
Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
Quote:
Originally Posted by DaleDe View Post
I guess it probably depends on how old you are.
I'm older and wear reading glasses, but prefer smaller fonts.

Quote:
The size on the screen of a pc matches in pixel count but the ppi is higher on the device than most screens. To answer your question I would need to know the ppi on your monitor. If it is less than 104 then the text on the device will be smaller.
I have a 19" monitor I run in 1600x1200 resolution.

Quote:
The latest version of the tool lets you select for 3 base font sizes but the consensus of the manufacturer is that small is better which is why they changed it.
Small as opposed to x-small?
______
Dennis
DMcCunney is offline   Reply With Quote
Old 02-18-2008, 05:29 PM   #287
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,404
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by nrapallo View Post
I don't explicitly do this. If the original uses <p>..</p>, then the .IMP by default has blank lines. I think a <style> entry for <p> to avoid this would be a solution, but haven't tested this.

If the original uses <div>..</div>, then I'm not sure why the blank lines would be there, other than a repeat of the above cause.

Requires further exploration...

-Nick
Well the HTML from Book Designer uses <div>. But I'm guessing that mobi2HTML uses <p> on the output.
JSWolf is offline   Reply With Quote
Advert
Old 02-18-2008, 06:22 PM   #288
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by JSWolf View Post
Well the HTML from Book Designer uses <div>. But I'm guessing that mobi2HTML uses <p> on the output.
You are guessing wrong. It just unpacks the file and it uses whatever the person that did the original file used.
tompe is offline   Reply With Quote
Old 02-18-2008, 06:37 PM   #289
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by DMcCunney View Post
I'm older and wear reading glasses, but prefer smaller fonts.

I have a 19" monitor I run in 1600x1200 resolution.

Small as opposed to x-small?
______
Dennis
Correct, small vs. x-small for the default. You really like tiny text but I can't really tell for sure from those numbers if you run windows. You also need to check the dpi used in the screen properties on windows to determine the font that they pick I would believe. Right click on a spot of screen, then check settings and tap advanced to see what the font scaling is. this might be 96, 120 or some custom value.

Dale
DaleDe is offline   Reply With Quote
Old 02-18-2008, 06:47 PM   #290
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by JSWolf View Post
Well the HTML from Book Designer uses <div>. But I'm guessing that mobi2HTML uses <p> on the output.
Yes, they do. What Nick can do is to detect the <head> section and place something like this in the text just after the head section and before the </head>. You can try it yourself to see what you might like. Once you make the change just use eBook Publisher manually on the opf file to build the file.

<style type="text/css">
p {text-indent:+2.0em; margin-top:0.2ex}
</style>

This will cause paragraphs to indent (maybe 1.0em would be closer to what Mobipocket does) and will set the margin between paragraphs to a small number. You can tweak these to whatever looks good. Mobi actually increased the distance between paragraphs a small amount (about 2 pixels) to do an exact match you might set margin-top:2px. Using a unit like em is better as it scales with text size.

Of course not everyone likes indent vs. space so an option --indent might be appropriate for mobi2imp.

Dale
DaleDe is offline   Reply With Quote
Advert
Old 02-18-2008, 06:55 PM   #291
DMcCunney
New York Editor
DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.
 
DMcCunney's Avatar
 
Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
Quote:
Originally Posted by DaleDe View Post
Correct, small vs. x-small for the default. You really like tiny text but I can't really tell for sure from those numbers if you run windows. You also need to check the dpi used in the screen properties on windows to determine the font that they pick I would believe. Right click on a spot of screen, then check settings and tap advanced to see what the font scaling is. this might be 96, 120 or some custom value.
Windows XP Pro SP2
DPI setting: Normal size (96DPI)
______
Dennis
DMcCunney is offline   Reply With Quote
Old 02-18-2008, 07:21 PM   #292
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by DMcCunney View Post
Windows XP Pro SP2
DPI setting: Normal size (96DPI)
______
Dennis
Wow, you like things small. I use a 20" screen (really 18" visible) at 1280x1024. If yours is really a full 19" diagonal then maybe it is similar. Anyway the contrast on my screen is generally higher than the eBookwise (unless I really crank up the backlight) and I prefer small to x-small. I used to try and read x-small but after a while I find myself zooming into the large size (medium) which is a little large but better than x-small for me. My glasses are ok.

Dael
DaleDe is offline   Reply With Quote
Old 02-18-2008, 08:40 PM   #293
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,404
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I have a 20.1" LCD monitor that runs as 1600x1200. Love it that way.
JSWolf is offline   Reply With Quote
Old 02-18-2008, 08:42 PM   #294
DMcCunney
New York Editor
DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.DMcCunney ought to be getting tired of karma fortunes by now.
 
DMcCunney's Avatar
 
Posts: 6,384
Karma: 16540415
Join Date: Aug 2007
Device: PalmTX, Pocket eDGe, Alcatel Fierce 4, RCA Viking Pro 10, Nexus 7
Quote:
Originally Posted by DaleDe View Post
Wow, you like things small. I use a 20" screen (really 18" visible) at 1280x1024. If yours is really a full 19" diagonal then maybe it is similar. Anyway the contrast on my screen is generally higher than the eBookwise (unless I really crank up the backlight) and I prefer small to x-small. I used to try and read x-small but after a while I find myself zooming into the large size (medium) which is a little large but better than x-small for me. My glasses are ok.
I ran 1600x1200 on my old 17" monitor before it died.

The 19" is an Envision LCD model with a flat screen. (Full size CRT - not flat panel.) I'm driving it at the moment with an old Matrox 2D card, which is adequate for what I do. I bought it about 5 years ago at my local CompUSA when my old 17" monitor was dying. They had it on sale for $250. (Of course, a week after I bought it, I saw another computer shop with a 21" monitor for the same price...) I've been quite happy. It performs flawlessly.

And yes, I like a lot of screen real estate. If I had the room I'd put in a dual head card and run two monitors.
______
Dennis
DMcCunney is offline   Reply With Quote
Old 02-19-2008, 12:21 AM   #295
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: 2530691
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 DaleDe View Post
Yes, they do. What Nick can do is to detect the <head> section and place something like this in the text just after the head section and before the </head>. You can try it yourself to see what you might like. Once you make the change just use eBook Publisher manually on the opf file to build the file.

<style type="text/css">
p {text-indent:+2.0em; margin-top:0.2ex}
</style>

This will cause paragraphs to indent (maybe 1.0em would be closer to what Mobipocket does) and will set the margin between paragraphs to a small number. You can tweak these to whatever looks good. Mobi actually increased the distance between paragraphs a small amount (about 2 pixels) to do an exact match you might set margin-top:2px. Using a unit like em is better as it scales with text size.

Of course not everyone likes indent vs. space so an option --indent might be appropriate for mobi2imp.

Dale
Thanks for the suggestion! This construct will work; getting it into the converted HTML will be another story.

I will implement (in version 7) switches for indentation '--indent' and 'no paragraph separation '--nopara'. As it stands now, the default for eBook Publisher appears to be 'no' indentation and '1em' paragraph separation.

JSWolf, you would have to use two switches '--indent' (1em) and '--nopara' (0em) to achieve your desired results. Wait until I implement these options as my testing indicates they do work.

-Nick
nrapallo is offline   Reply With Quote
Old 02-19-2008, 12:50 AM   #296
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by nrapallo View Post
Thanks for the suggestion! This construct will work; getting it into the converted HTML will be another story.

I will implement (in version 7) switches for indentation '--indent' and 'no paragraph separation '--nopara'. As it stands now, the default for eBook Publisher appears to be 'no' indentation and '1em' paragraph separation.

JSWolf, you would have to use two switches '--indent' (1em) and '--nopara' (0em) to achieve your desired results. Wait until I implement these options as my testing indicates they do work.

-Nick
Typically if you do nopara spacing you will automatically need indent since you need some way to separate the paragraphs. However you might want to add indent anyway and a separate option for people who want separation and indent. Note that mobi, in particular, does not encode the indent but adds it automatically at the display and also adds a slight separation between the paragraphs. As it is translated today the indent is gone so taking about the spacing makes it look like one huge paragraph. They do not support CSS.

To get it in there you could do a substitute on the <head> and the add the <head> back in with all the new stuff.

Dale
DaleDe is offline   Reply With Quote
Old 02-19-2008, 10:20 AM   #297
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: 2530691
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 nrapallo View Post
Thanks for the suggestion! This construct will work; getting it into the converted HTML will be another story.

I will implement (in version 7) switches for indentation '--indent' and 'no paragraph separation '--nopara'. As it stands now, the default for eBook Publisher appears to be 'no' indentation and '1em' paragraph separation.

JSWolf, you would have to use two switches '--indent' (1em) and '--nopara' (0em) to achieve your desired results. Wait until I implement these options as my testing indicates they do work.

-Nick
JSWolf:

Mobi2imp (version 7) with windows executable now in the Fictionwise forum (sticky)!

I implemented a '--nopara' option in 'mobi2imp'. See the samples below! Of course, your preferences may vary, but these are just some of the ways 'mobi2imp' can be used to accomplish the conversion from the command-line.

-Nick
Attached Files
File Type: zip Mobi2imp_samples_nopara_separation.zip (3.03 MB, 300 views)
File Type: bat mobi2IMP-nopara.bat (1.8 KB, 321 views)
File Type: txt Readme.txt (1.6 KB, 293 views)
nrapallo is offline   Reply With Quote
Old 02-19-2008, 11:07 AM   #298
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,404
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by nrapallo View Post
JSWolf:

Mobi2imp (version 7) with windows executable now in the Fictionwise forum (sticky)!

I implemented a '--nopara' option in 'mobi2imp'. See the samples below! Of course, your preferences may vary, but these are just some of the ways 'mobi2imp' can be used to accomplish the conversion from the command-line.

-Nick
Thank you. This does sound like it would do fine. I don't mind adding options to the command line at all. As long as I can make the best IMP possible from my already created source then I'm good to go.
JSWolf is offline   Reply With Quote
Old 02-19-2008, 11:07 PM   #299
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: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
tompe:

I recently processed a .pdb (TEXt/REAd) and got a long series of words with no line breaks.

In 'mobi2html' I tried using '--rawhtml' and saw that there were <CR><LF> line endings in the text, but they seem to disappear when processed.

I couldn't find where the line endings were being stripped and replaced with spaces. Since the text feed to HTML::TreeBuilder had no HTML tags, would that be the culprit?

I tried using substituitions on the raw text to produce basic HTML code, but it didn't work.
Code:
my $book = $text;
$book = ~s/\cM//g;                   # Unix line endings
$book = ~s/\n/\x01/g;                # Collapse lines
$book = ~s/\x01\x01/<\/p>\n\n<p>/g;  # Separate paragraphs
$book = ~s/\x01/ /g;                 # Insert whitespace

$text = "<html><body><p>" . $book . "</p></body></html>";
-Nick

Last edited by nrapallo; 02-19-2008 at 11:10 PM.
nrapallo is offline   Reply With Quote
Old 02-20-2008, 01:09 AM   #300
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by nrapallo View Post
tompe:

I recently processed a .pdb (TEXt/REAd) and got a long series of words with no line breaks.

In 'mobi2html' I tried using '--rawhtml' and saw that there were <CR><LF> line endings in the text, but they seem to disappear when processed.

I couldn't find where the line endings were being stripped and replaced with spaces. Since the text feed to HTML::TreeBuilder had no HTML tags, would that be the culprit?

I tried using substituitions on the raw text to produce basic HTML code, but it didn't work.
Code:
my $book = $text;
$book = ~s/\cM//g;                   # Unix line endings
$book = ~s/\n/\x01/g;                # Collapse lines
$book = ~s/\x01\x01/<\/p>\n\n<p>/g;  # Separate paragraphs
$book = ~s/\x01/ /g;                 # Insert whitespace

$text = "<html><body><p>" . $book . "</p></body></html>";
-Nick
Generally PalmDOC files (the ones you process) are expected to be wrapped by the reader and only contain returns at paragraph boundaries thus there is no line end. Why would you want line endings?
DaleDe is offline   Reply With Quote
Reply

Tags
mobi2mobi, mobils


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobi2Mobi Mobi2Mobi v0.13 - GUI for Mobiperl tools Jad Kindle Formats 476 03-15-2015 06:51 PM
Tools for Editing Kindle .mobi Files? GJN Kindle Formats 33 12-26-2013 03:05 PM
Handy Perl Script to convert HTML0 files to smartquotes maggotb0y Sony Reader 0 04-12-2007 12:49 PM
PRS-500 Perl tools to generate Reader content TadW Sony Reader Dev Corner 0 01-08-2007 06:55 AM
gmail copy (gmcp) - Perl script to copy files to/from Gmail Colin Dunstan Lounge 0 09-04-2004 02:24 PM


All times are GMT -4. The time now is 11:07 AM.


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