Change links pointing to mobileread to use https

This commit is contained in:
Kovid Goyal 2017-01-09 08:44:14 +05:30
parent 8e6fbc1448
commit 0448865f31
24 changed files with 45 additions and 43 deletions

View File

@ -1,4 +1,4 @@
from (http://wiki.mobileread.com/wiki/MOBI) from (https://wiki.mobileread.com/wiki/MOBI)
About About
----- -----

View File

@ -112,7 +112,7 @@ Other options
:guilabel:`Catalog cover` specifies whether to generate a new cover or use an existing cover. It is possible to create a custom cover for your catalogs - see :ref:`Custom catalog covers` for more information. If you have created a custom cover that you want to reuse, select :guilabel:`Use existing cover`. Otherwise, select :guilabel:`Generate new cover`. :guilabel:`Catalog cover` specifies whether to generate a new cover or use an existing cover. It is possible to create a custom cover for your catalogs - see :ref:`Custom catalog covers` for more information. If you have created a custom cover that you want to reuse, select :guilabel:`Use existing cover`. Otherwise, select :guilabel:`Generate new cover`.
:guilabel:`Extra Description note` specifies a custom column's contents to be inserted into the Description page, next to the cover thumbnail. For example, you might want to display the date you last read a book using a :guilabel:`Last Read` custom column. For advanced use of the Description note feature, see `this post in the calibre forum <http://www.mobileread.com/forums/showpost.php?p=1335767&postcount=395>`_. :guilabel:`Extra Description note` specifies a custom column's contents to be inserted into the Description page, next to the cover thumbnail. For example, you might want to display the date you last read a book using a :guilabel:`Last Read` custom column. For advanced use of the Description note feature, see `this post in the calibre forum <https://www.mobileread.com/forums/showpost.php?p=1335767&postcount=395>`_.
:guilabel:`Thumb width` specifies a width preference for cover thumbnails included with Descriptions pages. Thumbnails are cached to improve performance.To experiment with different widths, try generating a catalog with just a few books until you've determined your preferred width, then generate your full catalog. The first time a catalog is generated with a new thumbnail width, performance will be slower, but subsequent builds of the catalog will take advantage of the thumbnail cache. :guilabel:`Thumb width` specifies a width preference for cover thumbnails included with Descriptions pages. Thumbnails are cached to improve performance.To experiment with different widths, try generating a catalog with just a few books until you've determined your preferred width, then generate your full catalog. The first time a catalog is generated with a new thumbnail width, performance will be slower, but subsequent builds of the catalog will take advantage of the thumbnail cache.
@ -125,13 +125,13 @@ Custom catalog covers
.. |cc| image:: images/custom_cover.png .. |cc| image:: images/custom_cover.png
|cc| With the `Generate Cover plugin <http://www.mobileread.com/forums/showthread.php?t=124219>`_ installed, you can create custom covers for your catalog. |cc| With the `Generate Cover plugin <https://www.mobileread.com/forums/showthread.php?t=124219>`_ installed, you can create custom covers for your catalog.
To install the plugin, go to :guilabel:`Preferences > Advanced > Plugins > Get new plugins`. To install the plugin, go to :guilabel:`Preferences > Advanced > Plugins > Get new plugins`.
Additional help resources Additional help resources
--------------------------- ---------------------------
For more information on calibre's Catalog feature, see the MobileRead forum sticky `Creating Catalogs - Start here <http://www.mobileread.com/forums/showthread.php?t=118556>`_, where you can find information on how to customize the catalog templates, and how to submit a bug report. For more information on calibre's Catalog feature, see the MobileRead forum sticky `Creating Catalogs - Start here <https://www.mobileread.com/forums/showthread.php?t=118556>`_, where you can find information on how to customize the catalog templates, and how to submit a bug report.
To ask questions or discuss calibre's Catalog feature with other users, visit the MobileRead forum `Calibre Catalogs <http://www.mobileread.com/forums/forumdisplay.php?f=236>`_. To ask questions or discuss calibre's Catalog feature with other users, visit the MobileRead forum `Calibre Catalogs <https://www.mobileread.com/forums/forumdisplay.php?f=236>`_.

View File

@ -318,11 +318,11 @@ This will shutdown a running calibre, wait for the shutdown to complete, then up
More plugin examples More plugin examples
---------------------- ----------------------
You can find a list of many, sophisticated calibre plugins `here <http://www.mobileread.com/forums/showthread.php?t=118764>`_. You can find a list of many, sophisticated calibre plugins `here <https://www.mobileread.com/forums/showthread.php?t=118764>`_.
Sharing your plugins with others Sharing your plugins with others
---------------------------------- ----------------------------------
If you would like to share the plugins you have created with other users of calibre, post your plugin in a new thread in the If you would like to share the plugins you have created with other users of calibre, post your plugin in a new thread in the
`calibre plugins forum <http://www.mobileread.com/forums/forumdisplay.php?f=237>`_. `calibre plugins forum <https://www.mobileread.com/forums/forumdisplay.php?f=237>`_.

View File

@ -96,7 +96,7 @@ where you have put your icons (usually the :file:`resources/images` folder in
the calibre config directory, as described above). Then fill up the theme the calibre config directory, as described above). Then fill up the theme
metadata and click OK. This will result in a zip file containing the theme metadata and click OK. This will result in a zip file containing the theme
icons. You can upload that to the calibre forum at `Mobileread icons. You can upload that to the calibre forum at `Mobileread
<http://www.mobileread.com/forums/forumdisplay.php?f=166>`_ and then I will <https://www.mobileread.com/forums/forumdisplay.php?f=166>`_ and then I will
make your theme available via calibre's builtin icon theme system. make your theme available via calibre's builtin icon theme system.

