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 08-16-2018, 01:42 PM   #1
wrench100
Member
wrench100 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2018
Device: Kindle
How to use a format map with remove_formats

I'm trying to remove epub conversions from selected books. I've created a list of ID's using

ids=list(map(self.gui.library_view.model().id,rows ))

The docs for remove_formats says that I need to pass it "a mapping of book_id to a list of formats" but I have no idea how to do that.

Thanks!
wrench100 is offline   Reply With Quote
Old 08-16-2018, 08:01 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 15,278
Karma: 24761108
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE, Clara HD
Looking at the definition of "remove_formats", you need a dictionary where the keys are the ids of the books and the values are lists of the formats you want to remove.
davidfor is offline   Reply With Quote
Advert
Old 08-17-2018, 12:39 AM   #3
wrench100
Member
wrench100 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2018
Device: Kindle
Okay that makes sense. Thank you!
wrench100 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
Literature-map.com jbcohen Reading Recommendations 3 03-16-2012 09:15 AM
Needing a map. Spock96 Lounge 3 12-09-2011 10:05 AM
Need a road map illustrata Sigil 6 04-25-2011 09:39 AM
New MAP function? Wetdogeared Feedback 2 03-03-2010 08:11 AM
Map help needed Nate the great Workshop 6 04-22-2009 08:06 AM


All times are GMT -4. The time now is 12:06 AM.


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