Implement #2418 (Programmatic auto-numbering of books in a series)

This commit is contained in:
Kovid Goyal 2010-04-10 09:15:44 +05:30
parent 95afd9e3bf
commit cde0d3f5e6
5 changed files with 30 additions and 9 deletions

View File

@ -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
<a href="http://news.calibre-ebook.com/periodical/living-digital">calibre
Periodicals</a>.
'''
language = 'en_IN'

View File

@ -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, <a
href="http://news.calibre-ebook.com/periodical/pc-quest-india">calibre
Periodicals</a>.
'''
language = 'en_IN'

View File

@ -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)

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>495</width>
<height>456</height>
<height>468</height>
</rect>
</property>
<property name="windowTitle">
@ -219,7 +219,7 @@
</property>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Remove &amp;format:</string>
@ -229,7 +229,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<widget class="QComboBox" name="remove_format"/>
</item>
<item row="0" column="1">
@ -239,13 +239,26 @@
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<item row="10" column="0" colspan="2">
<widget class="QCheckBox" name="swap_title_and_author">
<property name="text">
<string>&amp;Swap title and author</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QCheckBox" name="autonumber_series">
<property name="toolTip">
<string>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.</string>
</property>
<property name="text">
<string>Automatically number books in this series</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View File

@ -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|?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~