Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-24-2011, 06:57 AM   #16
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by Agama View Post
Can you recommend any resources, (books/websites), for learning Python...
Dive into Python! It's a book and a web site. The entire thing is available online free.
user_none is offline   Reply With Quote
Old 01-24-2011, 07:37 AM   #17
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
@ Manichean, user_none : Thanks for these links, both resources look really good. I have downloaded the book and am immediately impressed by the scope of Python.

@Idolse : The scripts are geared towards tidy up of markdown to ePub conversions and use the exploded ePub from calibre's Tweak ePub:
1) Renames the html split files which result from markdown -> ePub and updates the opf/ncx files to match.
2) Strips all class="calibre[0-9]*" attributes from an ePub and links in a custom stylesheet.
3) Tidies the OPF file by stripping out blank lines and splitting lines with multiple XML tags. These are not produced by calibre but some publishers seem fond of unreadable OPF files, (e.g. Feedbooks use lots of blank lines).
4) ToC editor which presents the ePub ncf file as a simple text file, (1 line per ToC entry), for insertions/deletions/ammendments/hierarchies then rebuilds it including playOrder.
5) (In progress) Applies a predefined set of regexes to a plain text file prior to conversion.
Agama is offline   Reply With Quote
Old 01-24-2011, 09:11 AM   #18
Archon
Zealot
Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!
 
Archon's Avatar
 
Posts: 110
Karma: 5176
Join Date: Dec 2010
Device: Mac OSX, iPad, iPod, & Nook
Idolse,

You wrote:
<<You should also check out the 'Heuristics' section of Calibre's conversion settings. A lot of the things you want to do may be covered there already.>>

From Calibre's Manual it says:
<<Enable heuristic processing
This option activates calibre‘s Heuristic Processing stage of the conversion pipeline. This must be enabled in order for various sub-functions to be applied>>
Now the manual has this choice right between "Page Setup" and "Structure Detection". If you look at the page in the manual there is no selection for these in the picture they show.
http://calibre-ebook.com/user_manual...tic-processing

I have tried bringing up the conversion screen and under structure detection I see options for Chapters, Headers and footers.

For new users of the program it is not clear exactly where to find these options.

Archon
Archon is offline   Reply With Quote
Old 01-24-2011, 09:17 AM   #19
Archon
Zealot
Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!
 
Archon's Avatar
 
Posts: 110
Karma: 5176
Join Date: Dec 2010
Device: Mac OSX, iPad, iPod, & Nook
dwanthny,

<<Right where you would expect it while in code view under the find and replace window, check Regular expression under search mode.>>

I apparently wasn't in "code view" and didn't realize I needed to be in that to search and replace with regex with Sigil. I may try that next time I test drive it. BBedit and Text wrangler have a "use grep" check box in their find and replace dialog.

I may have to re-evaluate Sigil for my purposes.

Thanks for the tip.
Archon
Archon is offline   Reply With Quote
Old 01-24-2011, 09:33 AM   #20
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
@Archon, Thanks for pointing out that error in the manual. The heuristics were just reorganized and added as a separate panel widget last week. It looks like that screen shot was over looked when the manual was updated.
user_none is offline   Reply With Quote
Old 01-24-2011, 09:51 AM   #21
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Archon View Post
dwanthny,

<<Right where you would expect it while in code view under the find and replace window, check Regular expression under search mode.>>

I apparently wasn't in "code view" and didn't realize I needed to be in that to search and replace with regex with Sigil. I may try that next time I test drive it. BBedit and Text wrangler have a "use grep" check box in their find and replace dialog.

I may have to re-evaluate Sigil for my purposes.

Thanks for the tip.
Archon
You can't do multi-file S+R (any flavor) in Sigil unless you are in CV

Beware doing REGEX on a single file in BV, It will ignore the stuff you can't see and turn a simple (looking) replace into a

