10-15-2017, 03:35 PM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2014
Device: none
|
How to disable/enable (not hide) a custom column?
I collect papers in calibre and classify them with genre. To this end I created a simple custom column "genre" and a second column "derived genre" consisting of a template with a huge switch function to check the papers' title and associate the "derived genre".
Then I store the "derived genre" into the conventional genre column with the bulk "search and replace" function. This process works well but performance is very poor. But as I need the "derived genre" only during this process I am looking for a quick way to disable/enable (hide does not improve performance) a custom column. Is there a hidden tweak or anything else in the system to achieve this in a simple way? (In the meantime I have to paste the script for "derived_genre" temporarily and remove it after). |
10-15-2017, 04:13 PM | #2 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Don't use a composite column. Instead use template mode in SR, put the "huge switch function" in the template box, and store the result in the genre column. Save the SR for easier access in the future.
You can make this easier if you put the huge switch into a user-defined template function, but that might not be practical because it requires writing the switch in python. |
Advert | |
|
10-15-2017, 04:22 PM | #3 | |
null operator (he/him)
Posts: 20,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Have you thought about adding new papers to an Intake library where you'd have the 'derived_genre' column defined. You would do the move from 'derived_genre' to 'genre' via S&R in that library. And then move (copy and delete) the papers from the Intake library to the Target library without the 'derived_genre' column. By default the Copy to Library tool is in the book list context menu. When you copy books you can select which custom columns are to be copied - in this case you would un-select the 'derived_genre' column. BR |
|
10-16-2017, 03:52 AM | #4 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2014
Device: none
|
Thank you very much chaley and BetterRed for your splendid ideas!
I will check both for my process! @chaley: could you please give me an example for how to use the SR template mode? I have used the regexp mode and the store/ load function but never the template mode. |
10-16-2017, 04:13 AM | #5 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I was too imprecise with my language. I meant "use regexp mode with 'template' as the search field and your genre column as the destination field. This image shows what I mean.
|
Advert | |
|
10-16-2017, 04:45 AM | #6 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2014
Device: none
|
Now I got it:it should solve my problem very comfortably, selectively and with no performance penalty! Really great solution!!
Thank you again very very much! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Move selected data from series column to a new custom column | fvdham | Library Management | 3 | 06-02-2017 03:49 PM |
Hide-A-Column | Nyssa | Library Management | 2 | 10-27-2014 09:57 PM |
Enable/disable search highlighting | katiez | Library Management | 2 | 12-05-2013 02:42 PM |
Custom column returns value based on value of another custom column? | calvin-c | Calibre | 3 | 09-14-2013 02:24 PM |
Store chooser / enable, disable dialog | user_none | Calibre | 8 | 05-20-2011 07:27 AM |