View File

@ -26,7 +26,7 @@ For example, adding support for a new device to calibre typically involves writi
a device driver plugin. You can browse the a device driver plugin. You can browse the
`built-in drivers <https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. Similarly, adding support `built-in drivers <https://github.com/kovidgoyal/calibre/tree/master/src/calibre/devices>`_. Similarly, adding support
for new conversion formats involves writing input/output format plugins. Another example of the modular design is the :ref:`recipe system <news>` for for new conversion formats involves writing input/output format plugins. Another example of the modular design is the :ref:`recipe system <news>` for
fetching news. For more examples of plugins designed to add features to calibre, see the `plugin index <http://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_. fetching news. For more examples of plugins designed to add features to calibre, see the `plugin index <https://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_.
.. _code_layout: .. _code_layout:
@ -68,7 +68,7 @@ If you want to locate the entry points for all the various calibre executables,
look at the ``entry_points`` structure in `linux.py look at the ``entry_points`` structure in `linux.py
<https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_. <https://github.com/kovidgoyal/calibre/blob/master/src/calibre/linux.py>`_.
If you need help understanding the code, post in the `development forum <http://www.mobileread.com/forums/forumdisplay.php?f=240>`_ If you need help understanding the code, post in the `development forum <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_
and you will most likely get help from one of calibre's many developers. and you will most likely get help from one of calibre's many developers.
Getting the code Getting the code
@ -146,7 +146,7 @@ for inclusion into the main calibre repository:
You should also keep an eye on the calibre `development forum You should also keep an eye on the calibre `development forum
<http://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Before making <https://www.mobileread.com/forums/forumdisplay.php?f=240>`_. Before making
major changes, you should discuss them in the forum or contact Kovid directly major changes, you should discuss them in the forum or contact Kovid directly
(his email address is all over the source code). (his email address is all over the source code).
@ -182,7 +182,7 @@ in your favorite editor and add the line::
near the top of the file. Now run the command :command:`calibredb`. The very first line of output should be ``Hello, world!``. near the top of the file. Now run the command :command:`calibredb`. The very first line of output should be ``Hello, world!``.
You can also setup a calibre development environment inside the free Microsoft You can also setup a calibre development environment inside the free Microsoft
Visual Studio, if you like, following the instructions `here <http://www.mobileread.com/forums/showthread.php?t=251201>`_. Visual Studio, if you like, following the instructions `here <https://www.mobileread.com/forums/showthread.php?t=251201>`_.
OS X development environment OS X development environment
------------------------------ ------------------------------

