![]() |
#1 |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ![]() |
![]() |
![]() |
![]() |
#2 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#4 | |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
Quote:
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)? |
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 | |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
Quote:
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 ![]() |
|
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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="" |
![]() |
![]() |
![]() |
#10 | |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
Quote:
![]() 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 ![]() |
|
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#12 |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 72
Karma: 12802
Join Date: Apr 2014
Device: none
|
|
![]() |
![]() |
![]() |
#13 |
Perfectionist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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! |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |