02-13-2013, 03:32 PM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jan 2013
Location: Marseille, France
Device: KOBO TOUCH
|
beginner question
Hi,
I am writing a plugin but I missed a point, how to add a books from a file on disk to the Calibre library? This should be very obvious for many people, but I dont find how to do it in the Plugin API doc. If somebody could point to me an short source example, or the place where it is in the doc, I would be very grateful. Bye |
02-13-2013, 10:34 PM | #2 |
creator of calibre
Posts: 43,748
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to get a database object and use one of the methods on that. Look in database2.py for the interface to the database. And assuming you are writing an interface action plugin, you get the database by self.gui.current_db
|
Advert | |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
beginner question | Pogzy | Plugins | 1 | 02-05-2013 04:54 PM |
PRS-T1 Beginner Question re: compatibility | jeolive | Sony Reader | 15 | 01-18-2013 05:02 AM |
Hi all...beginner question about Preferences... | newnookie | Introduce Yourself | 4 | 06-20-2011 08:15 AM |
Simple edit/replace question from beginner | JustinD | Sigil | 6 | 03-20-2011 11:48 AM |
Calibre Beginner Question | GonnaTri | Calibre | 0 | 06-07-2010 01:50 PM |