mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Fix #1901 (Recipe update for EPUB generation)
This commit is contained in:
parent
4d150760d3
commit
29d842db3e
@ -114,10 +114,13 @@ sudo python -c "import urllib2; exec urllib2.urlopen('http://calibre.kovidgoyal.
|
|||||||
wget -O- http://calibre.kovidgoyal.net/downloads/${app}-${version}.tar.gz | tar xvz
|
wget -O- http://calibre.kovidgoyal.net/downloads/${app}-${version}.tar.gz | tar xvz
|
||||||
cd calibre*
|
cd calibre*
|
||||||
python setup.py build && sudo python setup.py install
|
python setup.py build && sudo python setup.py install
|
||||||
|
sudo calibre_postinstall
|
||||||
</pre>
|
</pre>
|
||||||
Note that if your distribution does not have a
|
Note that if your distribution does not have a
|
||||||
correctly compiled libunrar.so, ${app} will not
|
correctly compiled libunrar.so, ${app} will not
|
||||||
support rar files.
|
support rar files. The calibre_postinstall step
|
||||||
|
is required for device detection and integration
|
||||||
|
with your desktop environment.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -6,8 +6,8 @@ __copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
|||||||
lasegunda.com
|
lasegunda.com
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
class LaSegunda(BasicNewsRecipe):
|
class LaSegunda(BasicNewsRecipe):
|
||||||
title = 'La Segunda'
|
title = 'La Segunda'
|
||||||
__author__ = 'Darko Miletic'
|
__author__ = 'Darko Miletic'
|
||||||
@ -21,14 +21,16 @@ class LaSegunda(BasicNewsRecipe):
|
|||||||
encoding = 'cp1252'
|
encoding = 'cp1252'
|
||||||
cover_url = 'http://www.lasegunda.com/imagenes/logotipo_lasegunda_Oli.gif'
|
cover_url = 'http://www.lasegunda.com/imagenes/logotipo_lasegunda_Oli.gif'
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
|
language = _('Spanish')
|
||||||
|
|
||||||
html2lrf_options = [
|
html2lrf_options = [
|
||||||
'--comment', description
|
'--comment', description
|
||||||
, '--category', category
|
, '--category', category
|
||||||
, '--publisher', publisher
|
, '--publisher', publisher
|
||||||
|
, '--ignore-tables'
|
||||||
]
|
]
|
||||||
|
|
||||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"'
|
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True\noverride_css=" p {text-indent: 0em; margin-top: 0em; margin-bottom: 0.5em} "'
|
||||||
|
|
||||||
keep_only_tags = [dict(name='table')]
|
keep_only_tags = [dict(name='table')]
|
||||||
|
|
||||||
@ -52,10 +54,7 @@ class LaSegunda(BasicNewsRecipe):
|
|||||||
def preprocess_html(self, soup):
|
def preprocess_html(self, soup):
|
||||||
mtag = '<meta http-equiv="Content-Language" content="es-CL"/>'
|
mtag = '<meta http-equiv="Content-Language" content="es-CL"/>'
|
||||||
soup.head.insert(0,mtag)
|
soup.head.insert(0,mtag)
|
||||||
for item in soup.findAll(name='table', width=True):
|
|
||||||
del item['width']
|
|
||||||
for item in soup.findAll(style=True):
|
for item in soup.findAll(style=True):
|
||||||
del item['style']
|
del item['style']
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
language = _('Spanish')
|
|
@ -284,7 +284,13 @@ class gui(OptionlessCommand):
|
|||||||
manifest = '<RCC>\n<qresource prefix="/">\n%s\n</qresource>\n</RCC>'%'\n'.join(files)
|
manifest = '<RCC>\n<qresource prefix="/">\n%s\n</qresource>\n</RCC>'%'\n'.join(files)
|
||||||
with open('images.qrc', 'wb') as f:
|
with open('images.qrc', 'wb') as f:
|
||||||
f.write(manifest)
|
f.write(manifest)
|
||||||
check_call(['pyrcc4', '-o', images, 'images.qrc'])
|
try:
|
||||||
|
check_call(['pyrcc4', '-o', images, 'images.qrc'])
|
||||||
|
except:
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
raise Exception('You do not have pyrcc4 in your PATH. '
|
||||||
|
'Install the PyQt4 development tools.')
|
||||||
else:
|
else:
|
||||||
print 'Images are up to date'
|
print 'Images are up to date'
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user