View File

@ -207,7 +207,7 @@ Follow these steps to find the problem:
etc. at the same time. etc. at the same time.
* If you are connecting an Apple iDevice (iPad, iPod Touch, iPhone), use * If you are connecting an Apple iDevice (iPad, iPod Touch, iPhone), use
the 'Connect to iTunes' method in the 'Getting started' instructions in the 'Connect to iTunes' method in the 'Getting started' instructions in
`Calibre + Apple iDevices: Start here <http://www.mobileread.com/forums/showthread.php?t=118559>`_. `Calibre + Apple iDevices: Start here <https://www.mobileread.com/forums/showthread.php?t=118559>`_.
* Make sure you are running the latest version of calibre. The latest version * Make sure you are running the latest version of calibre. The latest version
can always be downloaded from `the calibre website <https://calibre-ebook.com/download>`_. can always be downloaded from `the calibre website <https://calibre-ebook.com/download>`_.
You can tell what version of calibre you are currently running by looking You can tell what version of calibre you are currently running by looking

View File

@ -306,7 +306,7 @@ Once the download is complete, you can look at the downloaded :term:`HTML` by op
... ...
If you're satisfied with your recipe, and you feel there is enough demand to justify its inclusion into the set of built-in recipes, post your recipe in the `calibre recipes forum <http://www.mobileread.com/forums/forumdisplay.php?f=228>`_ to share it with other calibre users. If you're satisfied with your recipe, and you feel there is enough demand to justify its inclusion into the set of built-in recipes, post your recipe in the `calibre recipes forum <https://www.mobileread.com/forums/forumdisplay.php?f=228>`_ to share it with other calibre users.
.. note:: .. note::
On OS X, the command line tools are inside the calibre bundle, for example, On OS X, the command line tools are inside the calibre bundle, for example,
@ -333,7 +333,7 @@ To learn more about writing advanced recipes using some of the facilities, avail
`Built-in recipes <https://github.com/kovidgoyal/calibre/tree/master/recipes>`_ `Built-in recipes <https://github.com/kovidgoyal/calibre/tree/master/recipes>`_
The source code for the built-in recipes that come with calibre The source code for the built-in recipes that come with calibre
`The calibre recipes forum <http://www.mobileread.com/forums/forumdisplay.php?f=228>`_ `The calibre recipes forum <https://www.mobileread.com/forums/forumdisplay.php?f=228>`_
Lots of knowledgeable calibre recipe writers hang out here. Lots of knowledgeable calibre recipe writers hang out here.

View File

