Store: Fix google books leaving out some books. Add meta info to store plugins.

This commit is contained in:
John Schember 2011-05-21 22:12:00 -04:00
parent 8ae27a865f
commit bc8ea972e3
2 changed files with 112 additions and 1 deletions

View File

@ -1108,144 +1108,255 @@ class StoreAmazonKindleStore(StoreBase):
name = 'Amazon Kindle' name = 'Amazon Kindle'
description = _('Kindle books from Amazon.') description = _('Kindle books from Amazon.')
actual_plugin = 'calibre.gui2.store.amazon_plugin:AmazonKindleStore' actual_plugin = 'calibre.gui2.store.amazon_plugin:AmazonKindleStore'
drm_free_only = False
location = 'US'
formats = ['KINDLE']
class StoreAmazonDEKindleStore(StoreBase): class StoreAmazonDEKindleStore(StoreBase):
name = 'Amazon DE Kindle' name = 'Amazon DE Kindle'
description = _('Kindle books from Amazon.de.') description = _('Kindle books from Amazon.de.')
actual_plugin = 'calibre.gui2.store.amazon_de_plugin:AmazonDEKindleStore' actual_plugin = 'calibre.gui2.store.amazon_de_plugin:AmazonDEKindleStore'
drm_free_only = False
location = 'DE'
formats = ['KINDLE']
class StoreAmazonUKKindleStore(StoreBase): class StoreAmazonUKKindleStore(StoreBase):
name = 'Amazon UK Kindle' name = 'Amazon UK Kindle'
description = _('Kindle books from Amazon.uk.') description = _('Kindle books from Amazon.uk.')
actual_plugin = 'calibre.gui2.store.amazon_uk_plugin:AmazonUKKindleStore' actual_plugin = 'calibre.gui2.store.amazon_uk_plugin:AmazonUKKindleStore'
drm_free_only = False
location = 'UK'
formats = ['KINDLE']
class StoreArchiveOrgStore(StoreBase): class StoreArchiveOrgStore(StoreBase):
name = 'Archive.org' name = 'Archive.org'
description = _('Free Books : Download & Streaming : Ebook and Texts Archive : Internet Archive.') description = _('Free Books : Download & Streaming : Ebook and Texts Archive : Internet Archive.')
actual_plugin = 'calibre.gui2.store.archive_org_plugin:ArchiveOrgStore' actual_plugin = 'calibre.gui2.store.archive_org_plugin:ArchiveOrgStore'
drm_free_only = True
location = 'US'
formats = ['DAISY', 'DJVU', 'EPUB', 'MOBI', 'PDF', 'TXT']
class StoreBaenWebScriptionStore(StoreBase): class StoreBaenWebScriptionStore(StoreBase):
name = 'Baen WebScription' name = 'Baen WebScription'
description = _('Ebooks for readers.') description = _('Ebooks for readers.')
actual_plugin = 'calibre.gui2.store.baen_webscription_plugin:BaenWebScriptionStore' actual_plugin = 'calibre.gui2.store.baen_webscription_plugin:BaenWebScriptionStore'
drm_free_only = True
location = 'US'
formats = ['EPUB', 'LIT', 'LRF', 'MOBI', 'RB', 'RTF', 'ZIP']
class StoreBNStore(StoreBase): class StoreBNStore(StoreBase):
name = 'Barnes and Noble' name = 'Barnes and Noble'
description = _('Books, Textbooks, eBooks, Toys, Games and More.') description = _('Books, Textbooks, eBooks, Toys, Games and More.')
actual_plugin = 'calibre.gui2.store.bn_plugin:BNStore' actual_plugin = 'calibre.gui2.store.bn_plugin:BNStore'
drm_free_only = False
location = 'US'
formats = ['NOOK']
class StoreBeamEBooksDEStore(StoreBase): class StoreBeamEBooksDEStore(StoreBase):
name = 'Beam EBooks DE' name = 'Beam EBooks DE'
description = _('Der eBook Shop.') description = _('Der eBook Shop.')
actual_plugin = 'calibre.gui2.store.beam_ebooks_de_plugin:BeamEBooksDEStore' actual_plugin = 'calibre.gui2.store.beam_ebooks_de_plugin:BeamEBooksDEStore'
drm_free_only = False
location = 'DE'
formats = ['MOBI', 'PDF']
class StoreBeWriteStore(StoreBase): class StoreBeWriteStore(StoreBase):
name = 'BeWrite Books' name = 'BeWrite Books'
description = _('Publishers of fine books.') description = _('Publishers of fine books.')
actual_plugin = 'calibre.gui2.store.bewrite_plugin:BeWriteStore' actual_plugin = 'calibre.gui2.store.bewrite_plugin:BeWriteStore'
drm_free_only = True
location = 'US'
formats = ['EPUB', 'MOBI', 'PDF']
class StoreDieselEbooksStore(StoreBase): class StoreDieselEbooksStore(StoreBase):
name = 'Diesel eBooks' name = 'Diesel eBooks'
description = _('World Famous eBook Store.') description = _('World Famous eBook Store.')
actual_plugin = 'calibre.gui2.store.diesel_ebooks_plugin:DieselEbooksStore' actual_plugin = 'calibre.gui2.store.diesel_ebooks_plugin:DieselEbooksStore'
drm_free_only = False
location = 'US'
formats = ['EPUB', 'PDF']
class StoreEbookscomStore(StoreBase): class StoreEbookscomStore(StoreBase):
name = 'eBooks.com' name = 'eBooks.com'
description = _('The digital bookstore.') description = _('The digital bookstore.')
actual_plugin = 'calibre.gui2.store.ebooks_com_plugin:EbookscomStore' actual_plugin = 'calibre.gui2.store.ebooks_com_plugin:EbookscomStore'
drm_free_only = False
location = 'US'
formats = ['EPUB', 'LIT', 'MOBI', 'PDF']
class StoreEPubBuyDEStore(StoreBase): class StoreEPubBuyDEStore(StoreBase):
name = 'EPUBBuy DE' name = 'EPUBBuy DE'
description = _('EPUBReaders eBook Shop.') description = _('EPUBReaders eBook Shop.')
actual_plugin = 'calibre.gui2.store.epubbuy_de_plugin:EPubBuyDEStore' actual_plugin = 'calibre.gui2.store.epubbuy_de_plugin:EPubBuyDEStore'
drm_free_only = True
location = 'DE'
formats = ['EPUB']
class StoreEHarlequinStore(StoreBase): class StoreEHarlequinStore(StoreBase):
name = 'eHarlequin' name = 'eHarlequin'
description = _('Entertain, enrich, inspire.') description = _('Entertain, enrich, inspire.')
actual_plugin = 'calibre.gui2.store.eharlequin_plugin:EHarlequinStore' actual_plugin = 'calibre.gui2.store.eharlequin_plugin:EHarlequinStore'
drm_free_only = False
location = 'US'
formats = ['EPUB', 'PDF']
class StoreFeedbooksStore(StoreBase): class StoreFeedbooksStore(StoreBase):
name = 'Feedbooks' name = 'Feedbooks'
description = _('Read anywhere.') description = _('Read anywhere.')
actual_plugin = 'calibre.gui2.store.feedbooks_plugin:FeedbooksStore' actual_plugin = 'calibre.gui2.store.feedbooks_plugin:FeedbooksStore'
drm_free_only = False
location = 'FR'
formats = ['EPUB', 'MOBI', 'PDF']
class StoreFoylesUKStore(StoreBase): class StoreFoylesUKStore(StoreBase):
name = 'Foyles UK' name = 'Foyles UK'
description = _('Foyles of London, online.') description = _('Foyles of London, online.')
actual_plugin = 'calibre.gui2.store.foyles_uk_plugin:FoylesUKStore' actual_plugin = 'calibre.gui2.store.foyles_uk_plugin:FoylesUKStore'
drm_free_only = False
location = 'UK'
formats = ['EPUB', 'PDF']
class StoreGandalfStore(StoreBase): class StoreGandalfStore(StoreBase):
name = 'Gandalf' name = 'Gandalf'
author = 'Tomasz Długosz' author = 'Tomasz Długosz'
description = _('Zaczarowany świat książek') description = _('Zaczarowany świat książek')
actual_plugin = 'calibre.gui2.store.gandalf_plugin:GandalfStore' actual_plugin = 'calibre.gui2.store.gandalf_plugin:GandalfStore'
drm_free_only = False
location = 'PL'
formats = ['EPUB', 'PDF']
class StoreGoogleBooksStore(StoreBase): class StoreGoogleBooksStore(StoreBase):
name = 'Google Books' name = 'Google Books'
description = _('Google Books') description = _('Google Books')
actual_plugin = 'calibre.gui2.store.google_books_plugin:GoogleBooksStore' actual_plugin = 'calibre.gui2.store.google_books_plugin:GoogleBooksStore'
drm_free_only = False
location = 'US'
formats = ['EPUB', 'PDF', 'TXT']
class StoreGutenbergStore(StoreBase): class StoreGutenbergStore(StoreBase):
name = 'Project Gutenberg' name = 'Project Gutenberg'
description = _('The first producer of free ebooks.') description = _('The first producer of free ebooks.')
actual_plugin = 'calibre.gui2.store.gutenberg_plugin:GutenbergStore' actual_plugin = 'calibre.gui2.store.gutenberg_plugin:GutenbergStore'
drm_free_only = True
location = 'US'
formats = ['EPUB', 'HTML', 'MOBI', 'PDB', 'TXT']
class StoreKoboStore(StoreBase): class StoreKoboStore(StoreBase):
name = 'Kobo' name = 'Kobo'
description = _('eReading: anytime. anyplace.') description = _('eReading: anytime. anyplace.')
actual_plugin = 'calibre.gui2.store.kobo_plugin:KoboStore' actual_plugin = 'calibre.gui2.store.kobo_plugin:KoboStore'
drm_free_only = False
location = 'US'
formats = ['EPUB']
class StoreManyBooksStore(StoreBase): class StoreManyBooksStore(StoreBase):
name = 'ManyBooks' name = 'ManyBooks'
description = _('The best ebooks at the best price: free!') description = _('The best ebooks at the best price: free!')
actual_plugin = 'calibre.gui2.store.manybooks_plugin:ManyBooksStore' actual_plugin = 'calibre.gui2.store.manybooks_plugin:ManyBooksStore'
drm_free_only = True
location = 'US'
formats = ['EPUB', 'FB2', 'JAR', 'LIT', 'LRF', 'MOBI', 'PDB', 'PDF', 'RB', 'RTF', 'TCR', 'TXT', 'ZIP']
class StoreMobileReadStore(StoreBase): class StoreMobileReadStore(StoreBase):
name = 'MobileRead' name = 'MobileRead'
description = _('Ebooks handcrafted with the utmost care.') description = _('Ebooks handcrafted with the utmost care.')
actual_plugin = 'calibre.gui2.store.mobileread.mobileread_plugin:MobileReadStore' actual_plugin = 'calibre.gui2.store.mobileread.mobileread_plugin:MobileReadStore'
drm_free_only = True
location = 'CH'
formats = ['EPUB', 'IMP', 'LRF', 'LIT', 'MOBI', 'PDF']
class StoreNextoStore(StoreBase): class StoreNextoStore(StoreBase):
name = 'Nexto' name = 'Nexto'
author = 'Tomasz Długosz' author = 'Tomasz Długosz'
description = _('Audiobooki mp3, ebooki, prasa - księgarnia internetowa.') description = _('Audiobooki mp3, ebooki, prasa - księgarnia internetowa.')
actual_plugin = 'calibre.gui2.store.nexto_plugin:NextoStore' actual_plugin = 'calibre.gui2.store.nexto_plugin:NextoStore'
drm_free_only = False
location = 'PL'
formats = ['EPUB', 'PDF']
class StoreOpenLibraryStore(StoreBase): class StoreOpenLibraryStore(StoreBase):
name = 'Open Library' name = 'Open Library'
description = _('One web page for every book.') description = _('One web page for every book.')
actual_plugin = 'calibre.gui2.store.open_library_plugin:OpenLibraryStore' actual_plugin = 'calibre.gui2.store.open_library_plugin:OpenLibraryStore'
drm_free_only = True
location = ['US']
formats = ['DAISY', 'DJVU', 'EPUB', 'MOBI', 'PDF', 'TXT']
class StoreOReillyStore(StoreBase): class StoreOReillyStore(StoreBase):
name = 'OReilly' name = 'OReilly'
description = _('DRM-Free tech ebooks.') description = _('DRM-Free tech ebooks.')
actual_plugin = 'calibre.gui2.store.oreilly_plugin:OReillyStore' actual_plugin = 'calibre.gui2.store.oreilly_plugin:OReillyStore'
drm_free_only = True
location = 'US'
formats = ['APK', 'DAISY', 'EPUB', 'MOBI', 'PDF']
class StorePragmaticBookshelfStore(StoreBase): class StorePragmaticBookshelfStore(StoreBase):
name = 'Pragmatic Bookshelf' name = 'Pragmatic Bookshelf'
description = _('The Pragmatic Bookshelf') description = _('The Pragmatic Bookshelf')
actual_plugin = 'calibre.gui2.store.pragmatic_bookshelf_plugin:PragmaticBookshelfStore' actual_plugin = 'calibre.gui2.store.pragmatic_bookshelf_plugin:PragmaticBookshelfStore'
drm_free_only = True
location = 'US'
formats = ['EPUB', 'MOBI', 'PDF']
class StoreSmashwordsStore(StoreBase): class StoreSmashwordsStore(StoreBase):
name = 'Smashwords' name = 'Smashwords'
description = _('Your ebook. Your way.') description = _('Your ebook. Your way.')
actual_plugin = 'calibre.gui2.store.smashwords_plugin:SmashwordsStore' actual_plugin = 'calibre.gui2.store.smashwords_plugin:SmashwordsStore'
drm_free_only = True
location = 'US'
formats = ['EPUB', 'HTML', 'LRF', 'MOBI', 'PDB', 'RTF', 'TXT']
class StoreWaterstonesUKStore(StoreBase): class StoreWaterstonesUKStore(StoreBase):
name = 'Waterstones UK' name = 'Waterstones UK'
description = _('Feel every word.') description = _('Feel every word.')
actual_plugin = 'calibre.gui2.store.waterstones_uk_plugin:WaterstonesUKStore' actual_plugin = 'calibre.gui2.store.waterstones_uk_plugin:WaterstonesUKStore'
drm_free_only = False
location = 'UK'
formats = ['EPUB', 'PDF']
class StoreWeightlessBooksStore(StoreBase): class StoreWeightlessBooksStore(StoreBase):
name = 'Weightless Books' name = 'Weightless Books'
description = '(e)Books That Don\'t Weigh You Down.' description = '(e)Books That Don\'t Weigh You Down.'
actual_plugin = 'calibre.gui2.store.weightless_books_plugin:WeightlessBooksStore' actual_plugin = 'calibre.gui2.store.weightless_books_plugin:WeightlessBooksStore'
drm_free_only = True
location = 'US'
formats = ['EPUB', 'HTML', 'LIT', 'MOBI', 'PDF']
class StoreWizardsTowerBooksStore(StoreBase): class StoreWizardsTowerBooksStore(StoreBase):
name = 'Wizards Tower Books' name = 'Wizards Tower Books'
description = 'Wizard\'s Tower Press.' description = 'Wizard\'s Tower Press.'
actual_plugin = 'calibre.gui2.store.wizards_tower_books_plugin:WizardsTowerBooksStore' actual_plugin = 'calibre.gui2.store.wizards_tower_books_plugin:WizardsTowerBooksStore'
drm_free_only = True
location = 'UK'
formats = ['EPUB', 'MOBI']
plugins += [ plugins += [
StoreArchiveOrgStore, StoreArchiveOrgStore,

View File

@ -51,7 +51,7 @@ class GoogleBooksStore(BasicStoreConfig, StorePlugin):
title = ''.join(data.xpath('.//h3/a//text()')) title = ''.join(data.xpath('.//h3/a//text()'))
authors = data.xpath('.//span[@class="gl"]//a//text()') authors = data.xpath('.//span[@class="gl"]//a//text()')
if authors[-1].strip().lower() == 'preview': if authors[-1].strip().lower() in ('preview', 'read'):
authors = authors[:-1] authors = authors[:-1]
else: else:
continue continue