mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Show 'Starting conversion' message when the conversions are actually about to start rather then when the convert dialog is opened
This commit is contained in:
parent
f65ad82c26
commit
a41ee9f6f2
@ -1194,16 +1194,23 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
previous = self.library_view.currentIndex()
|
previous = self.library_view.currentIndex()
|
||||||
rows = [x.row() for x in \
|
rows = [x.row() for x in \
|
||||||
self.library_view.selectionModel().selectedRows()]
|
self.library_view.selectionModel().selectedRows()]
|
||||||
|
num = 0
|
||||||
if bulk or (bulk is None and len(book_ids) > 1):
|
if bulk or (bulk is None and len(book_ids) > 1):
|
||||||
self.__bulk_queue = convert_bulk_ebook(self, self.queue_convert_jobs,
|
self.__bulk_queue = convert_bulk_ebook(self, self.queue_convert_jobs,
|
||||||
self.library_view.model().db, book_ids,
|
self.library_view.model().db, book_ids,
|
||||||
out_format=prefs['output_format'], args=(rows, previous,
|
out_format=prefs['output_format'], args=(rows, previous,
|
||||||
self.book_converted))
|
self.book_converted))
|
||||||
|
num = len(self.__bulk_queue.book_ids)
|
||||||
else:
|
else:
|
||||||
jobs, changed, bad = convert_single_ebook(self,
|
jobs, changed, bad = convert_single_ebook(self,
|
||||||
self.library_view.model().db, book_ids, out_format=prefs['output_format'])
|
self.library_view.model().db, book_ids, out_format=prefs['output_format'])
|
||||||
self.queue_convert_jobs(jobs, changed, bad, rows, previous,
|
self.queue_convert_jobs(jobs, changed, bad, rows, previous,
|
||||||
self.book_converted)
|
self.book_converted)
|
||||||
|
num = len(jobs)
|
||||||
|
|
||||||
|
if num > 0:
|
||||||
|
self.status_bar.showMessage(_('Starting conversion of %d book(s)') %
|
||||||
|
num, 2000)
|
||||||
|
|
||||||
def queue_convert_jobs(self, jobs, changed, bad, rows, previous,
|
def queue_convert_jobs(self, jobs, changed, bad, rows, previous,
|
||||||
converted_func, extra_job_args=[]):
|
converted_func, extra_job_args=[]):
|
||||||
|
@ -31,7 +31,6 @@ def convert_single_ebook(parent, db, book_ids, auto_conversion=False, out_format
|
|||||||
total = len(book_ids)
|
total = len(book_ids)
|
||||||
if total == 0:
|
if total == 0:
|
||||||
return None, None, None
|
return None, None, None
|
||||||
parent.status_bar.showMessage(_('Starting conversion of %d books') % total, 2000)
|
|
||||||
|
|
||||||
for i, book_id in enumerate(book_ids):
|
for i, book_id in enumerate(book_ids):
|
||||||
temp_files = []
|
temp_files = []
|
||||||
@ -103,7 +102,6 @@ def convert_bulk_ebook(parent, queue, db, book_ids, out_format=None, args=[]):
|
|||||||
total = len(book_ids)
|
total = len(book_ids)
|
||||||
if total == 0:
|
if total == 0:
|
||||||
return None, None, None
|
return None, None, None
|
||||||
parent.status_bar.showMessage(_('Starting conversion of %d books') % total, 2000)
|
|
||||||
|
|
||||||
d = BulkConfig(parent, db, out_format)
|
d = BulkConfig(parent, db, out_format)
|
||||||
if d.exec_() != QDialog.Accepted:
|
if d.exec_() != QDialog.Accepted:
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: calibre 0.6.14\n"
|
"Project-Id-Version: calibre 0.6.14\n"
|
||||||
"POT-Creation-Date: 2009-09-28 17:09+MDT\n"
|
"POT-Creation-Date: 2009-10-01 14:21+MDT\n"
|
||||||
"PO-Revision-Date: 2009-09-28 17:09+MDT\n"
|
"PO-Revision-Date: 2009-10-01 14:21+MDT\n"
|
||||||
"Last-Translator: Automatically generated\n"
|
"Last-Translator: Automatically generated\n"
|
||||||
"Language-Team: LANGUAGE\n"
|
"Language-Team: LANGUAGE\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -2581,7 +2581,7 @@ msgid "RB Output"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:76
|
#: /home/kovid/work/calibre/src/calibre/gui2/convert/regex_builder.py:76
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1322
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1329
|
||||||
msgid "Choose the format to view"
|
msgid "Choose the format to view"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -4691,7 +4691,7 @@ msgid "Save to disk in a single directory"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:280
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:280
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1424
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1431
|
||||||
msgid "Save only %s format to disk"
|
msgid "Save only %s format to disk"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -4731,7 +4731,7 @@ msgid "Calibre Library"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:438
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:438
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1567
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1574
|
||||||
msgid "Choose a location for your ebook library."
|
msgid "Choose a location for your ebook library."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -4905,158 +4905,162 @@ msgstr ""
|
|||||||
msgid "Cannot convert"
|
msgid "Cannot convert"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1316
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1212
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1335
|
msgid "Starting conversion of %d book(s)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1323
|
||||||
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1342
|
||||||
msgid "No book selected"
|
msgid "No book selected"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1316
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1323
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1366
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1373
|
||||||
msgid "Cannot view"
|
msgid "Cannot view"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1334
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1341
|
||||||
msgid "Cannot open folder"
|
msgid "Cannot open folder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1351
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1358
|
||||||
msgid "Multiple Books Selected"
|
msgid "Multiple Books Selected"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1352
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1359
|
||||||
msgid "You are attempting to open %d books. Opening too many books at once can be slow and have a negative effect on the responsiveness of your computer. Once started the process cannot be stopped until complete. Do you wish to continue?"
|
msgid "You are attempting to open %d books. Opening too many books at once can be slow and have a negative effect on the responsiveness of your computer. Once started the process cannot be stopped until complete. Do you wish to continue?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1367
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1374
|
||||||
msgid "%s has no available formats."
|
msgid "%s has no available formats."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1408
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1415
|
||||||
msgid "Cannot configure"
|
msgid "Cannot configure"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1409
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1416
|
||||||
msgid "Cannot configure while there are running jobs."
|
msgid "Cannot configure while there are running jobs."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1452
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1459
|
||||||
msgid "No detailed info available"
|
msgid "No detailed info available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1453
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1460
|
||||||
msgid "No detailed information is available for books on the device."
|
msgid "No detailed information is available for books on the device."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1505
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1512
|
||||||
msgid "Error talking to device"
|
msgid "Error talking to device"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1506
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1513
|
||||||
msgid "There was a temporary error talking to the device. Please unplug and reconnect the device and or reboot."
|
msgid "There was a temporary error talking to the device. Please unplug and reconnect the device and or reboot."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1529
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1536
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1547
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1554
|
||||||
msgid "Conversion Error"
|
msgid "Conversion Error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1530
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1537
|
||||||
msgid "<p>Could not convert: %s<p>It is a <a href=\"%s\">DRM</a>ed book. You must first remove the DRM using third party tools."
|
msgid "<p>Could not convert: %s<p>It is a <a href=\"%s\">DRM</a>ed book. You must first remove the DRM using third party tools."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1548
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1555
|
||||||
msgid "<b>Failed</b>"
|
msgid "<b>Failed</b>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1576
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1583
|
||||||
msgid "Invalid library location"
|
msgid "Invalid library location"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1577
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1584
|
||||||
msgid "Could not access %s. Using %s as the library."
|
msgid "Could not access %s. Using %s as the library."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1624
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1631
|
||||||
msgid "is the result of the efforts of many volunteers from all over the world. If you find it useful, please consider donating to support its development."
|
msgid "is the result of the efforts of many volunteers from all over the world. If you find it useful, please consider donating to support its development."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1648
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1655
|
||||||
msgid "There are active jobs. Are you sure you want to quit?"
|
msgid "There are active jobs. Are you sure you want to quit?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1651
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1658
|
||||||
msgid ""
|
msgid ""
|
||||||
" is communicating with the device!<br>\n"
|
" is communicating with the device!<br>\n"
|
||||||
" Quitting may cause corruption on the device.<br>\n"
|
" Quitting may cause corruption on the device.<br>\n"
|
||||||
" Are you sure you want to quit?"
|
" Are you sure you want to quit?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1655
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1662
|
||||||
msgid "WARNING: Active jobs"
|
msgid "WARNING: Active jobs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1706
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1713
|
||||||
msgid "will keep running in the system tray. To close it, choose <b>Quit</b> in the context menu of the system tray."
|
msgid "will keep running in the system tray. To close it, choose <b>Quit</b> in the context menu of the system tray."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1725
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1732
|
||||||
msgid "<span style=\"color:red; font-weight:bold\">Latest version: <a href=\"%s\">%s</a></span>"
|
msgid "<span style=\"color:red; font-weight:bold\">Latest version: <a href=\"%s\">%s</a></span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1733
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1740
|
||||||
msgid "Update available"
|
msgid "Update available"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1734
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1741
|
||||||
msgid "%s has been updated to version %s. See the <a href=\"http://calibre.kovidgoyal.net/wiki/Changelog\">new features</a>. Visit the download page?"
|
msgid "%s has been updated to version %s. See the <a href=\"http://calibre.kovidgoyal.net/wiki/Changelog\">new features</a>. Visit the download page?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1752
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1759
|
||||||
msgid "Use the library located at the specified path."
|
msgid "Use the library located at the specified path."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1754
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1761
|
||||||
msgid "Start minimized to system tray."
|
msgid "Start minimized to system tray."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1756
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1763
|
||||||
msgid "Log debugging information to console"
|
msgid "Log debugging information to console"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1758
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1765
|
||||||
msgid "Do not check for updates"
|
msgid "Do not check for updates"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1806
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1813
|
||||||
msgid "If you are sure it is not running"
|
msgid "If you are sure it is not running"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1808
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1815
|
||||||
msgid "Cannot Start "
|
msgid "Cannot Start "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1809
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1816
|
||||||
msgid "%s is already running."
|
msgid "%s is already running."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1812
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1819
|
||||||
msgid "may be running in the system tray, in the"
|
msgid "may be running in the system tray, in the"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1814
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1821
|
||||||
msgid "upper right region of the screen."
|
msgid "upper right region of the screen."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1816
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1823
|
||||||
msgid "lower right region of the screen."
|
msgid "lower right region of the screen."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1819
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1826
|
||||||
msgid "try rebooting your computer."
|
msgid "try rebooting your computer."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1821
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1828
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1833
|
#: /home/kovid/work/calibre/src/calibre/gui2/main.py:1840
|
||||||
msgid "try deleting the file"
|
msgid "try deleting the file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -5242,47 +5246,42 @@ msgstr ""
|
|||||||
msgid "Publishers"
|
msgid "Publishers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:34
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:63
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:106
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:182
|
||||||
msgid "Starting conversion of %d books"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:64
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:184
|
|
||||||
msgid "Convert book %d of %d (%s)"
|
msgid "Convert book %d of %d (%s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:91
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:90
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:204
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:202
|
||||||
msgid "Could not convert some books"
|
msgid "Could not convert some books"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:92
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:91
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:205
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:203
|
||||||
msgid "Could not convert %d of %d books, because no suitable source format was found."
|
msgid "Could not convert %d of %d books, because no suitable source format was found."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:123
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:121
|
||||||
msgid "Queueing books for bulk conversion"
|
msgid "Queueing books for bulk conversion"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:183
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:181
|
||||||
msgid "Queueing "
|
msgid "Queueing "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:237
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:235
|
||||||
msgid "You must set a username and password for %s"
|
msgid "You must set a username and password for %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:242
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:240
|
||||||
msgid "Fetch news from "
|
msgid "Fetch news from "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:253
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:251
|
||||||
msgid "Convert existing"
|
msgid "Convert existing"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:254
|
#: /home/kovid/work/calibre/src/calibre/gui2/tools.py:252
|
||||||
msgid "The following books have already been converted to %s format. Do you wish to reconvert them?"
|
msgid "The following books have already been converted to %s format. Do you wish to reconvert them?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1,55 +1,55 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
'''
|
'''
|
||||||
honoluluadvertiser.com
|
honoluluadvertiser.com
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class Honoluluadvertiser(BasicNewsRecipe):
|
class Honoluluadvertiser(BasicNewsRecipe):
|
||||||
title = 'Honolulu Advertiser'
|
title = 'Honolulu Advertiser'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
description = "Latest national and local Hawaii sports news from The Honolulu Advertiser."
|
description = "Latest national and local Hawaii sports news from The Honolulu Advertiser."
|
||||||
publisher = 'Honolulu Advertiser'
|
publisher = 'Honolulu Advertiser'
|
||||||
category = 'news, Honolulu, Hawaii'
|
category = 'news, Honolulu, Hawaii'
|
||||||
oldest_article = 2
|
oldest_article = 2
|
||||||
language = 'en'
|
language = 'en'
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
encoding = 'cp1252'
|
encoding = 'cp1252'
|
||||||
|
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
'comments' : description
|
'comments' : description
|
||||||
,'tags' : category
|
,'tags' : category
|
||||||
,'language' : language
|
,'language' : language
|
||||||
,'publisher' : publisher
|
,'publisher' : publisher
|
||||||
}
|
}
|
||||||
|
|
||||||
keep_only_tags = [dict(name='td')]
|
keep_only_tags = [dict(name='td')]
|
||||||
|
|
||||||
remove_tags = [dict(name=['object','link'])]
|
remove_tags = [dict(name=['object','link'])]
|
||||||
remove_attributes = ['style']
|
remove_attributes = ['style']
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'Breaking news', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS01&MIME=XML' )
|
(u'Breaking news', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS01&MIME=XML' )
|
||||||
,(u'Local news', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS02&MIME=XML' )
|
,(u'Local news', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS02&MIME=XML' )
|
||||||
,(u'Sports', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS03&MIME=XML' )
|
,(u'Sports', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS03&MIME=XML' )
|
||||||
,(u'Island life', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS05&MIME=XML' )
|
,(u'Island life', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS05&MIME=XML' )
|
||||||
,(u'Entertainment', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS06&MIME=XML' )
|
,(u'Entertainment', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS06&MIME=XML' )
|
||||||
,(u'Business', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS04&MIME=XML' )
|
,(u'Business', u'http://www.honoluluadvertiser.com/apps/pbcs.dll/section?Category=RSS04&MIME=XML' )
|
||||||
]
|
]
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
st = soup.find('td')
|
st = soup.find('td')
|
||||||
if st:
|
if st:
|
||||||
st.name = 'div'
|
st.name = 'div'
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
def print_version(self, url):
|
def print_version(self, url):
|
||||||
ubody, sep, rest = url.rpartition('?source')
|
ubody, sep, rest = url.rpartition('?source')
|
||||||
root, sep2, article_id = ubody.partition('/article/')
|
root, sep2, article_id = ubody.partition('/article/')
|
||||||
return u'http://www.honoluluadvertiser.com/apps/pbcs.dll/article?AID=/' + article_id + '&template=printart'
|
return u'http://www.honoluluadvertiser.com/apps/pbcs.dll/article?AID=/' + article_id + '&template=printart'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user