Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 07-11-2022, 09:41 AM   #1
Milva
Junior Member
Milva began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2017
Device: Kobo Aura HD
How to set fields read-only in "edit metadatas" dialog ?

Hi,

I'm intersted to develop a "lock plugin", as seen in this post :
https://www.mobileread.com/forums/sh...k+modification

I would like to add an option to "lock" a book to avoid modifications on author and title, in order to conserv the folder hierarchy.

I read the documentation to create this new action, but how to make this fields readonly in the "Edit metadatas" dialog from my plugin ?

Thank you in advance

PS : I know, in a second time i have to lock authors rename... If you have informations to lock in contextual menu...
Milva is offline   Reply With Quote
Old 07-11-2022, 10:02 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cant do that from a plugin as the edit metadata dialog has no plugin hooks.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-11-2022, 10:24 AM   #3
Milva
Junior Member
Milva began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2017
Device: Kobo Aura HD
Ok thanks for your response (and your job^^)
Milva is offline   Reply With Quote
Old 07-11-2022, 07:14 PM   #4
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Milva View Post
Ok thanks for your response (and your job^^)
The Protect/Unprotect tool in the JobSpy plugin may do what you want ==>> Index of plugins

BR
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2022-07-12 090901.jpg
Views:	82
Size:	295.4 KB
ID:	194927  
BetterRed is offline   Reply With Quote
Old 07-12-2022, 03:29 AM   #5
Milva
Junior Member
Milva began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2017
Device: Kobo Aura HD
Yes, that's what i want, but this plugin is only for customs columns. And i want to lock "book title" and "author" columns...

I will explain my problem and maybe someone can help me^^
I have some ebooks with some additional ressources (musics, movies, ppt, doc, ...), and first, i wanted to put them in the calibre book folder (XXX/author/title/). But if i rename the author or the book (accidently), this folder disapear :s

My first idea was to "lock" this books to avoid this case.
Maybe i have a second idea : add a custom field "ResourcesFolder" (value="../../XXX/") and maybe an option to go to this folder from the contextual menu (right clic on a book)
-> do you think it is possible ?
Milva is offline   Reply With Quote
Advert
Old 07-12-2022, 08:04 AM   #6
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
You can add any type of file to an existing 'book', but only one file of any type (e.g. one MP3 audio, one MP4 video, one DOCX document etc) and you MUST do it via calibre, not via a file manager.

You can add a file (or files) to a 'book' via:
  • Drag/Dropping the file(s) into the Book Details panel (on the right),
  • The Add Books->Add files to selected book records from clipboard action - you need to load the file(s) clipboard with Ctrl+C in your file manager first. You can set a keyboard shortcut for this action, I use Alt+Shift+V
  • The Add Books->Add files to selected book records dialogue
BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Shortcuts on the "Edit Metadata Dialog" philipblee Library Management 4 03-17-2020 06:38 PM
Closest output profile to Kobo Forma in "Convert Book" dialog is "Kobo Reader" but.. droopy Devices 6 10-13-2019 10:52 PM
Order of custom fields in "Edit Metadata" form barlowrm Calibre 14 11-19-2016 08:42 PM
"Read Y/N" dialog handling anadem Library Management 10 09-26-2014 01:49 AM
How to add Languages to the "Edit Metadata" UI dialog AlBrown Library Management 3 08-01-2013 03:15 PM


All times are GMT -4. The time now is 04:02 PM.


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