View Single Post
Old 02-20-2019, 12:12 PM   #12
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Since Calibre will automatically strip out the hyphens given any Edit Metadata chance to do so, you could temporarily add the hyphens, then immediately copy part of the ISBN into a custom column using Bulk Metadata Edit Search & Replace.

This SQL will work in any SQLite tool, such as 'SQLite Expert-Personal' (which is free) to add the hyphens before you use BME S&R.

Code:
UPDATE identifiers SET val = (SUBSTR(val,1,3)||'-'||SUBSTR(val,4,1)||'-'||SUBSTR(val,5,3)||'-'||SUBSTR(val,8,5)||'-'||SUBSTR(val,13,1)                   )
WHERE type = 'isbn' AND val NOT LIKE '%-%' /* AND book = 25376 */  /* example output: 978-0-684-84328-5 */ /* These are comments /*
You can remove the comments around the 'AND book=nnnnn' while you test if you wish to impact only a particular book.


DaltonST
DaltonST is offline   Reply With Quote