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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-13-2012, 12:07 AM   #1
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 411867
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
Pop Edit Metadata for New Book Created in Plugin?

I could use some advice.

I'm working on a plugin to merge epubs from existing books into a new epub in a new book. At the end, I'd like the plugin to automatically pop the 'Edit Metadata' dialog for the newly created book.

Near as I can tell, I have to get the new book selected in the main book list, then invoke edit_metadata on the metadata action. But I've had no luck figuring out how to select a row from the book_id.
Code:
book_id = db.create_book_entry(mi,add_duplicates=True)
# ...
self.gui.library_view.model().books_added(1)

self.gui.library_view.selectionModel().clearSelection()                
self.gui.library_view.selectionModel().select(???)

self.gui.iactions['Edit Metadata'].edit_metadata(False)
Any suggestions?

Thanks,
Jim
JimmXinu is offline   Reply With Quote
Old 02-13-2012, 12:49 AM   #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,397
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the select_rows() method. self.library_view.select_rows(ids). See the definition for select_rows() for more info in library/views.py
kovidgoyal is online now   Reply With Quote
Old 02-13-2012, 01:24 AM   #3
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,587
Karma: 411867
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
Perfect. Thanks, Kovid.

Jim
JimmXinu 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
Plugin for Edit Metadata kcart1 Calibre 1 01-18-2012 01:07 PM
This Possible: Plugin to check downloaded metadata vs book itself collin8579 Plugins 0 08-19-2011 04:59 PM
Delete book from edit Metadata? crazyken Library Management 2 08-04-2011 02:41 AM
[Metadata Download Plugin] Goodreads Metadata **Deprecated** kiwidude Plugins 30 04-23-2011 02:10 PM
Wish to edit ebook created by Calibre in Dreamweaver CS5 purcelljf Calibre 1 08-08-2010 11:18 PM


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


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