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
|
||||
cd calibre*
|
||||
python setup.py build && sudo python setup.py install
|
||||
sudo calibre_postinstall
|
||||
</pre>
|
||||
Note that if your distribution does not have a
|
||||
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>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -21,14 +21,16 @@ class LaSegunda(BasicNewsRecipe):
|
||||
encoding = 'cp1252'
|
||||
cover_url = 'http://www.lasegunda.com/imagenes/logotipo_lasegunda_Oli.gif'
|
||||
remove_javascript = True
|
||||
language = _('Spanish')
|
||||
|
||||
html2lrf_options = [
|
||||
'--comment', description
|
||||
, '--category', category
|
||||
, '--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')]
|
||||
|
||||
@ -52,10 +54,7 @@ class LaSegunda(BasicNewsRecipe):
|
||||
def preprocess_html(self, soup):
|
||||
mtag = '<meta http-equiv="Content-Language" content="es-CL"/>'
|
||||
soup.head.insert(0,mtag)
|
||||
for item in soup.findAll(name='table', width=True):
|
||||
del item['width']
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
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)
|
||||
with open('images.qrc', 'wb') as f:
|
||||
f.write(manifest)
|
||||
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:
|
||||
print 'Images are up to date'
|
||||
finally:
|
||||
|
Loading…
x
Reference in New Issue
Block a user