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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 01-26-2009, 09:07 PM   #31
bkilian
Zealot
bkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notes
 
Posts: 131
Karma: 24870
Join Date: Oct 2006
Device: Sony PRS/505
I'm getting an error on a lot of my files:

Generating in-line TOC...
Applying case-transforming CSS...
Traceback (most recent call last):
File "from_any.py", line 70, in <module>
File "from_any.py", line 66, in main
File "from_any.py", line 56, in any2mobi
File "calibre\ebooks\mobi\writer.pyo", line 574, in oeb2mobi
File "calibre\ebooks\oeb\transforms\manglecase.pyo" , line 36, in transform
File "calibre\ebooks\oeb\transforms\manglecase.pyo" , line 46, in mangle_spine
File "calibre\ebooks\oeb\stylizer.pyo", line 163, in __init__
File "calibre\ebooks\oeb\stylizer.pyo", line 280, in _apply_style_attr
File "cssutils\css\cssstyledeclaration.pyo", line 128, in __init__
File "cssutils\css\cssstyledeclaration.pyo", line 168, in __setattr__
File "cssutils\css\cssstyledeclaration.pyo", line 325, in _setCssText
File "cssutils\util.pyo", line 371, in _parse
File "cssutils\css\cssstyledeclaration.pyo", line 316, in unexpected
File "cssutils\errorhandler.pyo", line 89, in __handle
xml.dom.SyntaxErr: CSSStyleDeclaration: Unexpected token, ignoring upto u'; marg
in: 0pt;'. [1:1: ;]

If you're interested, I'll create a bug and add a file that does it.
bkilian is offline   Reply With Quote
Old 01-26-2009, 09:18 PM   #32
bkilian
Zealot
bkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notes
 
Posts: 131
Karma: 24870
Join Date: Oct 2006
Device: Sony PRS/505
Quote:
Originally Posted by kovidgoyal View Post
Baen HTML is autodetected. You can use --chapter to force page breaks
Aah, see, a page break may not be the same as a chapter. For instance, I might want page breaks before certain images, even if they could fit ion the same page, or I might want it at section headers and not chapter headers.

No real hassle though.
bkilian is offline   Reply With Quote
Advert
Old 01-26-2009, 09:24 PM   #33
bkilian
Zealot
bkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notesbkilian can name that song in three notes
 
Posts: 131
Karma: 24870
Join Date: Oct 2006
Device: Sony PRS/505
Quote:
Originally Posted by bkilian View Post
I'm getting an error on a lot of my files:

Generating in-line TOC...
Applying case-transforming CSS...
Traceback (most recent call last):
File "from_any.py", line 70, in <module>
File "from_any.py", line 66, in main
File "from_any.py", line 56, in any2mobi
File "calibre\ebooks\mobi\writer.pyo", line 574, in oeb2mobi
File "calibre\ebooks\oeb\transforms\manglecase.pyo" , line 36, in transform
File "calibre\ebooks\oeb\transforms\manglecase.pyo" , line 46, in mangle_spine
File "calibre\ebooks\oeb\stylizer.pyo", line 163, in __init__
File "calibre\ebooks\oeb\stylizer.pyo", line 280, in _apply_style_attr
File "cssutils\css\cssstyledeclaration.pyo", line 128, in __init__
File "cssutils\css\cssstyledeclaration.pyo", line 168, in __setattr__
File "cssutils\css\cssstyledeclaration.pyo", line 325, in _setCssText
File "cssutils\util.pyo", line 371, in _parse
File "cssutils\css\cssstyledeclaration.pyo", line 316, in unexpected
File "cssutils\errorhandler.pyo", line 89, in __handle
xml.dom.SyntaxErr: CSSStyleDeclaration: Unexpected token, ignoring upto u'; marg
in: 0pt;'. [1:1: ;]

If you're interested, I'll create a bug and add a file that does it.
I found it, I think, it appears to be from a file called "calibre_title_page.html" which appears to be generated by Calibre? It doesn't seem to like the lack of space in the "padding:0pt;" bit. That's the only instance of "margin: 0pt" in the file I was looking at.

Code:
C:\Users\bkilian\AppData\Local\Temp\calibre_0.4.130_hzidig_any2mobi\oeb\content>
more calibre_title_page.html
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>Cover</title>
        <style type="text/css" title="override_css">
            @page {padding: 0pt; margin:0pt}
            body { text-align: center; padding:0pt; margin: 0pt; }
            div { margin: 0pt; padding: 0pt; }
        </style>
    </head>
    <body>
        <div>
            <img src="resources/_cover_.jpg" alt="cover" style="height: 100%" />
        </div>
    </body>
</html>
bkilian is offline   Reply With Quote
Old 01-26-2009, 09:33 PM   #34
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Update to the newly released 0.4.131 and if it is still there open a ticket
kovidgoyal is offline   Reply With Quote
Old 01-27-2009, 02:30 AM   #35
sianon
Addict
sianon will become famous soon enoughsianon will become famous soon enoughsianon will become famous soon enoughsianon will become famous soon enoughsianon will become famous soon enoughsianon will become famous soon enough
 
Posts: 352
Karma: 572
Join Date: Jul 2007
Location: Melbourne
Device: Sony 500, Bebook, Kindle, Eco reader Drs and soon the Archos 9
I installed the update today and seems to be working well. The books I experienced error messages with the other day seem to be converting well now. Keep up the excellent work David and team. he only thing I need now to make Calibre absolutely perfect would be to be able to convert my old LRF files to MOBI.

Karen
sianon is offline   Reply With Quote
Advert
Old 01-27-2009, 04:40 AM   #36
Gaurnim
Final Five n°42
Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.Gaurnim can teach chickens to fly.
 
