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 10-21-2021, 11:38 AM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
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>
File 2 --

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>
I can merge the files by selecting the pair, right clicking, and Merge Text Files, but it'd be a lot easier and faster to have an icon and shortcut key

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)
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	157
Size:	22.0 KB
ID:	189736  

Last edited by phossler; 10-21-2021 at 11:48 AM.
phossler is offline   Reply With Quote
Old 10-21-2021, 12:04 PM   #2
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: 44,323
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, there isnt IIRC
kovidgoyal is offline   Reply With Quote
Advert
Old 10-21-2021, 02:37 PM   #3
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: 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) .
theducks is offline   Reply With Quote
Old 10-21-2021, 10:39 PM   #4
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
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
phossler is offline   Reply With Quote
Old 11-07-2021, 08:00 PM   #5
DyckBook
Morlock
DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.
 
DyckBook's Avatar
 
Posts: 33
Karma: 2734796
Join Date: Oct 2021
Device: Kindle Paperwhite
Quote:
Originally Posted by phossler View Post
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
I just had to do that for some books that had random chapter breaks in the middle of chapters. But, as I recall it only took 4 steps and 5 mouse clicks to accomplish each merge.

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.
DyckBook is offline   Reply With Quote
Advert
Old 11-12-2021, 08:27 PM   #6
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by DyckBook View Post
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.
I was actually thinking of something simpler and IMO more intuitive

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
phossler is offline   Reply With Quote
Old 11-12-2021, 10:01 PM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by phossler View Post
I was actually thinking of something simpler and IMO more intuitive

[...]

1. Click 13.html
2. Drag it and drop on 11.html
3. Click 15.html
4. Drag it and drop on 11.html

[...]
But drag+dropping files already exists, and it's for changing the order of files within the EPUB's spine.
Tex2002ans is offline   Reply With Quote
Old 11-13-2021, 09:04 AM   #8
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by Tex2002ans View Post
But drag+dropping files already exists, and it's for changing the order of files within the EPUB's spine.

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
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	130
Size:	36.8 KB
ID:	190195  
phossler is offline   Reply With Quote
Old 11-14-2021, 03:27 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: 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
kovidgoyal is offline   Reply With Quote
Old 11-14-2021, 04:18 AM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
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
BetterRed is online now   Reply With Quote
Old 11-14-2021, 05:06 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: 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.
kovidgoyal is offline   Reply With Quote
Old 11-14-2021, 05:12 AM   #12
lomkiri
Zealot
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 139
Karma: 1000102
Join Date: Jul 2021
Device: N/A
Quote:
Originally Posted by BetterRed View Post
Drag-n-drop file merging should have a preferences option to disable it.
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.
lomkiri is offline   Reply With Quote
Old 11-14-2021, 06:56 AM   #13
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: 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.
kovidgoyal is offline   Reply With Quote
Old 11-14-2021, 08:27 AM   #14
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
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.
!. Thanks - I (data point of 1) do a lot more merging than re-arranging so this will be very handy. Many of the books I re-format to make Kindle-friendly have a (e.g.) a chapter split over several xhtml files

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
phossler is offline   Reply With Quote
Old 11-14-2021, 04:45 PM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,926
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
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.
That will be sufficient for me.

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
BetterRed is online now   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 05:42 PM.


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