10-21-2021, 11:38 AM | #1 |
Wizard
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Is there Merge Files toolbar icon or shortcut key?
Is there Merge Files toolbar icon or shortcut key?
I frequently find an epub with pairs of files for (typically) a chapter number in one file and the chapter title in a seond: File 1 -- Code:
<body> <h2>CHAPTER FIFTY-SIX</h2> </body> Code:
<body> <h3>TITLE TITLE TITLE</h3> ......... I'd like to just end up with this after the Merge Code:
<body> <h2>CHAPTER FIFTY-SIX</h2> <h3>TITLE TITLE TITLE</h3> I can RegEx my way (or at least I think I can) to the final format for the TOC Code:
<body> <h2>CHAPTER FIFTY-SIX<br/><br/>TITLE TITLE TITLE</h2> On the menu there does seem to be an icon, but I can't find that either under Editor Preferences, Shortcut Keys or Toolbars (Same for Link Style sheets which I use all the time) Last edited by phossler; 10-21-2021 at 11:48 AM. |
10-21-2021, 12:04 PM | #2 |
creator of calibre
Posts: 44,323
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, there isnt IIRC
|
Advert | |
|
10-21-2021, 02:37 PM | #3 |
Well trained by Cats
Posts: 30,362
Karma: 58053698
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Calibre requires you to select all files to be merged AND specify the target (defaults to the first).
This is different from the way Sigil does it 1) A single file selected Assumes Merge into previous (in list) when you ctrl-M. 20 If multiple selected, then it want a confirm (still first) viva the difference. I use both, because of DIFFERENT ways of doing things (and I don't want either to conform to the other) . |
10-21-2021, 10:39 PM | #4 |
Wizard
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
I used to use Sigil but 'standardized' on Calibre. I'd hate to have to use it just to merge files easier.
I forgot about some of the intermediate steps to merge using Calibre I was thinking that it'd be handy to select a bunck of html files, click a icon, and -- presto - merge into the first file How about a drag and drop merge in the File Browser to merge two files? If there were multiple files, then the currect way would still work |
11-07-2021, 08:00 PM | #5 | |
Morlock
Posts: 33
Karma: 2734796
Join Date: Oct 2021
Device: Kindle Paperwhite
|
Quote:
1. Click on first file--hold down shift key 2. Click on last file 3. Right click on the highlighted area 4. Click on "merge" twice if you have "snap to" enabled. This is because the first file is already selected. Yes, drag and drop would be a bit faster, but you'd still have to do steps 1 and 2. And step three would be the drag and drop. So you will have eliminated one double mouse click. But then, if you have to do this a lot, maybe that's worth it. |
|
Advert | |
|
11-12-2021, 08:27 PM | #6 | |
Wizard
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Quote:
In the File Browser window before 11.html 12.html 13.html 14.html 15.html 1. Click 13.html 2. Drag it and drop on 11.html 3. Click 15.html 4. Drag it and drop on 11.html In the File Browser window after 11.html (now includes 13.html and 15.html) 12.html 14.html |
|
11-12-2021, 10:01 PM | #7 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
But drag+dropping files already exists, and it's for changing the order of files within the EPUB's spine.
|
11-13-2021, 09:04 AM | #8 | |
Wizard
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Quote:
Yes, but Kovid has very user friendly-ly (? ) added an indicator line where the moved file is to be inserted. I was think that just dropping the 'to be merged' file on top of the 'merge it here' file would be the way I know that if I want to rearrange files and do NOT get the indicator line (it's a little hard to see) then nothing happens |
|
11-14-2021, 03:27 AM | #9 |
creator of calibre
Posts: 44,323
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm not a fan of having the same d&d do two unrelated things, however, since, thanks to checkpoints mistakes are easy to undo, I implemented it. https://github.com/kovidgoyal/calibr...fac095f1f3af28
|
11-14-2021, 04:18 AM | #10 |
null operator (he/him)
Posts: 20,926
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Drag-n-drop file merging should have a preferences option to disable it.
The Allow using drag and drop to merge books setting in Look and Feel set a precedent for book merging. BR |
11-14-2021, 05:06 AM | #11 |
creator of calibre
Posts: 44,323
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
In the main book list there is no undo for the merge, in the editor there is. So I dont think there is much need fo rone. Wel will see.
|
11-14-2021, 05:12 AM | #12 |
Zealot
Posts: 139
Karma: 1000102
Join Date: Jul 2021
Device: N/A
|
I second this opinion. Moving files is far more common than merging them, and a mistake may easily happen without even being noticed ; in that case checkpoints are useless. I think it's a dangerous option, although practical when needed, and, IMHO, it should be specifically allowed, as a preference, or maybe activating a button in an existing toolbar.
Last edited by lomkiri; 11-14-2021 at 05:14 AM. |
11-14-2021, 06:56 AM | #13 |
creator of calibre
Posts: 44,323
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Why are checkpoints useless? You dont even need to use the checkpoint manually, when you drop you get asked for confirmation, and after the merge is done there is even an unobtrusive popup to allow you to undo. I suggest you try it first, before jumping on the badwagon.
|
11-14-2021, 08:27 AM | #14 | |
Wizard
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Quote:
2. With the 'Rearrange Here' line in the file browser it seems like there is a clear difference displayed to the user as to the result. 3. Check points work fine to un-do a 'oops' merge |
|
11-14-2021, 04:45 PM | #15 | |
null operator (he/him)
Posts: 20,926
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I always have popup "Show this warning again" checked. Aside: I would never deliberately make use of drag drop to merge files. I even dislike having to use the mouse to move objects, particularly up and down trees, a) it requires fine motor skills that I don't have, and b) it's too easy to move objects inadvertently. If I could, I'd disable mouse drag and drop semi-permanently, and only enable it when absolutely necessary BR |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Shortcut Key for Individual Saved Searchs | kevn57 | Library Management | 3 | 09-29-2021 04:34 PM |
to merge an advanced search and a shortcut into one command | reinsley | Library Management | 0 | 12-02-2016 09:54 AM |
Snippets !!! Icon for the toolbar?? | phossler | Editor | 12 | 01-12-2015 05:05 AM |
Shortcut key for HTML Source in Comments | jenrar | Library Management | 9 | 11-24-2014 05:26 PM |
Delete Files - Shortcut Key Combination for Macbook | linzerkipferl | Sigil | 6 | 07-09-2013 03:27 PM |