@ -105,7 +105,7 @@ Let's begin with the conversion settings, which is really neat. In the Search an
<p class="calibre4"> It had only been two years since Addison v. Clark. <p class="calibre4"> It had only been two years since Addison v. Clark.
The court case gave us a revised version of what life was The court case gave us a revised version of what life was
(shamelessly ripped out of `this thread <http://www.mobileread.com/forums/showthread.php?t=75594">`_). You'd have to remove some of the tags as well. In this example, I'd recommend beginning with the tag ``<b class="calibre2">``, now you have to end with the corresponding closing tag (opening tags are ``<tag>``, closing tags are ``</tag>``), which is simply the next ``</b>`` in this case. (Refer to a good HTML manual or ask in the forum if you are unclear on this point.) The opening tag can be described using ``<b.*?>``, the closing tag using ``</b>``, thus we could remove everything between those tags using ``<b.*?>.*?</b>``. But using this expression would be a bad idea, because it removes everything enclosed by <b>- tags (which, by the way, render the enclosed text in bold print), and it's a fair bet that we'll remove portions of the book in this way. Instead, include the beginning of the enclosed string as well, making the regular expression ``<b.*?>\s*Generated\s+by\s+ABC\s+Amber\s+LIT.*?</b>`` The ``\s`` with quantifiers are included here instead of explicitly using the spaces as seen in the string to catch any variations of the string that might occur. Remember to check what calibre will remove to make sure you don't remove any portions you want to keep if you test a new expression. If you only check one occurrence, you might miss a mismatch somewhere else in the text. Also note that should you accidentally remove more or fewer tags than you actually wanted to, calibre tries to repair the damaged code after doing the removal. (shamelessly ripped out of `this thread <https://www.mobileread.com/forums/showthread.php?t=75594">`_). You'd have to remove some of the tags as well. In this example, I'd recommend beginning with the tag ``<b class="calibre2">``, now you have to end with the corresponding closing tag (opening tags are ``<tag>``, closing tags are ``</tag>``), which is simply the next ``</b>`` in this case. (Refer to a good HTML manual or ask in the forum if you are unclear on this point.) The opening tag can be described using ``<b.*?>``, the closing tag using ``</b>``, thus we could remove everything between those tags using ``<b.*?>.*?</b>``. But using this expression would be a bad idea, because it removes everything enclosed by <b>- tags (which, by the way, render the enclosed text in bold print), and it's a fair bet that we'll remove portions of the book in this way. Instead, include the beginning of the enclosed string as well, making the regular expression ``<b.*?>\s*Generated\s+by\s+ABC\s+Amber\s+LIT.*?</b>`` The ``\s`` with quantifiers are included here instead of explicitly using the spaces as seen in the string to catch any variations of the string that might occur. Remember to check what calibre will remove to make sure you don't remove any portions you want to keep if you test a new expression. If you only check one occurrence, you might miss a mismatch somewhere else in the text. Also note that should you accidentally remove more or fewer tags than you actually wanted to, calibre tries to repair the damaged code after doing the removal.
Adding books Adding books
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^

View File

@ -88,7 +88,7 @@ by the viewer to ones you like as well as the default font size when the viewer
More advanced customization can be achieved by the User Stylesheet setting. This is a stylesheet you can set that will be applied More advanced customization can be achieved by the User Stylesheet setting. This is a stylesheet you can set that will be applied
to every book. Using it you can do things like have white text on a black background, change paragraph styles, text justification, etc. to every book. Using it you can do things like have white text on a black background, change paragraph styles, text justification, etc.
For examples of custom stylesheets used by calibre's users, see `the forums <http://www.mobileread.com/forums/showthread.php?t=51500>`_. For examples of custom stylesheets used by calibre's users, see `the forums <https://www.mobileread.com/forums/showthread.php?t=51500>`_.
Dictionary lookup Dictionary lookup
------------------- -------------------

View File

@ -90,6 +90,7 @@ def _add_newbook_tag(mi):
elif tag not in mi.tags: elif tag not in mi.tags:
mi.tags.append(tag) mi.tags.append(tag)
dynamic_category_preferences = frozenset({'grouped_search_make_user_categories', 'grouped_search_terms', 'user_categories'}) dynamic_category_preferences = frozenset({'grouped_search_make_user_categories', 'grouped_search_terms', 'user_categories'})
@ -1337,7 +1338,7 @@ class Cache(object):
path = self._field_for('path', book_id) path = self._field_for('path', book_id)
if path is None: if path is None:
# Theoretically, this should never happen, but apparently it # Theoretically, this should never happen, but apparently it
# does: http://www.mobileread.com/forums/showthread.php?t=233353 # does: https://www.mobileread.com/forums/showthread.php?t=233353
self._update_path({book_id}, mark_as_dirtied=False) self._update_path({book_id}, mark_as_dirtied=False)
path = self._field_for('path', book_id) path = self._field_for('path', book_id)

View File

