From cde0d3f5e601e33fd0a3a0c76fb78837c3689b68 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 10 Apr 2010 09:15:44 +0530 Subject: [PATCH] Implement #2418 (Programmatic auto-numbering of books in a series) --- resources/recipes/living_digital.recipe | 4 +++- resources/recipes/pc_quest_india.recipe | 4 +++- src/calibre/gui2/dialogs/metadata_bulk.py | 8 ++++++-- src/calibre/gui2/dialogs/metadata_bulk.ui | 21 +++++++++++++++++---- src/calibre/manual/faq.rst | 2 +- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/resources/recipes/living_digital.recipe b/resources/recipes/living_digital.recipe index d8bba7b9f8..2fcf50dfab 100644 --- a/resources/recipes/living_digital.recipe +++ b/resources/recipes/living_digital.recipe @@ -9,6 +9,8 @@ class LivingDigital(CalibrePeriodical): Catch the latest buzz in the digital world with Living Digital. Enjoy reviews, news, features and recommendations on a wide range of consumer technology products - from smartphones to flat panel TVs, netbooks to - cameras, and many more consumer lifestyle gadgets. + cameras, and many more consumer lifestyle gadgets. To subscribe, visit + calibre + Periodicals. ''' language = 'en_IN' diff --git a/resources/recipes/pc_quest_india.recipe b/resources/recipes/pc_quest_india.recipe index 3528731d47..e45272a2df 100644 --- a/resources/recipes/pc_quest_india.recipe +++ b/resources/recipes/pc_quest_india.recipe @@ -9,6 +9,8 @@ class PCQ(CalibrePeriodical): Buying a tech product? Seeking a tech solution? Consult PCQuest, India's market-leading selection and implementation guide for the latest technologies: servers, business apps, security, open source, gadgets and - more. + more. To subscribe visit, calibre + Periodicals. ''' language = 'en_IN' diff --git a/src/calibre/gui2/dialogs/metadata_bulk.py b/src/calibre/gui2/dialogs/metadata_bulk.py index a785dc0850..cace547dda 100644 --- a/src/calibre/gui2/dialogs/metadata_bulk.py +++ b/src/calibre/gui2/dialogs/metadata_bulk.py @@ -18,7 +18,7 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog): Ui_MetadataBulkDialog.__init__(self) self.setupUi(self) self.db = db - self.ids = [ db.id(r) for r in rows] + self.ids = [db.id(r) for r in rows] self.write_series = False self.changed = False QObject.connect(self.button_box, SIGNAL("accepted()"), self.sync) @@ -111,7 +111,11 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog): tags = map(lambda x: x.strip(), tags.split(',')) self.db.set_tags(id, tags, append=True, notify=False) if self.write_series: - self.db.set_series(id, unicode(self.series.currentText()), notify=False) + series = unicode(self.series.currentText()).strip() + next = self.db.get_next_series_num_for(series) + self.db.set_series(id, series, notify=False) + num = next if self.autonumber_series.isChecked() and series else 1.0 + self.db.set_series_index(id, num, notify=False) if self.remove_format.currentIndex() > -1: self.db.remove_format(id, unicode(self.remove_format.currentText()), index_is_id=True, notify=False) diff --git a/src/calibre/gui2/dialogs/metadata_bulk.ui b/src/calibre/gui2/dialogs/metadata_bulk.ui index 1a38568b60..01b5fc0adb 100644 --- a/src/calibre/gui2/dialogs/metadata_bulk.ui +++ b/src/calibre/gui2/dialogs/metadata_bulk.ui @@ -7,7 +7,7 @@ 0 0 495 - 456 + 468 @@ -219,7 +219,7 @@ - + Remove &format: @@ -229,7 +229,7 @@ - + @@ -239,13 +239,26 @@ - + &Swap title and author + + + + Selected books will be automatically numbered, +in the order you selected them. +So if you selected Book A and then Book B, +Book A will have series number 1 and Book B series number 2. + + + Automatically number books in this series + + + diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index c38f4f1d23..b1cbaa1dae 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -81,7 +81,7 @@ Device Integration What devices does |app| support? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -At the moment |app| has full support for the SONY PRS 300/500/505/600/700/900, Barnes & Noble Nook, Cybook Gen 3/Opus, Amazon Kindle 1/2/DX, Longshine ShineBook, Ectaco Jetbook, BeBook/BeBook Mini, Irex Illiad/DR1000, Foxit eSlick, PocketBook 360, Italica, eClicto, Iriver Story, Airis dBook, Hanvon N515, Binatone Readme, Teclast K3, various Android phones and the iPhone. In addition, using the :guilabel:`Save to disk` function you can use it with any ebook reader that exports itself as a USB disk. +At the moment |app| has full support for the SONY PRS 300/500/505/600/700/900, Barnes & Noble Nook, Cybook Gen 3/Opus, Amazon Kindle 1/2/DX, Entourage Edge, Longshine ShineBook, Ectaco Jetbook, BeBook/BeBook Mini, Irex Illiad/DR1000, Foxit eSlick, PocketBook 360, Italica, eClicto, Iriver Story, Airis dBook, Hanvon N515, Binatone Readme, Teclast K3, various Android phones and the iPhone. In addition, using the :guilabel:`Save to disk` function you can use it with any ebook reader that exports itself as a USB disk. How can I help get my device supported in |app|? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~