|
|
#1 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
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 05:24 PM. |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,664
Karma: 28549046
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 | |
|
|
|
|
#3 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
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 06:21 AM |
| Python Libraries included in Plugin? | JimmXinu | Development | 5 | 06-15-2014 07:48 AM |
| Switching libraries question | BAD18 | Library Management | 1 | 04-19-2013 11:45 AM |
| Specifying a default search when switching libraries from a plugin | kiwidude | Development | 9 | 04-11-2011 12:55 PM |
| Coping with old books | Iain | Workshop | 10 | 09-21-2010 10:12 AM |