theducks is offline   Reply With Quote
Old 01-24-2011, 09:59 AM   #22
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by Archon View Post
I have tried bringing up the conversion screen and under structure detection I see options for Chapters, Headers and footers.

For new users of the program it is not clear exactly where to find these options.
Ah, are you sure that you've got the latest version (0.7.42) installed? The header/footer part in structure detection should also be gone by that version, to be replaced by the new search & replace option.
Manichean is offline   Reply With Quote
Old 01-24-2011, 12:16 PM   #23
Archon
Zealot
Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!Archon , Klaatu Barada Niktu!
 
Archon's Avatar
 
Posts: 110
Karma: 5176
Join Date: Dec 2010
Device: Mac OSX, iPad, iPod, & Nook
Ahh yes I see that in 0.7.42.

Unfortunately, I am still on 0.7.38 because 0.7.40 didn't handle conversion of old rtf's properly and now 0.7.42 fixes that problem but now there is a bug with the window draw routine in the multi-file metadata edit screen since they added the Date reset functionality. It is usable but I have to keep resetting the window size every time I want to do a multi-file edit since it won't remember the window size from the last time.

So, since I use that function more than the search and replace (I haven't used that at all yet) I am sticking with 0.7.38 for now.

But, I will fire up 0.7.42 and test drive the S&R routine on a few documents when I get gong here. By then 0.7.43 will probably fix the window drawing bug.

Kovid and you guys are making this into a great document conversion utility along with its great cataloging features.

Happy Monday
Archon
Archon is offline   Reply With Quote
Old 01-24-2011, 01:47 PM   #24
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Quote:
Originally Posted by Archon View Post
Kovid and you guys are making this into a great document conversion utility along with its great cataloging features.
Agreed! Sounds like time to get 0.7.42 installed and have a play with the new features.
Agama is offline   Reply With Quote
Old 01-24-2011, 09:32 PM   #25
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
Quote:
Originally Posted by Agama View Post
@ Manichean, user_none : Thanks for these links, both resources look really good. I have downloaded the book and am immediately impressed by the scope of Python.

@Idolse : The scripts are geared towards tidy up of markdown to ePub conversions and use the exploded ePub from calibre's Tweak ePub:
1) Renames the html split files which result from markdown -> ePub and updates the opf/ncx files to match.
2) Strips all class="calibre[0-9]*" attributes from an ePub and links in a custom stylesheet.
3) Tidies the OPF file by stripping out blank lines and splitting lines with multiple XML tags. These are not produced by calibre but some publishers seem fond of unreadable OPF files, (e.g. Feedbooks use lots of blank lines).
4) ToC editor which presents the ePub ncf file as a simple text file, (1 line per ToC entry), for insertions/deletions/ammendments/hierarchies then rebuilds it including playOrder.
5) (In progress) Applies a predefined set of regexes to a plain text file prior to conversion.
Those mostly sound like things that probably would be best tied directly into the tweak epub feature rather than elsewhere in the pipeline. The regexes you're looking to apply to text conversion are something that could be done directly in the text input plugin, either as a new option or modifying an existing one, depending on what they are.
ldolse is offline   Reply With Quote
Old 01-25-2011, 02:24 AM   #26
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
Quote:
Originally Posted by ldolse View Post
Those The regexes you're looking to apply to text conversion are something that could be done directly in the text input plugin, either as a new option or modifying an existing one, depending on what they are.
Thanks, I'll look into this - it's always better not to re-invent the wheel. There's just so much in calibre that it takes some time to work through all the options - and the developers keep on giving us more!
Agama is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cleaning screen sadievan Amazon Kindle 15 01-11-2011 10:44 AM
Screen cleaning melw Bookeen 7 10-02-2008 11:52 AM
Cleaning the reader pilotbob Sony Reader 19 11-27-2007 05:41 PM
Cleaning the Screen? mckenzie Sony Reader 7 10-22-2007 11:36 PM


All times are GMT -4. The time now is 06:23 PM.


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