Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 10-15-2017, 03:35 PM   #1
timediver
Junior Member
timediver began at the beginning.
 
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).
timediver is offline   Reply With Quote
Old 10-15-2017, 04:13 PM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
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.
chaley is offline   Reply With Quote
Advert
Old 10-15-2017, 04:22 PM   #3
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,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by timediver View Post
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?
None that I know of.

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
BetterRed is offline   Reply With Quote
Old 10-16-2017, 03:52 AM   #4
timediver
Junior Member
timediver began at the beginning.
 
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.
timediver is offline   Reply With Quote
Old 10-16-2017, 04:13 AM   #5
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by timediver View Post
@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.
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.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	179
Size:	187.9 KB
ID:	159481  
chaley is offline   Reply With Quote
Advert
Old 10-16-2017, 04:45 AM   #6
timediver
Junior Member
timediver began at the beginning.
 
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!
timediver is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 08:59 AM.


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