10-19-2015, 04:12 PM | #1 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Question: Coping books between libraries from a plugin
Hi,
I would like to copy/move a book (with all the colum/custom column which apply) from the current library to another library when I'm inside a plugin. Is there any specific way to do this which doesn't involve sql sentences? Thank you very much Last edited by Terisa de morgan; 10-19-2015 at 04:24 PM. |
10-19-2015, 10:52 PM | #2 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look at the code in actions/copy_to_library.py that will give you an example. Of course that has many bells and whistles like progress bar, duplicate detection etc. which you probably dont need.
|
Advert | |
|
10-20-2015, 12:46 AM | #3 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Thank you very much, no problem with bells and whistles (yes, I don't need them but it can be useful at some moment) and this is exactly what I need.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reading Lists plugin and Virtual Libraries | dustyp | Calibre | 3 | 11-22-2014 05:21 AM |
Python Libraries included in Plugin? | JimmXinu | Development | 5 | 06-15-2014 06:48 AM |
Switching libraries question | BAD18 | Library Management | 1 | 04-19-2013 10:45 AM |
Specifying a default search when switching libraries from a plugin | kiwidude | Development | 9 | 04-11-2011 11:55 AM |
Coping with old books | Iain | Workshop | 10 | 09-21-2010 09:12 AM |