Gaurnim's Avatar
 
Posts: 789
Karma: 3599
Join Date: Feb 2008
Location: Lyon, France
Device: Cybook Gen3
This is great news !
I have to find the time to play with this news release, then !
Gaurnim is offline   Reply With Quote
Old 01-27-2009, 07:57 AM   #37
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,635
Karma: 3856660
Join Date: Oct 2008
Location: Luxembourg
Device: PB360°
I do have a problem with my pagebreaks when conwerting from html or epub to Mobi. I am using <div style="page-break-before:always;"></div> as my standard pagebreak command.

The converter doesn't seem to recognize this tag? Any idea why? The reason I am using this is because I want to be able to do pagebreaks wherever I want.

Edit: Actually, that was a viewer problem. Pagebreaks worked in Cybook and PC mobi reader

Last edited by mtravellerh; 01-27-2009 at 08:36 AM.
mtravellerh is offline   Reply With Quote
Old 01-27-2009, 11:24 AM   #38
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by mtravellerh View Post
I do have a problem with my pagebreaks when conwerting from html or epub to Mobi. I am using <div style="page-break-before:always;"></div> as my standard pagebreak command.

The converter doesn't seem to recognize this tag? Any idea why? The reason I am using this is because I want to be able to do pagebreaks wherever I want.

Edit: Actually, that was a viewer problem. Pagebreaks worked in Cybook and PC mobi reader
Yeah at the moment the viewer doesn't handle page breaks in MOBI
kovidgoyal is offline   Reply With Quote
Old 01-27-2009, 12:41 PM   #39
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
I had a question about the profiles in the mobiconverter?

What's the difference between the source Browser/kindle/cybook/prs-505? I wasn't sure what profile to select? and it looks like you have to pick twice?

Basically, i'd like my mobi file to come out looking like my LRF files do using the same HTML source.

I tried this with epub and I never quite got it working.

Also, for the mobi the indents seem rather indented I tried <p style="text-indent: 0pt"> </p> and p { text-indent: 3pt}

but neither seemed to work and the p { text-indent: 0pt} caused an extra space between paragraphs as well. or at least I assume that's what caused it.

I'd appreciate any and all help,
Thanks
Amalthia is offline   Reply With Quote
Old 01-27-2009, 01:10 PM   #40
Pulp
Palm Addict
Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.Pulp ought to be getting tired of karma fortunes by now.
 
Pulp's Avatar
 
Posts: 477
Karma: 1001951
Join Date: Aug 2008
Device: Cybook Gen3 [512mb, FW: 1.5]
Code:
<p width="X"> (pixels), <p width="X%">,<p width="Xem"> or <p width="Xpt">
works for adjusting the intent of mobi-paragraphs.
Also have a look here.
Pulp is offline   Reply With Quote
Old 01-27-2009, 01:14 PM   #41
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Amalthia View Post
What's the difference between the source Browser/kindle/cybook/prs-505? I wasn't sure what profile to select? and it looks like you have to pick twice?
The defaults should be fine for general use. Right now it only affects the interpretation of the CSS absolute font sizes and the pixel size of rasterized SVG images.

Quote:
Originally Posted by Amalthia View Post
Basically, i'd like my mobi file to come out looking like my LRF files do using the same HTML source.
Try having a CSS rule which sets both the 'text-indent' and 'margin' for your paragraph tags:

Code:
p {
  text-indent: 1em;
  margin: 0;
}
If that doesn't work for you, try the --remove-paragraph-spacing option.
llasram is offline   Reply With Quote
Old 01-27-2009, 01:15 PM   #42
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by Pulp View Post
Code:
<p width="X"> (pixels), <p width="X%">,<p width="Xem"> or <p width="Xpt">
works for adjusting the intent of mobi-paragraphs.
Also have a look here.
Thanks for the link and code.

I just need to add this to the css override box, correct?

And for the space added between paragraphs I select remove space between paragraphs? I used it once and it worked but when I created another copy it didn't work. I wasn't sure if that had to do with the profile or not though?
Amalthia is offline   Reply With Quote
Old 01-27-2009, 01:16 PM   #43
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Pulp View Post
Code:
<p width="X"> (pixels), <p width="X%">,<p width="Xem"> or <p width="Xpt">
works for adjusting the intent of mobi-paragraphs.
Also have a look here.
No. Calibre doesn't use the Mobipocket-specific markup and tags. For writing content to convert with calibre use the W3C XHTML and CSS specs.
llasram is offline   Reply With Quote
Old 01-27-2009, 02:46 PM   #44
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,152
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by llasram View Post
No. Calibre doesn't use the Mobipocket-specific markup and tags. For writing content to convert with calibre use the W3C XHTML and CSS specs.

I thought I did originally? But it didn't seem to work?
Amalthia is offline   Reply With Quote
Old 01-27-2009, 02:56 PM   #45
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Amalthia View Post
I thought I did originally? But it didn't seem to work?
Did you see post #41 in this thread?
llasram 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
main menu, section menu, css for calibre mobipocket output naisren Calibre 2 08-23-2010 11:42 PM
Trying to get consistent look to all output daveps Calibre 0 03-08-2010 02:18 PM
Anyone Have mobipocket desktop? Mobipocket server is down. Ireadfreely Kindle Formats 3 10-27-2008 10:29 AM
convert from 'new' mobipocket to 'old' mobipocket? Indigo Ink Kindle Formats 11 06-22-2008 01:43 AM
Mobipocket Reader 4.8 and Mobipocket eNews Creator Mobipocket Reading and Management 1 01-29-2004 08:03 AM


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


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