View Single Post
Old 01-04-2016, 03:59 AM   #1
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Losin in python: Passing info between different instances of a class

Hi,

I'm trying to finish a plugin to store the filename into a library column when a book is added to calibre. I've been able to define a costum colum (by hand, not getting info from calibre library but...), and getting the filename and the metadata. Problem is, I've got to pass this info between instances, as the name must be caught before adding it to the library and the column must be updated after the book has been added (onimport and postimport).

In theory, if I used a class variable (dictionary) this should be easy but it doesn't work for me and I don't know enough python to find the problem. The dictionary is fulfilled on import, but it is empty at post import. Any idea would be welcome, thank you.
Terisa de morgan is offline   Reply With Quote