GwR fixed colon bug in NumberTranslate

This commit is contained in:
GRiker 2010-01-22 13:17:06 -07:00
parent 636cfbb769
commit bd39c9edb4
2 changed files with 4 additions and 150 deletions

View File

@ -13,153 +13,6 @@
<property name="windowTitle">
<string>Form</string>
</property>
<<<<<<< TREE
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>70</y>
<width>241</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Tags to exclude as genres (regex):</string>
</property>
<property name="textFormat">
<enum>Qt::LogText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>241</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>'Don't include this book' tag:</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>20</x>
<y>160</y>
<width>171</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Additional note tag prefix:</string>
</property>
</widget>
<widget class="QLineEdit" name="exclude_genre">
<property name="geometry">
<rect>
<x>300</x>
<y>70</y>
<width>231</width>
<height>22</height>
</rect>
</property>
<property name="toolTip">
<string extracomment="Tooltip comment here"/>
</property>
<property name="text">
<string>\[[\w ]*\]</string>
</property>
</widget>
<widget class="QLineEdit" name="exclude_tags">
<property name="geometry">
<rect>
<x>300</x>
<y>100</y>
<width>231</width>
<height>22</height>
</rect>
</property>
<property name="toolTip">
<string extracomment="Tooltip comment here"/>
</property>
<property name="text">
<string>~</string>
</property>
</widget>
<widget class="QLineEdit" name="read_tag">
<property name="geometry">
<rect>
<x>300</x>
<y>130</y>
<width>231</width>
<height>22</height>
</rect>
</property>
<property name="toolTip">
<string extracomment="Tooltip comment here"/>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>241</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>'Mark this book as read' tag:</string>
</property>
</widget>
<widget class="QLineEdit" name="note_tag">
<property name="geometry">
<rect>
<x>300</x>
<y>160</y>
<width>231</width>
<height>22</height>
</rect>
</property>
<property name="toolTip">
<string extracomment="Tooltip comment here"/>
</property>
<property name="text">
<string>*</string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>61</x>
<y>20</y>
<width>461</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Special Tags for Catalog Creation</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
=======
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
@ -237,7 +90,6 @@
</widget>
</item>
</layout>
>>>>>>> MERGE-SOURCE
</widget>
<resources/>
<connections/>

View File

@ -375,7 +375,10 @@ class EPUB_MOBI(CatalogPlugin):
self.text = ''.join(result)
else:
number = int(self.number)
try:
number = int(self.number)
except:
return
if number > 1000000:
self.text = "%d out of range" % number
@ -2449,7 +2452,6 @@ class EPUB_MOBI(CatalogPlugin):
for (i,word) in enumerate(title_words):
hit = re.search('[0-9]+',word)
if hit :
print "library.catalog:CatalogBuilder.generateSortTitle(): translating '%s'" % word
translated.append(EPUB_MOBI.NumberToText(word).text)
else:
translated.append(word)