01-24-2011, 06:57 AM | #16 | |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
|
|
01-24-2011, 07:37 AM | #17 |
Guru
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. |
01-24-2011, 09:11 AM | #18 |
Zealot
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 |
01-24-2011, 09:17 AM | #19 |
Zealot
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 |
01-24-2011, 09:33 AM | #20 |
Sigil & calibre developer
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.
|
01-24-2011, 09:51 AM | #21 | |
Well trained by Cats
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:
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 |
|
01-24-2011, 09:59 AM | #22 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
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.
|
01-24-2011, 12:16 PM | #23 |
Zealot
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 |
01-24-2011, 01:47 PM | #24 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
|
01-24-2011, 09:32 PM | #25 | |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
|
|
01-25-2011, 02:24 AM | #26 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
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!
|
|
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 |