10-09-2013, 06:45 AM | #1 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
How to make Sigil live (in calibre)
I see lots of concern over a non-issue here. As I said before this tool will be a replacement (upgrade) for the Tweak Book functionality in calibre, it will not use code from the conversion module, but instead from the Polish Books module. That code is designed to make minimal changes to the markup/css, unlike conversions. Start up calibre and run Polish Books on a couple of epubs and see what happens.
And the tool will be launch-able as a standalone program without the need to use the library part of calibre, just like all the other tools in calibre. For example, ebook-convert.exe, ebook-viewer.exe, lrfviewer.exe, ebook-polish.exe, fetch-metadata.exe, ebook-meta.exe And let me just say, it's obvious after all this time, from the fate of this thread and the one before it, that that there is no interest in maintaining the current Sigil codebase. Therefore, while I appreciate that some people want to hang on to Sigil or the concept of "separate" programs or whatever, the choice at this point is simple: Either we go with my offer, or the ability to conveniently tweak ebooks in EPUB/AZW3 using open tools, in a cross platform form manner, stagnates and eventually dies. While that's not a big deal to me personally, as I dont use Sigil anyway, I still think it is important, thus the offer. |
10-09-2013, 08:42 AM | #2 |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I have a feature request...
Be able to take MS Reader OPF and reformat it it to be ePub compliant. That was one can load in an MS Reader file and easily convert it to ePub since it already is mostly there. |
Advert | |
|
10-09-2013, 09:08 AM | #3 | |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
Sigil doesn't. |
|
10-09-2013, 09:12 AM | #4 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You misunderstand Kovid I think. You don't load the raw html in Calibre, but in the seperate program.
|
10-09-2013, 09:14 AM | #5 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no raw html. This is an ebook editor, in other words you give it an ebook already in epub or azw3. And adding an import tool to process html files into epub with no changes is trivial calibre already does that, try adding an html file to calibre you will get a zip, with all linked files, images, styles and an autogenerated opf with no changes made anywhere (except for link rewriting). Just rename that zip to .epub and add in the boilerplate META-INF/content.xml and mimetype files and there you go -- an epub from html.
@JSWolf: In fact the above approach can be generalized to *all* ebook formats calibre can handle, including LIT. Last edited by kovidgoyal; 10-09-2013 at 09:19 AM. |
Advert | |
|
10-09-2013, 10:15 AM | #6 | |
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Quote:
created empty book imported html - calibre zipped it and all resources had to rezip (as *.epub) contents (with stored mimetype file) the META-INF/container.xml file was already there I then had to split and create toc in Sigil (as I would have done anyway) So that seems to easily done and creates an epub as Sigil would have done (minus the sub-folder structure) without the usual calibre style/markup conversion alterations. If this was streamlined and given as 'import as epub' when dropping the original html into calibre, that would be quite acceptable. Then having the 'tweak-epub-sigil' to edit the epub would/should be as easy to use as sigil as it is now. Edit: the content.opf includes and references a non-existent toc.ncx file Last edited by Perkin; 10-09-2013 at 10:18 AM. |
|
10-09-2013, 12:43 PM | #7 | ||
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
Ah, *THAT* is the crux of the matter!
As Minsc in Baldur's Gate II would say: "Hehe.... You... you're a smart one! I understand no-houw! Haha!" No, that is not how it would work; not in my view at least. The editor would work the same way as Sigil does, creating an EPUB out of the HTML files, NOT converting from HTML to EPUB (with all the .calibre classes as a result). Kovid beat me to the punch with his reply. It describes exactly how I see this editor come to be... and lo and behold, some, or maybe even most of the EPUB-creation can already be done, and the editor hasn't even been written yet. How's that for fast development? [quote] Quote:
Quote:
=== While I know C and C++ much better than Python at this point, I'm not going to program in C/C++ "for fun" if I need to get work done for which execution speed is not of paramount importance, but development speed and ease is. If I want to write an editor, then I want to write editor functions, not spend half my time managing memory. (A chess engine would be different: speed is of greatest importance, and managing memory and bits and bytes is what it needs to do to get results, so C/C++ are perfect choices there.) Last edited by Katsunami; 10-09-2013 at 01:04 PM. |
||
10-09-2013, 04:31 PM | #8 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
10-09-2013, 08:05 PM | #9 |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Splitting/merging is very important. It's one of the things I do use Sigil for.
|
10-09-2013, 08:09 PM | #10 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-09-2013, 08:11 PM | #11 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-09-2013, 08:25 PM | #12 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
10-09-2013, 08:33 PM | #13 | |
Resident Curmudgeon
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
Original CSS .p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em } Code:
New CSS (something like that) .p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em } |
|
10-09-2013, 11:27 PM | #14 | |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
If no one volunteers to build the editor, I will probably just stick something very basic in myself and leave it at that. The new tool is a significant update to the existing Tweak Book feature in calibre, so it is worth doing from that perspective for me. The way it is shaping up, I may actually be persuaded to abandon vim for clean up tasks that dont involve lots of actual text editing. However, it is still early days, and with something this complex, there are no guarantees. I have been known to occasionally get bored and abandon a project part way through. For people that want to check it out, setup a calibre development environment and run it with calibre-debug src/calibre/gui2/tweak_book/main.py some_file.epub Right now it only has a file browser, this is very early stages. |
|
10-10-2013, 12:20 AM | #15 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Re: editor
At the risk of resurrecting a dead horse, I do recall that in the runup to Sigil v. 0.6.0, ckeditor was tried as a "previewer." As elibrarian indicated, it could also be used as an editor, though Sigil wasn't set up to use it that way. Eventually, ckeditor was dropped for 0.6.0 (IIRC) for reasons too deep for me. But... perhaps if we're starting more or less from scratch, we could use ckeditor as a starting point? I speak of what I know not, so maybe there are fundamental problems I'm unaware of. (and "what's this 'we' s**t, white man?" anyway... ) BTW, as I remember it, the ckeditor interface in Sigil 0.5.x looked a lot like the present previewer. But I searched all my machines which have 0.7.2 and above installed, and can't find the ckeditor_config.js file so I suppose it (ckeditor) is not presently in use. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to make Sigil live | varlog | Sigil | 136 | 10-25-2013 02:34 PM |
how many tocs does Sigil make? | Gregg Bell | Sigil | 17 | 01-31-2013 09:39 AM |
How do I make all .pdf's in my calibre library open in calibre instead of preview | morbo3000 | Library Management | 9 | 07-30-2011 10:39 AM |
using sigil to make changes befote conversion | alansplace | Sigil | 11 | 06-07-2011 07:50 AM |
i can't make sigil run in fedora 14 | nastarovia | Sigil | 1 | 01-20-2011 05:02 AM |