mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
62c35de298
@ -1,3 +1,4 @@
|
|||||||
|
import re
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||||
title = u'Metro UK'
|
title = u'Metro UK'
|
||||||
@ -10,6 +11,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
|||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
|
|
||||||
|
preprocess_regexps = [(re.compile(r'Tweet'), lambda a : '')]
|
||||||
|
|
||||||
language = 'en_GB'
|
language = 'en_GB'
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ class HTMLInput(InputFormatPlugin):
|
|||||||
href=bhref)
|
href=bhref)
|
||||||
guessed = self.guess_type(href)[0]
|
guessed = self.guess_type(href)[0]
|
||||||
media_type = guessed or self.BINARY_MIME
|
media_type = guessed or self.BINARY_MIME
|
||||||
if 'text' in media_type:
|
if media_type == 'text/plain':
|
||||||
self.log.warn('Ignoring link to text file %r'%link_)
|
self.log.warn('Ignoring link to text file %r'%link_)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -1055,6 +1055,12 @@ class Manifest(object):
|
|||||||
and len(a) == 0 and not a.text:
|
and len(a) == 0 and not a.text:
|
||||||
remove_elem(a)
|
remove_elem(a)
|
||||||
|
|
||||||
|
# Convert <br>s with content into paragraphs as ADE can't handle
|
||||||
|
# them
|
||||||
|
for br in xpath(data, '//h:br'):
|
||||||
|
if len(br) > 0 or br.text:
|
||||||
|
br.tag = XHTML('div')
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def _parse_txt(self, data):
|
def _parse_txt(self, data):
|
||||||
@ -1156,7 +1162,7 @@ class Manifest(object):
|
|||||||
data = self._parse_xml(data)
|
data = self._parse_xml(data)
|
||||||
elif self.media_type.lower() in OEB_STYLES:
|
elif self.media_type.lower() in OEB_STYLES:
|
||||||
data = self._parse_css(data)
|
data = self._parse_css(data)
|
||||||
elif 'text' in self.media_type.lower():
|
elif self.media_type.lower() == 'text/plain':
|
||||||
self.oeb.log.warn('%s contains data in TXT format'%self.href,
|
self.oeb.log.warn('%s contains data in TXT format'%self.href,
|
||||||
'converting to HTML')
|
'converting to HTML')
|
||||||
data = self._parse_txt(data)
|
data = self._parse_txt(data)
|
||||||
|
@ -24,6 +24,7 @@ NON_EBOOK_EXTENSIONS = frozenset([
|
|||||||
class RestoreDatabase(LibraryDatabase2):
|
class RestoreDatabase(LibraryDatabase2):
|
||||||
|
|
||||||
PATH_LIMIT = 10
|
PATH_LIMIT = 10
|
||||||
|
WINDOWS_LIBRARY_PATH_LIMIT = 180
|
||||||
|
|
||||||
def set_path(self, *args, **kwargs):
|
def set_path(self, *args, **kwargs):
|
||||||
pass
|
pass
|
||||||
|
@ -131,7 +131,7 @@ Follow these steps to find the problem:
|
|||||||
* Make sure that you are connecting only a single device to your computer at a time. Do not have another |app| supported device like an iPhone/iPad etc. at the same time.
|
* Make sure that you are connecting only a single device to your computer at a time. Do not have another |app| supported device like an iPhone/iPad etc. at the same time.
|
||||||
* If you are connecting an Apple iDevice (iPad, iPod Touch, iPhone), use 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>`_.
|
* If you are connecting an Apple iDevice (iPad, iPod Touch, iPhone), use 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>`_.
|
||||||
* Make sure you are running the latest version of |app|. The latest version can always be downloaded from `the calibre website <http://calibre-ebook.com/download>`_.
|
* Make sure you are running the latest version of |app|. The latest version can always be downloaded from `the calibre website <http://calibre-ebook.com/download>`_.
|
||||||
* Ensure your operating system is seeing the device. That is, the device should be mounted as a disk that you can access using Windows explorer or whatever the file management program on your computer is.
|
* Ensure your operating system is seeing the device. That is, the device should be mounted as a disk, that you can access using Windows explorer or whatever the file management program on your computer is. On Windows your device **must have been assigned a drive letter**, like K:.
|
||||||
* In calibre, go to Preferences->Plugins->Device Interface plugin and make sure the plugin for your device is enabled, the plugin icon next to it should be green when it is enabled.
|
* In calibre, go to Preferences->Plugins->Device Interface plugin and make sure the plugin for your device is enabled, the plugin icon next to it should be green when it is enabled.
|
||||||
* If all the above steps fail, go to Preferences->Miscellaneous and click debug device detection with your device attached and post the output as a ticket on `the calibre bug tracker <http://bugs.calibre-ebook.com>`_.
|
* If all the above steps fail, go to Preferences->Miscellaneous and click debug device detection with your device attached and post the output as a ticket on `the calibre bug tracker <http://bugs.calibre-ebook.com>`_.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user