@ -30,6 +30,7 @@ def strftime(fmt='%Y/%m/%d %H:%M:%S', dt=None):
except: except:
return _strftime(fmt, now().timetuple()) return _strftime(fmt, now().timetuple())
_log = None _log = None
@ -67,7 +68,7 @@ class AppleOpenFeedback(OpenFeedback):
'<p>To transfer books to your iDevice, ' '<p>To transfer books to your iDevice, '
'click <b>Disable Apple Driver</b>, ' 'click <b>Disable Apple Driver</b>, '
"then use the 'Connect to iTunes' method recommended in the " "then use the 'Connect to iTunes' method recommended in the "
'<a href="http://www.mobileread.com/forums/showthread.php?t=118559">Calibre + iDevices FAQ</a>, ' '<a href="https://www.mobileread.com/forums/showthread.php?t=118559">Calibre + iDevices FAQ</a>, '
'using the <em>Connect/Share</em>|<em>Connect to iTunes</em> menu item.</p>' 'using the <em>Connect/Share</em>|<em>Connect to iTunes</em> menu item.</p>'
'<p>Enabling the Apple driver for direct connection to iDevices ' '<p>Enabling the Apple driver for direct connection to iDevices '
'is an unsupported advanced user mode.</p>' 'is an unsupported advanced user mode.</p>'
@ -222,12 +223,12 @@ class ITUNES(DriverBase):
"Drag from iTunes Library to desktop, then add to calibre's Library window.") "Drag from iTunes Library to desktop, then add to calibre's Library window.")
UNSUPPORTED_DIRECT_CONNECT_MODE_MESSAGE = _( UNSUPPORTED_DIRECT_CONNECT_MODE_MESSAGE = _(
"*** Unsupported direct connect mode. " "*** Unsupported direct connect mode. "
"See http://www.mobileread.com/forums/showthread.php?t=118559 " "See https://www.mobileread.com/forums/showthread.php?t=118559 "
"for instructions on using 'Connect to iTunes' ***") "for instructions on using 'Connect to iTunes' ***")
ITUNES_SANDBOX_LOCKOUT_MESSAGE = _( ITUNES_SANDBOX_LOCKOUT_MESSAGE = _(
'<p>Unable to communicate with iTunes.</p>' '<p>Unable to communicate with iTunes.</p>'
'<p>Refer to this ' '<p>Refer to this '
'<a href="http://www.mobileread.com/forums/showpost.php?p=2113958&postcount=3">forum post</a> ' '<a href="https://www.mobileread.com/forums/showpost.php?p=2113958&postcount=3">forum post</a> '
'for more information.</p>' 'for more information.</p>'
'<p></p>') '<p></p>')

View File

@ -238,9 +238,9 @@ class TREKSTOR(USBMS):
0x0067, # This is for the Pyrus Mini 0x0067, # This is for the Pyrus Mini
0x006f, # This is for the Pyrus Maxi 0x006f, # This is for the Pyrus Maxi
0x003e, # This is for the EBOOK_PLAYER_5M https://bugs.launchpad.net/bugs/792091 0x003e, # This is for the EBOOK_PLAYER_5M https://bugs.launchpad.net/bugs/792091
0x05cL, # This is for the 4ink http://www.mobileread.com/forums/showthread.php?t=191318 0x05cL, # This is for the 4ink https://www.mobileread.com/forums/showthread.php?t=191318
0x006c, # This is for the 4ink http://www.mobileread.com/forums/showthread.php?t=218273 0x006c, # This is for the 4ink https://www.mobileread.com/forums/showthread.php?t=218273
0x006d, # Another Pyrus? http://www.mobileread.com/forums/showthread.php?t=231982 0x006d, # Another Pyrus? https://www.mobileread.com/forums/showthread.php?t=231982
0x73, # This is for the Pyrus 2 LED https://bugs.launchpad.net/bugs/1376018 0x73, # This is for the Pyrus 2 LED https://bugs.launchpad.net/bugs/1376018
] ]
BCD = [0x0002, 0x100, 0x0222, 0x2] BCD = [0x0002, 0x100, 0x0222, 0x2]
@ -579,5 +579,3 @@ class CERVANTES(USBMS):
EBOOK_DIR_MAIN = 'Books' EBOOK_DIR_MAIN = 'Books'
SCAN_FROM_ROOT = True SCAN_FROM_ROOT = True
SUPPORTS_SUB_DIRS = True SUPPORTS_SUB_DIRS = True

