Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-13-2013, 03:32 PM   #1
Pogzy
Junior Member
Pogzy began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jan 2013
Location: Marseille, France
Device: KOBO TOUCH
Unhappy 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
Pogzy is offline   Reply With Quote
Old 02-13-2013, 10:34 PM   #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: 25,427
Karma: 4961459
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
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 09:53 PM.


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