02-01-2015, 02:42 PM | #1 |
Member
Posts: 10
Karma: 10
Join Date: Feb 2015
Device: none
|
Duplicate/Copy column
Is there a way to duplicate or copy a non-user defined column?
I have a large library and my TAG columns are a real mess. I would like to clean them up but it will take a while. In the mean time, I don't want to delete the existing tags as they would be useful in until the update is complete, My first thought was to create a user-defined column called 'My Tags' and use it to represent the new organized tags. However, what I really want is the original TAG column to have the updated tags. So if I do this, I have to find a way to copy/overwrite the data in 'My Tags' into the original 'Tags' once its complete. I have no idea how to do that. My second thought was to duplicate the original TAGS column, and then simply erase the data in the original TAG column and add the new tags directly using the copied column as reference. When I am finished, I would simply delete the other column. However, I have no idea how to duplicate the column. Any advice would be appreciated. (Note: Please don't say just to use the new column 'My Tags'. I know that is an option, but if I export or transfer books, the other user would have to have that column in order for the data to transfer. Everyone automatically has the TAG column, so that is why I want that original column to have the updated data. Thanks in advance! |
02-01-2015, 03:31 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Select all books you want to affect, hit Edit Metadata. Now, in Bulk Edit Metadata, use the third tab (Search and Replace) to search the tags column and replace into the #custom_mytags column.
You will need the following settings: Search Mode: Regular Expression Search Field: tags Search for: (.*) Replace with: \1 Destination Field: #custom_mytags This will copy the contents of the tags column for all books, into the new column. Once they are cleaned, you can simply repeat the same S&R, but switch the Search and Destination fields around, to copy in the other direction. Do remember though -- when doing bulk changes, be careful not to jump the gun! There is NO going back, unless you have backed up your library! You can seriously mess up your library and delete things permanently if you are not careful. /end boilerplate warning Last edited by eschwartz; 02-01-2015 at 03:35 PM. |
Advert | |
|
02-01-2015, 06:03 PM | #3 | |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
02-01-2015, 09:25 PM | #4 |
Member
Posts: 10
Karma: 10
Join Date: Feb 2015
Device: none
|
@eschwarts: Thank you very much. This worked great. Between the backup and the copying, it took some time (like I said... lots of books ) but it duplicated well, and I am able to delete sections of the original TAG column without it affecting the MY TAGS column. Just what I was looking for. I assume (.*) and \1 are variations of 'copy all' and 'paste all' respectively.
And thank you for making your instructions idiot proof. I appreciate that you did not say "Just use search and replace!" @Better Red: Thanks for the suggestion. I actually did look at that plug-in before posting but it seemed that there were too many possible pitfalls for me to use it successfully at my current level of expertise (or lack thereof). Even the programmer warned against it ... and being a firm believer in Murphy's Law.... well, need I say more? I mean, I am still trying to figure out what the heck "Library Metadata Backup Status" in Library maintenance refers to. (Its obviously not a back-up bc that is done by copying the file through Explorer, so what the heck does it do?) But at some point in the future, I will experiment with it and/or other plug-ins. There are some good ideas there. At this point though, I just want to get the job done. Thanks again to both of you for the quick response. |
02-01-2015, 09:37 PM | #5 | ||
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
(Follow that link if you are interested in reading the calibre manual page on Regular Expressions. Useful tool, although of course not obligatory. ) Quote:
And even then, you just click the button and calibre worries about the .opf files. |
||
Advert | |
|
02-01-2015, 09:50 PM | #6 |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@Smokva - no worries,
Some metadata updates cascade through many books - eg if you changed a Publisher name from Random Hose, to Random House then all the books with Random Hose would have their metadata updated. In the book folders you'll see there are metadata.opf files, the sole purpose of which is to backup the metadata, for use by the Restore database function. The metadata.opf files are not written immediately something changes, they are written in a background task at about 1/second - so if you had 1,000 Random Hose books it would take about 15 minutes to write the 1,000 updated metadata.opf files with Random House. The "Library Metadata Backup Status" tells you how how many metadata.opf files are still waiting to be written. Don't worry... if you close calibre, it will carry on rewriting them when calibre is started again. If you want to get it done quickly, use the calibredb backup_metadata command. I did something the other day that would have taken more than 2 hours to write the new files, it took about two minutes from the command line - the reason I did it is that the disk ticking annoys me. BR Last edited by BetterRed; 02-01-2015 at 09:54 PM. |
09-17-2022, 07:22 PM | #7 | |
Wizard
Posts: 1,165
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
|
|
06-27-2024, 01:35 PM | #8 | |
Enthusiast
Posts: 28
Karma: 10
Join Date: Jun 2012
Device: Nook
|
Quote:
Thank You! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to "copy" or combine tags in two columns not as a built column? | jecilop | Library Management | 7 | 09-04-2014 08:26 PM |
Can I make a duplicate copy of my Calibre Library | Chuck Reid | Library Management | 7 | 08-23-2014 12:00 PM |
Copy Custom Column to another library | gabby98 | Calibre | 10 | 01-26-2014 11:59 PM |
Copy data from one column to another | Wyndham | Library Management | 3 | 11-19-2013 02:14 PM |
Column copy (one time) | wsignal | Library Management | 6 | 05-08-2013 05:41 PM |