mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More http -> https
This commit is contained in:
parent
9c793c7b1d
commit
0073fbcc19
@ -56,7 +56,7 @@ class TXTInput(InputFormatPlugin):
|
|||||||
'as chapter headings and italic text.\n'
|
'as chapter headings and italic text.\n'
|
||||||
'* textile: Processing using textile formatting.\n'
|
'* textile: Processing using textile formatting.\n'
|
||||||
'* markdown: Processing using markdown formatting. '
|
'* markdown: Processing using markdown formatting. '
|
||||||
'To learn more about markdown see')+' http://daringfireball.net/projects/markdown/'),
|
'To learn more about markdown see')+' https://daringfireball.net/projects/markdown/'),
|
||||||
OptionRecommendation(name='preserve_spaces', recommended_value=False,
|
OptionRecommendation(name='preserve_spaces', recommended_value=False,
|
||||||
help=_('Normally extra spaces are condensed into a single space. '
|
help=_('Normally extra spaces are condensed into a single space. '
|
||||||
'With this option all spaces will be displayed.')),
|
'With this option all spaces will be displayed.')),
|
||||||
@ -66,7 +66,7 @@ class TXTInput(InputFormatPlugin):
|
|||||||
OptionRecommendation(name="markdown_extensions", recommended_value='footnotes, tables, toc',
|
OptionRecommendation(name="markdown_extensions", recommended_value='footnotes, tables, toc',
|
||||||
help=_('Enable extensions to markdown syntax. Extensions are formatting that is not part '
|
help=_('Enable extensions to markdown syntax. Extensions are formatting that is not part '
|
||||||
'of the standard markdown format. The extensions enabled by default: %default.\n'
|
'of the standard markdown format. The extensions enabled by default: %default.\n'
|
||||||
'To learn more about markdown extensions, see http://pythonhosted.org/Markdown/extensions/index.html\n'
|
'To learn more about markdown extensions, see https://pythonhosted.org/Markdown/extensions/index.html\n'
|
||||||
'This should be a comma separated list of extensions to enable:\n') +
|
'This should be a comma separated list of extensions to enable:\n') +
|
||||||
'\n'.join('* %s: %s' % (k, MD_EXTENSIONS[k]) for k in sorted(MD_EXTENSIONS))),
|
'\n'.join('* %s: %s' % (k, MD_EXTENSIONS[k]) for k in sorted(MD_EXTENSIONS))),
|
||||||
])
|
])
|
||||||
@ -202,7 +202,7 @@ class TXTInput(InputFormatPlugin):
|
|||||||
input_mi, html = convert_markdown_with_metadata(txt, extensions=[x.strip() for x in options.markdown_extensions.split(',') if x.strip()])
|
input_mi, html = convert_markdown_with_metadata(txt, extensions=[x.strip() for x in options.markdown_extensions.split(',') if x.strip()])
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
raise ValueError('This txt file has malformed markup, it cannot be'
|
raise ValueError('This txt file has malformed markup, it cannot be'
|
||||||
' converted by calibre. See http://daringfireball.net/projects/markdown/syntax')
|
' converted by calibre. See https://daringfireball.net/projects/markdown/syntax')
|
||||||
elif options.formatting_type == 'textile':
|
elif options.formatting_type == 'textile':
|
||||||
log.debug('Running text through textile conversion...')
|
log.debug('Running text through textile conversion...')
|
||||||
html = convert_textile(txt)
|
html = convert_textile(txt)
|
||||||
|
@ -63,6 +63,7 @@ class CompositeProgressReporter(object):
|
|||||||
(self.global_max - self.global_min)
|
(self.global_max - self.global_min)
|
||||||
self.global_reporter(global_frac, msg)
|
self.global_reporter(global_frac, msg)
|
||||||
|
|
||||||
|
|
||||||
ARCHIVE_FMTS = ('zip', 'rar', 'oebzip')
|
ARCHIVE_FMTS = ('zip', 'rar', 'oebzip')
|
||||||
|
|
||||||
|
|
||||||
@ -500,7 +501,7 @@ OptionRecommendation(name='smarten_punctuation',
|
|||||||
recommended_value=False, level=OptionRecommendation.LOW,
|
recommended_value=False, level=OptionRecommendation.LOW,
|
||||||
help=_('Convert plain quotes, dashes and ellipsis to their '
|
help=_('Convert plain quotes, dashes and ellipsis to their '
|
||||||
'typographically correct equivalents. For details, see '
|
'typographically correct equivalents. For details, see '
|
||||||
'http://daringfireball.net/projects/smartypants'
|
'https://daringfireball.net/projects/smartypants'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -1231,6 +1232,7 @@ OptionRecommendation(name='search_replace',
|
|||||||
self.log(self.output_fmt.upper(), 'output written to', self.output)
|
self.log(self.output_fmt.upper(), 'output written to', self.output)
|
||||||
self.flush()
|
self.flush()
|
||||||
|
|
||||||
|
|
||||||
# This has to be global as create_oebbook can be called from other locations
|
# This has to be global as create_oebbook can be called from other locations
|
||||||
# (for example in the html input plugin)
|
# (for example in the html input plugin)
|
||||||
regex_wizard_callback = None
|
regex_wizard_callback = None
|
||||||
|
@ -146,9 +146,8 @@ class StoreAction(InterfaceAction):
|
|||||||
'buying from. Be sure to double check that any books you get '
|
'buying from. Be sure to double check that any books you get '
|
||||||
'will work with your e-book reader, especially if the book you '
|
'will work with your e-book reader, especially if the book you '
|
||||||
'are buying has '
|
'are buying has '
|
||||||
'<a href="http://drmfree.calibre-ebook.com/about#drm">DRM</a>.'
|
'<a href="https://drmfree.calibre-ebook.com/about#drm">DRM</a>.'
|
||||||
)), 'about_get_books_msg',
|
)), 'about_get_books_msg',
|
||||||
parent=self.gui, show_cancel_button=False,
|
parent=self.gui, show_cancel_button=False,
|
||||||
confirm_msg=_('Show this message again'),
|
confirm_msg=_('Show this message again'),
|
||||||
pixmap='dialog_information.png', title=_('About Get Books'))
|
pixmap='dialog_information.png', title=_('About Get Books'))
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><p>Markdown is a simple markup language for text files, that allows for advanced formatting. To learn more visit <a href="http://daringfireball.net/projects/markdown">markdown</a>.</string>
|
<string><p>Markdown is a simple markup language for text files, that allows for advanced formatting. To learn more visit <a href="https://daringfireball.net/projects/markdown">markdown</a>.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -124,7 +124,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>More information on <a href="http://pythonhosted.org/Markdown/extensions/index.html">markdown extensions</a></string>
|
<string>More information on <a href="https://pythonhosted.org/Markdown/extensions/index.html">markdown extensions</a></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="openExternalLinks">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -44,8 +44,8 @@
|
|||||||
<widget class="QLabel" name="msg">
|
<widget class="QLabel" name="msg">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><p>This book is locked by <b>DRM</b>. To learn more about DRM and why you cannot read or convert this book in calibre,
|
<string><p>This book is locked by <b>DRM</b>. To learn more about DRM and why you cannot read or convert this book in calibre,
|
||||||
<a href="http://drmfree.calibre-ebook.com/about#drm">click here</a>.<p>A large number of recent, DRM free releases are
|
<a href="https://drmfree.calibre-ebook.com/about#drm">click here</a>.<p>A large number of recent, DRM free releases are
|
||||||
available at <a href="http://drmfree.calibre-ebook.com">Open Books</a>.</string>
|
available at <a href="https://drmfree.calibre-ebook.com">Open Books</a>.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -55,6 +55,7 @@ def get_cover_data(stream, ext): # {{{
|
|||||||
return cdata, area
|
return cdata, area
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
Settings = namedtuple('Settings',
|
Settings = namedtuple('Settings',
|
||||||
'remove_all remove add au aus do_aus rating pub do_series do_autonumber do_remove_format '
|
'remove_all remove add au aus do_aus rating pub do_series do_autonumber do_remove_format '
|
||||||
'remove_format do_swap_ta do_remove_conv do_auto_author series do_series_restart series_start_value series_increment '
|
'remove_format do_swap_ta do_remove_conv do_auto_author series do_series_restart series_start_value series_increment '
|
||||||
@ -529,7 +530,7 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
'The destination box specifies the field where the result after '
|
'The destination box specifies the field where the result after '
|
||||||
'matching and replacement is to be assigned. You can replace '
|
'matching and replacement is to be assigned. You can replace '
|
||||||
'the text in the field, or prepend or append the matched text. '
|
'the text in the field, or prepend or append the matched text. '
|
||||||
'See <a href="http://docs.python.org/library/re.html"> '
|
'See <a href="https://docs.python.org/library/re.html"> '
|
||||||
'this reference</a> for more information on python\'s regular '
|
'this reference</a> for more information on python\'s regular '
|
||||||
'expressions, and in particular the \'sub\' function.'
|
'expressions, and in particular the \'sub\' function.'
|
||||||
)
|
)
|
||||||
@ -1228,5 +1229,3 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
self.results_count.setValue(999)
|
self.results_count.setValue(999)
|
||||||
self.starting_from.setValue(1)
|
self.starting_from.setValue(1)
|
||||||
self.multiple_separator.setText(" ::: ")
|
self.multiple_separator.setText(" ::: ")
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class TextureChooser(QDialog):
|
|||||||
il.itemSelectionChanged.connect(self.update_remove_state)
|
il.itemSelectionChanged.connect(self.update_remove_state)
|
||||||
l.addWidget(il)
|
l.addWidget(il)
|
||||||
|
|
||||||
self.ad = ad = QLabel(_('The builtin textures come from <a href="http://subtlepatterns.com">subtlepatterns.com</a>.'))
|
self.ad = ad = QLabel(_('The builtin textures come from <a href="https://subtlepatterns.com">subtlepatterns.com</a>.'))
|
||||||
ad.setOpenExternalLinks(True)
|
ad.setOpenExternalLinks(True)
|
||||||
ad.setWordWrap(True)
|
ad.setWordWrap(True)
|
||||||
l.addWidget(ad)
|
l.addWidget(ad)
|
||||||
@ -147,6 +147,7 @@ class TextureChooser(QDialog):
|
|||||||
os.remove(unicode(self.selected_item.data(Qt.UserRole+1) or ''))
|
os.remove(unicode(self.selected_item.data(Qt.UserRole+1) or ''))
|
||||||
self.images.takeItem(self.images.row(self.selected_item))
|
self.images.takeItem(self.images.row(self.selected_item))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = QApplication([]) # noqa
|
app = QApplication([]) # noqa
|
||||||
d = TextureChooser()
|
d = TextureChooser()
|
||||||
|
@ -25,7 +25,7 @@ from calibre.gui2.store.web_store_dialog import WebStoreDialog
|
|||||||
class OpenBooksStore(BasicStoreConfig, StorePlugin):
|
class OpenBooksStore(BasicStoreConfig, StorePlugin):
|
||||||
|
|
||||||
def open(self, parent=None, detail_item=None, external=False):
|
def open(self, parent=None, detail_item=None, external=False):
|
||||||
url = 'http://drmfree.calibre-ebook.com/'
|
url = 'https://drmfree.calibre-ebook.com/'
|
||||||
|
|
||||||
if external or self.config.get('open_external', False):
|
if external or self.config.get('open_external', False):
|
||||||
open_url(QUrl(url_slash_cleaner(detail_item if detail_item else url)))
|
open_url(QUrl(url_slash_cleaner(detail_item if detail_item else url)))
|
||||||
@ -36,7 +36,7 @@ class OpenBooksStore(BasicStoreConfig, StorePlugin):
|
|||||||
d.exec_()
|
d.exec_()
|
||||||
|
|
||||||
def search(self, query, max_results=10, timeout=60):
|
def search(self, query, max_results=10, timeout=60):
|
||||||
url = 'http://drmfree.calibre-ebook.com/search/?q=' + urllib.quote_plus(query)
|
url = 'https://drmfree.calibre-ebook.com/search/?q=' + urllib.quote_plus(query)
|
||||||
|
|
||||||
br = browser()
|
br = browser()
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ class NPWebView(QWebView):
|
|||||||
if not confirm('<p>' + _('This ebook is a DRMed EPUB file. '
|
if not confirm('<p>' + _('This ebook is a DRMed EPUB file. '
|
||||||
'You will be prompted to save this file to your '
|
'You will be prompted to save this file to your '
|
||||||
'computer. Once it is saved, open it with '
|
'computer. Once it is saved, open it with '
|
||||||
'<a href="http://www.adobe.com/products/digitaleditions/">'
|
'<a href="https://www.adobe.com/products/digitaleditions/">'
|
||||||
'Adobe Digital Editions</a> (ADE).<p>ADE, in turn '
|
'Adobe Digital Editions</a> (ADE).<p>ADE, in turn '
|
||||||
'will download the actual ebook, which will be a '
|
'will download the actual ebook, which will be a '
|
||||||
'.epub file. You can add this book to calibre '
|
'.epub file. You can add this book to calibre '
|
||||||
|
@ -258,6 +258,7 @@ class DynamicConfig(dict):
|
|||||||
f.truncate()
|
f.truncate()
|
||||||
f.write(raw)
|
f.write(raw)
|
||||||
|
|
||||||
|
|
||||||
dynamic = DynamicConfig()
|
dynamic = DynamicConfig()
|
||||||
|
|
||||||
|
|
||||||
@ -267,7 +268,7 @@ class XMLConfig(dict):
|
|||||||
Similar to :class:`DynamicConfig`, except that it uses an XML storage
|
Similar to :class:`DynamicConfig`, except that it uses an XML storage
|
||||||
backend instead of a pickle file.
|
backend instead of a pickle file.
|
||||||
|
|
||||||
See `http://docs.python.org/dev/library/plistlib.html`_ for the supported
|
See `https://docs.python.org/dev/library/plistlib.html`_ for the supported
|
||||||
data types.
|
data types.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
@ -428,6 +429,5 @@ class DevicePrefs:
|
|||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
return self.overrides.get(key, self.global_prefs[key])
|
return self.overrides.get(key, self.global_prefs[key])
|
||||||
|
|
||||||
|
|
||||||
device_prefs = DevicePrefs(prefs)
|
device_prefs = DevicePrefs(prefs)
|
||||||
|
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ Copyright and License
|
|||||||
SmartyPants_ license::
|
SmartyPants_ license::
|
||||||
|
|
||||||
Copyright (c) 2003 John Gruber
|
Copyright (c) 2003 John Gruber
|
||||||
(http://daringfireball.net/)
|
(https://daringfireball.net/)
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
@ -367,11 +367,11 @@ smartypants.py license::
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. _John Gruber: http://daringfireball.net/
|
.. _John Gruber: https://daringfireball.net/
|
||||||
.. _Chad Miller: http://web.chad.org/
|
.. _Chad Miller: http://web.chad.org/
|
||||||
|
|
||||||
.. _Pyblosxom: http://roughingit.subtlehints.net/pyblosxom
|
.. _Pyblosxom: http://roughingit.subtlehints.net/pyblosxom
|
||||||
.. _SmartyPants: http://daringfireball.net/projects/smartypants/
|
.. _SmartyPants: https://daringfireball.net/projects/smartypants/
|
||||||
.. _Movable Type: http://www.movabletype.org/
|
.. _Movable Type: http://www.movabletype.org/
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Original Perl version by: John Gruber http://daringfireball.net/ 10 May 2008
|
Original Perl version by: John Gruber https://daringfireball.net/ 10 May 2008
|
||||||
Python version by Stuart Colville http://muffinresearch.co.uk
|
Python version by Stuart Colville http://muffinresearch.co.uk
|
||||||
Modifications to make it work with non-ascii chars by Kovid Goyal
|
Modifications to make it work with non-ascii chars by Kovid Goyal
|
||||||
License: http://www.opensource.org/licenses/mit-license.php
|
License: http://www.opensource.org/licenses/mit-license.php
|
||||||
@ -100,4 +100,3 @@ def titlecase(text):
|
|||||||
), result)
|
), result)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user