Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-18-2014, 11:41 AM   #1
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
A few suggestions

@ kovid

I have a few suggestions regarding Calibre Edit Book. Don't know how hard it is to implement them, but would kindly ask you to consider:

1) adding "Split at Cursor" option in code view (possibly via right click or a keyboard shortcut - Sigil used CTRL+Space). It would give more control and be more precise than the existing green-line solution;

2) adding "Minimal Match" for RegEx searches next to "Wrap" in search mode;

3) adding the buttons and/or keyboard shortcuts to change lettercase: lowercase, uppercase, capitalize headline-style, capitalize sentence-style; this was mentioned earlier, don't know if you're working on it or not.

Thank you for all your hard work
mikapanja is offline   Reply With Quote
Old 04-18-2014, 11:53 AM   #2
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
In the short term, this can be accomplished by a macro program like Phrase Express, which has these functions built, but which takes some study to figure out how to make the macros work. I recall the same learning curve with Auto Hotkey.
mrmikel is offline   Reply With Quote
Advert
Old 04-18-2014, 11:56 AM   #3
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: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1) Split at cursor does not make sense, what if the cursor is not at a location where splitting is legal? If you want to split based on the code view, right click and choose split at multiple locations, that will allow you to split based on tag id/tag name, basically any XPath

2) I dont know what you mean by minimal match. If you want quantifiers like * and + to be non-greedy simply follow them with a ? in the expression.
kovidgoyal is offline   Reply With Quote
Old 04-18-2014, 12:25 PM   #4
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by kovidgoyal View Post
1) Split at cursor does not make sense, what if the cursor is not at a location where splitting is legal? If you want to split based on the code view, right click and choose split at multiple locations, that will allow you to split based on tag id/tag name, basically any XPath

2) I dont know what you mean by minimal match. If you want quantifiers like * and + to be non-greedy simply follow them with a ? in the expression.
1) There are instances where I would like to split a file at a single location, not at multiple locations. If that should happen to be a location where splitting is not legal, Calibre could just refuse to do it, with an appropriate warning.

2) Minimal Match is a Sigil name for ungreedy matching. It uses (?U) to match the first occurrence of a string. Let's say I want to find (and later replace, according to a rule) entries in HTML TOC:

- in Sigil's RegEx mode, when I type >(\w)(.*)?< in Find box, I get >Cover<;

- in Calibre's RegEx mode, I get >Cover</a><.

So, I guess my question is if Calibre could use (?U) prefix for this kind of search.
mikapanja is offline   Reply With Quote
Old 04-18-2014, 12:45 PM   #5
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: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1) So insert id="split_here" there and use the split at multiple locations tool to split on tags with id="split_here"

2) There is no ?U operator in calibre's regex engine. If you want to match non greedily,a ll you need to do is, use: >(\w)(.*?)<

Note the position of the question mark.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-18-2014, 01:19 PM   #6
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by kovidgoyal View Post
1) So insert id="split_here" there and use the split at multiple locations tool to split on tags with id="split_here"

2) There is no ?U operator in calibre's regex engine. If you want to match non greedily,a ll you need to do is, use: >(\w)(.*?)<

Note the position of the question mark.
1) Works, thanx!

2) That solved the Find part, now I need help with the Replace part

I'd like to replace ALL CAPS with capitalize headline-style (i.e. ONE with One) in HTML TOC. In Sigil, I used >\u\1\L\2\E<, but it gives an error in Sigil.

Also, is it possible to use Calibre's RegEx engine to replace multiword entries, say ABOUT THE PUBLISHER with About the Publisher (or, at least, About The Publisher)?
mikapanja is offline   Reply With Quote
Old 04-18-2014, 09:33 PM   #7
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: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You have to wait for me to implement the function mode for search and replace to be able to do that, and many other things.
kovidgoyal is offline   Reply With Quote
Old 04-19-2014, 08:26 AM   #8
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by kovidgoyal View Post
You have to wait for me to implement the function mode for search and replace to be able to do that, and many other things.
OK, fair enough.

I have a few more suggestions, and would like to hear your opinion, if you don't mind.

1) When right-clicking style name in the code, add the option to skip to it in the stylesheet. Useful if a book has a long stylesheet.

2) Enable adding a blank HTML/XHTML file in the File Browser.

3) Enable adding a copy of the selected file in the File Browser. Useful if one wants to use a part of the code from the previous file.

4) Enable adding an ID anchor via right click.

Thank you in advance
mikapanja is offline   Reply With Quote
Old 04-19-2014, 08:30 AM   #9
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: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1) On my todo list

2) You can already do this

3) Create blank file and use copy/paste

4) I dont see the point, it will save you typing five characters id=""
kovidgoyal is offline   Reply With Quote
Old 04-19-2014, 10:21 AM   #10
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by kovidgoyal View Post
1) On my todo list

2) You can already do this

3) Create blank file and use copy/paste

4) I dont see the point, it will save you typing five characters id=""
Sorry about the blank file, missed it

If you could bear with me just a little longer, here are a few final thoughts.

5) Enable removing bold/strong and italic/em tags on selected text that already has them, i.e. toggle adding/removing them.

6) Add "Replace Hyperlink" in HTML files, or incorporate it into "Insert Hyperlink". The goal is to be able to overwrite the old hyperlink if it exists, not to add new hyperlink next to the old one.

7) Enable indenting/unindenting multiple selected TOC entries via left arrow/CTRL+L and right arrow/CTRL+R.

8) Enable moving multiple selected TOC entries up or down, without indenting/unindenting. The current two-step solution (first indenting, then moving) is elegant, but it's not good for multiple entries.

Thank you for your patience
mikapanja is offline   Reply With Quote
Old 04-19-2014, 10:31 AM   #11
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: 45,219
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
5 and 6 - patches are welcome

7 -8 use drag and drop
kovidgoyal is offline   Reply With Quote
Old 04-19-2014, 11:16 AM   #12
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
Quote:
Originally Posted by kovidgoyal View Post
5 and 6 - patches are welcome

7 -8 use drag and drop
5 and 6 - wish I could help, sadly don't know anything about programming

7 and 8 - tried earlier, but missed those tiny differences in placement. Now I see it.

Thank you for all your help!
mikapanja is offline   Reply With Quote
Old 05-03-2014, 09:29 AM   #13
mikapanja
Perfectionist
mikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentametermikapanja can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
@ kovid

Two more suggestions:

1) add new color scheme, so that one can choose white background for editing code;

2) enable refreshing the ToC pane after editing the .ncx file directly, just like refreshing File Preview pane after editing code.

Thanx!
mikapanja is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestions, please mediax Reading Recommendations 9 06-07-2013 01:03 PM
Need Help or Suggestions nymormon Recipes 0 05-31-2012 11:56 AM
Suggestions solara Astak EZReader 11 02-20-2010 11:01 PM
BD - suggestions... pitolee Sony Reader 16 04-27-2007 10:08 PM


All times are GMT -4. The time now is 08:10 PM.


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