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 04-17-2016, 03:00 PM   #1
Andys
Member
Andys began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Mar 2015
Device: PC
"Protected" columns?

Hi All!
Is there some recipe to protect one (or several) of columns from editing it via mouse-clicking?
Or, if this is impossible for specific columns - how to completely disable entering editmode in table view by mouse click and leave only F2 option?
Andys is offline   Reply With Quote
Old 04-17-2016, 03:23 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You cannot protect a column, but you can go to Preferences ==> Tweaks and set the "doubleclick_on_library_view" tweak.

Code:
#: Control behavior of the book list
# ID: doubleclick_on_library_view
# You can control the behavior of doubleclicks on the books list.
# Choices: open_viewer, do_nothing,
# edit_cell, edit_metadata. Selecting anything other than open_viewer has the
# side effect of disabling editing a field using a single click.
# Default: open_viewer.
# Example: doubleclick_on_library_view = 'do_nothing'
# You can also control whether the book list scrolls horizontal per column or
# per pixel. Default is per column.
This will allow you to avoid accidental editing.
eschwartz is offline   Reply With Quote
Advert
Old 04-17-2016, 04:08 PM   #3
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
Quote:
Originally Posted by Andys View Post
Hi All!
Is there some recipe to protect one (or several) of columns from editing it via mouse-clicking?
@Andys:

For Custom Columns, of course. Easy. Simply change table custom_columns in metadata.db for the specific Custom Column you wish to protect. Do this while Calibre is not running. See the attached example.

If you need a tool to do the edit, download the 'DB Browser for SQLite' tool from http://sqlitebrowser.org/

Needless to say, be careful what you touch in metadata.db. If appropriate, practice first on a test library. Also, close the tool before running Calibre.



DaltonST
Attached Thumbnails
Click image for larger version

Name:	editable_custom_column_setting.jpg
Views:	126
Size:	419.9 KB
ID:	147960  

Last edited by DaltonST; 04-17-2016 at 04:12 PM.
DaltonST is offline   Reply With Quote
Old 04-17-2016, 04:31 PM   #4
Andys
Member
Andys began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Mar 2015
Device: PC
Thanks!
I had to use global mouse tweak since I utilize a lot of default columns, and only several custom.
Andys is offline   Reply With Quote
Old 04-17-2016, 05:51 PM   #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: 12,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DaltonST View Post
@Andys:

For Custom Columns, of course. Easy. Simply change table custom_columns in metadata.db for the specific Custom Column you wish to protect. Do this while Calibre is not running. See the attached example.

If you need a tool to do the edit, download the 'DB Browser for SQLite' tool from http://sqlitebrowser.org/

Needless to say, be careful what you touch in metadata.db. If appropriate, practice first on a test library. Also, close the tool before running Calibre.



DaltonST
Quote:
Originally Posted by Andys View Post
Thanks!
I had to use global mouse tweak since I utilize a lot of default columns, and only several custom.
FYI: this is *not* guaranteed to work. The "editable" field was added way-back when we first introduced custom columns and neither really implemented nor removed. At this point, several years later, very few of the internal calibre functions check it. For example, bulk metadata search/replace doesn't. In addition, there is no guarantee that making such a change will not break something else. Finally, the APIs that *do* check it include the edit metadata functions, so you might be prevented from making changes to such a field when you want to.
chaley is offline   Reply With Quote
Advert
Old 04-17-2016, 06:37 PM   #6
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
Quote:
Originally Posted by chaley View Post
FYI: this is *not* guaranteed to work. The "editable" field was added way-back when we first introduced custom columns and neither really implemented nor removed. At this point, several years later, very few of the internal calibre functions check it. For example, bulk metadata search/replace doesn't. In addition, there is no guarantee that making such a change will not break something else. Finally, the APIs that *do* check it include the edit metadata functions, so you might be prevented from making changes to such a field when you want to.
@chaley:

I can flatly guarantee that this works to "protect" changes to Custom Columns via the Edit Metadata-Single Book dialog. I know this because my QuarantineAndScrub has used and relied on this since 2014 to "protect" its "work" custom columns from user changes. By design, only the Q&S plugin can change those custom columns.

The Edit Metadata-Single Book dialog "central widget tab" does not have dropdown boxes for any Custom Column so configured. I refer to your "widget_factory" used to do the above.

The example image attached to my prior post was from a QuarantineAndScrub Library. It is from my "real", personal Calibre library, which happens to be a Q&S library.

My MultiColumnSearch plugin also uses this method to protect a specific Custom Column that it manages, "mcs_was_indexed", which pertains to indexing a specific ebook's words for word-index searches.

I can also confirm that if a user changes their mind, they will not be able to change it using the Edit Metadata-Single Book dialog until they "unchange" it. That is what it is for. I interpreted "protect" literally when I gave my answer.

Thanks for adding that feature years ago. I very much appreciate it.


DaltonST
DaltonST is offline   Reply With Quote
Old 04-17-2016, 06:44 PM   #7
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I would like to point out that calibre has a builtin feature to protect the user from inadvertently clicking on a cell and editing it by accident -- a solution that doesn't require modifying the database by hand.

And it seems the OP was perfectly happy with that builtin method, too.
eschwartz is offline   Reply With Quote
Old 04-17-2016, 08:23 PM   #8
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: 21,718
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Andys View Post
Thanks!
I had to use global mouse tweak since I utilize a lot of default columns, and only several custom.
@Andys - I have the Tweak eschwartz flagged set to 'do_nothing' - F2 rules.

FWIW - I edit everything in the book list - I even move any downloaded Comments into a custom column to facilitate this.

Via the View Manager PI I have different column layouts for editing different types of 'books' - e.g. fiction doesn't normally have byline and strapline data so for fiction those columns are on the far right, whereas for Media documents they're on the left This means I don't have to tab through irrelevant columns when editing the metadata for different types of books.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

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 07:26 PM
calibredb format for "series" custom columns ZioNemo Library Management 7 02-06-2014 11:57 PM
No data in "In Library" and "On Device" columns after upgrade ily426 Library Management 8 04-03-2011 02:53 PM
PRS-650 Anyone knows how to fix the random "protected by DRM" message? nekron Sony Reader Dev Corner 1 01-19-2011 08:23 AM
Getting "Protected Page" Message when reading unprotected PDFs skoobwoman Sony Reader 7 11-26-2008 07:14 PM


All times are GMT -4. The time now is 09:06 AM.


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