View File

@ -64,7 +64,7 @@ class USBDevice:
return True return True
# As of OS X 10.11.4 Apple started mangling the names returned via the # As of OS X 10.11.4 Apple started mangling the names returned via the
# IOKit registry. See # IOKit registry. See
# http://www.mobileread.com/forums/showthread.php?t=273213 # https://www.mobileread.com/forums/showthread.php?t=273213
m = osx_sanitize_name_pat.sub('_', (self.manufacturer or '')) m = osx_sanitize_name_pat.sub('_', (self.manufacturer or ''))
p = osx_sanitize_name_pat.sub('_', (self.product or '')) p = osx_sanitize_name_pat.sub('_', (self.product or ''))
return m == man and p == prod return m == man and p == prod

View File

@ -407,7 +407,7 @@ def set_metadata(stream, mi, apply_null=False, update_timestamp=False):
stream.truncate() stream.truncate()
# Apparently there exists FB2 reading software that chokes on the use of # Apparently there exists FB2 reading software that chokes on the use of
# single quotes in xml declaration. Sigh. See # single quotes in xml declaration. Sigh. See
# http://www.mobileread.com/forums/showthread.php?p=2273184#post2273184 # https://www.mobileread.com/forums/showthread.php?p=2273184#post2273184
stream.write(b'<?xml version="1.0" encoding="UTF-8"?>\n') stream.write(b'<?xml version="1.0" encoding="UTF-8"?>\n')
stream.write(etree.tostring(root, method='xml', encoding='utf-8', stream.write(etree.tostring(root, method='xml', encoding='utf-8',
xml_declaration=False)) xml_declaration=False))

View File

@ -22,6 +22,7 @@ def get_metadata(stream):
src = stream.read() src = stream.read()
return get_metadata_(src) return get_metadata_(src)
COMMENT_NAMES = { COMMENT_NAMES = {
'title': 'TITLE', 'title': 'TITLE',
'authors': 'AUTHOR', 'authors': 'AUTHOR',
@ -102,7 +103,7 @@ def parse_comment_tags(src):
def get_metadata_(src, encoding=None): def get_metadata_(src, encoding=None):
# Meta data definitions as in # Meta data definitions as in
# http://www.mobileread.com/forums/showpost.php?p=712544&postcount=9 # https://www.mobileread.com/forums/showpost.php?p=712544&postcount=9
if isbytestring(src): if isbytestring(src):
if not encoding: if not encoding:

View File

@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
print_function) print_function)
# Based on work of John Howell reversing the KFX format # Based on work of John Howell reversing the KFX format
# http://www.mobileread.com/forums/showpost.php?p=3176029&postcount=89 # https://www.mobileread.com/forums/showpost.php?p=3176029&postcount=89
import struct, sys, base64, re import struct, sys, base64, re
from collections import defaultdict from collections import defaultdict
@ -23,6 +23,7 @@ from calibre.utils.imghdr import identify
class InvalidKFX(ValueError): class InvalidKFX(ValueError):
pass pass
# magic numbers for data structures # magic numbers for data structures
CONTAINER_MAGIC = b'CONT' CONTAINER_MAGIC = b'CONT'
ENTITY_MAGIC = b'ENTY' ENTITY_MAGIC = b'ENTY'
@ -326,6 +327,7 @@ def read_metadata_kfx(stream, read_cover=True):
return mi return mi
if __name__ == '__main__': if __name__ == '__main__':
from calibre import prints from calibre import prints
with open(sys.argv[-1], 'rb') as f: with open(sys.argv[-1], 'rb') as f:

View File

