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

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 10-10-2013, 12:37 AM   #16
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,796
Karma: 22666666
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.
kovidgoyal is offline  
Old 10-10-2013, 12:55 AM   #17
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 688
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by kovidgoyal View Post
@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.
Again, I am typing more than I know. But if I recall correctly the version used in the beta for sigil 0.6.0 had both a WYSiWIG window (don't know if it was editable at all) and a "code view" which was editable if you made certain modifications to the config file, as suggested by elibrarian. I tried his suggestion, and it worked. Trouble was, again IIRC, that those code edits went nowhere since Sigil wasn't set up to accept them. I've no idea what the current state of development of ckeditor is, though its website looks promising. I'm only assuming that it would allow one to edit in source code mode, rather than WYSIWYG. If it can't, then fuggetaboutit as far as I'm concerned.

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.
st_albert is offline  
Advert
Old 10-10-2013, 10:42 AM   #18
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
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.
Katsunami is offline  
Old 10-10-2013, 10:53 AM   #19
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,796
Karma: 22666666
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.
kovidgoyal is offline  
Old 10-10-2013, 11:02 AM   #20
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
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)?
Katsunami is offline  
Advert
Old 10-10-2013, 11:07 AM   #21
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,796
Karma: 22666666
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.
kovidgoyal is offline  
Old 10-10-2013, 11:29 AM   #22
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
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
Katsunami is offline  
Old 10-10-2013, 12:00 PM   #23
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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!
Toxaris is offline  
Old 10-10-2013, 12:04 PM   #24
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,796
Karma: 22666666
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.
kovidgoyal is offline  
Old 10-10-2013, 12:05 PM   #25
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,703
Karma: 54369092
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
theducks is offline  
Old 10-10-2013, 12:11 PM   #26
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
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.
Katsunami is offline  
Old 10-10-2013, 12:18 PM   #27
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,796
Karma: 22666666
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.
kovidgoyal is offline  
Old 10-10-2013, 12:24 PM   #28
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,703
Karma: 54369092
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 Katsunami View Post
@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.
Yes, Book view

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)
theducks is offline  
Old 10-10-2013, 12:40 PM   #29
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
Quote:
Originally Posted by kovidgoyal View Post
@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.
CoffeeScript. Never used that. I get a somewhat "functional programmig language" feeling from it when looking at the code.

Quote:
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.
As I've never worked with any of these editor components, or Python or Coffeescript, I'll have to learn anything you choose, so I don't mind.

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).
Katsunami is offline  
Old 10-10-2013, 02:02 PM   #30
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
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:
Originally Posted by Katsunami View Post
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).
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.
Perkin is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 08:03 AM.


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