10-10-2013, 12:37 AM | #16 |
creator of calibre
Posts: 44,264
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@st_albert: I have no experience with writing editors, so I have no idea what would or would not be suitable. ck_editor looks nice for a WYSIWYG editor component, though probably not for the code editor component. The most likely issues would be whether it works with Qt WebKit and syncing from wysiwyg to code editor positions and perhaps markup validity.
Last edited by kovidgoyal; 10-10-2013 at 12:40 AM. |
10-10-2013, 12:55 AM | #17 | |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
Oh, and the original reason for including ckedit was (again, IIRC) to provide cursor syncronization between the code view and the book (WYSIWYG) views. So again, I am ASSuming that that would be handled within ckedit. Otherwise, see: fugettaboutit. Last edited by st_albert; 10-10-2013 at 01:00 AM. Reason: an afterthought. |
|
Advert | |
|
10-10-2013, 10:42 AM | #18 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
@Kovid: looks to be a great start already.
I'll make a counter offer. I don't feel comfortable enough yet to program essential stuff like opening and saving books, keeping the NCX and OPF correct and that sort of thing, even if Calibre can already do it partly. If you can get the basics done to a point that a book can be opened, the HTML/CSS code and TOC edited (probably using the Edit TOC plugin), and saved again reliably, I will then start extending the editor with relatively simple extra functionality such as Clips/Snippets. I'll start there, because a mistake in such a function will probably not kill the book. From there, I'll work my way up toward the more "dangerous" functions such as merge/split, adding files (this stuff needs OPF adjustment). Later on, I'll look at incorporating stuff like Tidy and Flightcrew again. Eventually, Tweak Book will catch up to Sigil, and then it "only" needs to be maintained, and can be extended when needed. Probably this editor will have plugin support automatically through Calibre. I assume one can call Modify EPub if it's installed, instantly adding great clean-up power. Last edited by Katsunami; 10-10-2013 at 10:55 AM. |
10-10-2013, 10:53 AM | #19 |
creator of calibre
Posts: 44,264
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@Katsunami: Sure, as I said, if no one volunteers,, I will just put in a basic editor and call it quits. You are welcome to extend it at that point.
|
10-10-2013, 11:02 AM | #20 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
Very well then. I'll be awaiting the first basic version that can do some code editing, and I'll start extending it from there.
Are you going to use something like QPlainTextEdit or incorporate something like QScintilla (which user_none was not happy with to use)? |
Advert | |
|
10-10-2013, 11:07 AM | #21 |
creator of calibre
Posts: 44,264
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I have no idea, I will evaluate the options when I get to the editor component. My instinct is to use QScintilla, I like challenges But, that may change when I actually look at the various options. Currently the three options I have in mind are QPlainTextEdit, Ace and QScintilla.
|
10-10-2013, 11:29 AM | #22 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
Do what you think is best. (Q)Scintilla may not be very nice (according to user_none), but it is powerful, and widely used. It would automatically add stuff such as code highlighting.
Eventually, we can use Calibre to develop Calibre itself |
10-10-2013, 12:00 PM | #23 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
If user_none is right about the bad RexEx engine of Scintilla (and I have no reason to doubt him), than I would strongly vote against Scintilla. The RexEx capability is very important!
|
10-10-2013, 12:04 PM | #24 |
creator of calibre
Posts: 44,264
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no need to use the regex engine from scintilla, you can use any regex engine you like, provided scintilla has a way of highlighting matched text and scrolling to the highlights. All it costs is some memory to copy the editor buffer and run the regex on the copy and then update the buffer with the matches.
EDIT: In fact whatever editor component is used, I highly doubt we will rely on its regex engine, since there needs to be the ability to run regexes on all the files in the book and the regex engine for that must be the same as that used in the editor. In fact the scintilla documentation even has a section on doing just that: http://www.scintilla.org/ScintillaDoc.html#Searching Last edited by kovidgoyal; 10-10-2013 at 12:22 PM. |
10-10-2013, 12:05 PM | #25 |
Well trained by Cats
Posts: 30,280
Karma: 57979022
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I need 2 features:
1)REGEX 2) A close synch between the BV and the CV. Close =within a paragraph or 2 as it all has to do with fixing something seen in BV I thought one of the editors tried could not be made to do the synch reliably |
10-10-2013, 12:11 PM | #26 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
@Kovid: With Ace, do you mean the editor over here? (http://ace.c9.io/#nav=about) I hate it already, because the site does stupid things like disabling the Back button on Firefox. It leads me to believe that the developers also do stupid things with the editor component, and I haven't even seen it. Also... Javascript? You'd run the editor within a browser window? I'd personally would be in favour of using something wrapped in Python and then extending that using Python itself.
@theducks: CV = Code View I think, but what is BV? Book View? I think that this view will be one of the later things to be implemented. |
10-10-2013, 12:18 PM | #27 |
creator of calibre
Posts: 44,264
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@Katsunami: Yes, that's the one. I dont touch javascript with a ten foot barge pole. calibre has a nice builtin coffeescript compiler, which eases the pain of using javascript. So if I did choose ACE, I would program it with coffeescript. As for how well it works, as I said I haven't actually investigated.
Those three are pretty much the only editor components I know of that will work with Qt. Therefore, it has to be one of those three. @theducks: There isn't going to be a book view. There will be a preview panel that will stay synced backwards and forwards with the code view, but you wont be able to edit directly in the preview panel. At least I have no interest in implementing that. |
10-10-2013, 12:24 PM | #28 | |
Well trained by Cats
Posts: 30,280
Karma: 57979022
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Without the synch, I might as well use Tweak and Notepad++ for CV with the BV in the Calibre Viewer (I start with EPUB so I don't need the ability to HTML import) |
|
10-10-2013, 12:40 PM | #29 | ||
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
Quote:
Quote:
I think you should choose what fits Calibre best, and what provides the fastest development speed, and easiest code contributions (should someone want to do that). |
||
10-10-2013, 02:02 PM | #30 |
Guru
Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Yes, use whichever component will allow easiest adaptation by users adding features after Kovid has set it all up and handed off further development to 'normal' users.
|
|
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 |