@ -334,7 +334,7 @@ class Mobi8Reader(object):
return m.group(1) return m.group(1)
# For some files, kindlegen apparently creates links to tags # For some files, kindlegen apparently creates links to tags
# without HTML anchors, using the AID instead. See # without HTML anchors, using the AID instead. See
# See http://www.mobileread.com/forums/showthread.php?t=259557 # See https://www.mobileread.com/forums/showthread.php?t=259557
m = self.aid_re.match(tag) m = self.aid_re.match(tag)
if m is not None: if m is not None:
self.linked_aids.add(m.group(1)) self.linked_aids.add(m.group(1))

View File

@ -108,7 +108,7 @@ def init_qt(args):
except Exception: except Exception:
is_x11 = False is_x11 = False
# Ancient broken VNC servers cannot handle icons of size greater than 256 # Ancient broken VNC servers cannot handle icons of size greater than 256
# http://www.mobileread.com/forums/showthread.php?t=278447 # https://www.mobileread.com/forums/showthread.php?t=278447
ic = 'lt.png' if is_x11 else 'library.png' ic = 'lt.png' if is_x11 else 'library.png'
app.setWindowIcon(QIcon(I(ic, allow_user_override=False))) app.setWindowIcon(QIcon(I(ic, allow_user_override=False)))
return app, opts, args return app, opts, args
@ -432,6 +432,7 @@ def run_gui(opts, args, listener, app, gui_debug=None):
open_local_file(debugfile) open_local_file(debugfile)
return ret return ret
singleinstance_name = 'calibre_GUI' singleinstance_name = 'calibre_GUI'
@ -592,5 +593,3 @@ if __name__ == '__main__':
'%s<b>Log:</b><br>%s')%(unicode(err), '%s<b>Log:</b><br>%s')%(unicode(err),
unicode(tb).replace('\n', '<br>'), unicode(tb).replace('\n', '<br>'),
log.replace('\n', '<br>'))) log.replace('\n', '<br>')))

View File

@ -38,7 +38,7 @@ class CacheUpdateThread(Thread, QObject):
self._run = False self._run = False
def run(self): def run(self):
url = 'http://www.mobileread.com/forums/ebooks.php?do=getlist&type=html' url = 'https://www.mobileread.com/forums/ebooks.php?do=getlist&type=html'
self.update_details.emit(_('Checking last download date.')) self.update_details.emit(_('Checking last download date.'))
last_download = self.config.get('last_download', None) last_download = self.config.get('last_download', None)

View File

@ -40,7 +40,7 @@ class MobileReadStore(BasicStoreConfig, StorePlugin):
return self._mr_cache return self._mr_cache
def open(self, parent=None, detail_item=None, external=False): def open(self, parent=None, detail_item=None, external=False):
url = 'http://www.mobileread.com/' url = 'https://www.mobileread.com/'
if external or self.config.get('open_external', False): if external or self.config.get('open_external', False):
open_url(QUrl(detail_item if detail_item else url)) open_url(QUrl(detail_item if detail_item else url))

View File

@ -917,7 +917,7 @@ You must enter the search URL for the search engine, with the placeholder
<item> <item>
<widget class="QLabel" name="label_10"> <widget class="QLabel" name="label_10">
<property name="text"> <property name="text">
<string>&lt;p&gt;A CSS stylesheet that can be used to control the look and feel of books. For examples, click &lt;a href=&quot;http://www.mobileread.com/forums/showthread.php?t=51500&quot;&gt;here&lt;/a&gt;.</string> <string>&lt;p&gt;A CSS stylesheet that can be used to control the look and feel of books. For examples, click &lt;a href=&quot;https://www.mobileread.com/forums/showthread.php?t=51500&quot;&gt;here&lt;/a&gt;.</string>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
<bool>true</bool> <bool>true</bool>

View File

@ -49,7 +49,7 @@ class DispatchController(object): # {{{
route = self.prefix + route route = self.prefix + route
if isinstance(route, unicode): if isinstance(route, unicode):
# Apparently the routes package chokes on unicode routes, see # Apparently the routes package chokes on unicode routes, see
# http://www.mobileread.com/forums/showthread.php?t=235366 # https://www.mobileread.com/forums/showthread.php?t=235366
route = route.encode('utf-8') route = route.encode('utf-8')
elif self.prefix: elif self.prefix:
self.dispatcher.connect(name+'prefix_extra', self.prefix, self, self.dispatcher.connect(name+'prefix_extra', self.prefix, self,
@ -116,6 +116,7 @@ class BonJour(SimplePlugin): # {{{
stop.priority = 10 stop.priority = 10
cherrypy.engine.bonjour = BonJour(cherrypy.engine) cherrypy.engine.bonjour = BonJour(cherrypy.engine)
# }}} # }}}

View File

@ -10,16 +10,13 @@ from threading import Thread
from PyQt5.Qt import QImage, QByteArray, QBuffer, Qt, QImageReader, QColor, QImageWriter, QTransform, QPixmap from PyQt5.Qt import QImage, QByteArray, QBuffer, Qt, QImageReader, QColor, QImageWriter, QTransform, QPixmap
from calibre import fit_image, force_unicode from calibre import fit_image, force_unicode
from calibre.constants import iswindows, plugins, get_version from calibre.constants import iswindows, plugins
from calibre.utils.config_base import tweaks from calibre.utils.config_base import tweaks
from calibre.utils.filenames import atomic_rename from calibre.utils.filenames import atomic_rename
# Utilities {{{ # Utilities {{{
imageops, imageops_err = plugins['imageops'] imageops, imageops_err = plugins['imageops']
if imageops is None: if imageops is None:
if '*' in get_version():
raise RuntimeError('You are running from source, which requires the new binary module, imageops. You can'
' get it by installing the betas from: http://www.mobileread.com/forums/showthread.php?t=274030')
raise RuntimeError(imageops_err) raise RuntimeError(imageops_err)

View File

@ -51,7 +51,7 @@ def extensions(basename):
if basename == 'calibre.exe': if basename == 'calibre.exe':
from calibre.ebooks import BOOK_EXTENSIONS from calibre.ebooks import BOOK_EXTENSIONS
# We remove rar and zip as they interfere with 7-zip associations # We remove rar and zip as they interfere with 7-zip associations
# http://www.mobileread.com/forums/showthread.php?t=256459 # https://www.mobileread.com/forums/showthread.php?t=256459
return set(BOOK_EXTENSIONS) - {'rar', 'zip'} return set(BOOK_EXTENSIONS) - {'rar', 'zip'}
if basename == 'ebook-viewer.exe': if basename == 'ebook-viewer.exe':
from calibre.customize.ui import all_input_formats from calibre.customize.ui import all_input_formats
@ -222,6 +222,7 @@ def get_open_data(base, prog_id):
cmd = ' '.join(parts[:-1]) + ' "%1"' cmd = ' '.join(parts[:-1]) + ' "%1"'
return cmd, k.get(sub_key='DefaultIcon'), k.get_mui_string('FriendlyTypeName') or k.get() return cmd, k.get(sub_key='DefaultIcon'), k.get_mui_string('FriendlyTypeName') or k.get()
CommandLineToArgvW = ctypes.windll.shell32.CommandLineToArgvW CommandLineToArgvW = ctypes.windll.shell32.CommandLineToArgvW
CommandLineToArgvW.arg_types = [LPCWSTR, ctypes.POINTER(ctypes.c_int)] CommandLineToArgvW.arg_types = [LPCWSTR, ctypes.POINTER(ctypes.c_int)]
CommandLineToArgvW.restype = ctypes.POINTER(LPCWSTR) CommandLineToArgvW.restype = ctypes.POINTER(LPCWSTR)
@ -309,6 +310,7 @@ def find_programs(extensions):
ans.append({'name':name, 'cmdline':cmdline, 'icon_resource':icon_resource}) ans.append({'name':name, 'cmdline':cmdline, 'icon_resource':icon_resource})
return ans return ans
if __name__ == '__main__': if __name__ == '__main__':
from pprint import pprint from pprint import pprint
pprint(find_programs('docx'.split())) pprint(find_programs('docx'.split()))