mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix typo that would crash --cover and prevent last char from being cut off in header
This commit is contained in:
parent
e9e066355a
commit
2e6f495305
@ -20,7 +20,8 @@ At the time fo writing, this package only supports reading and writing LRF meat
|
|||||||
from optparse import OptionParser, OptionValueError
|
from optparse import OptionParser, OptionValueError
|
||||||
|
|
||||||
from libprs500.ebooks.lrf.pylrs.pylrs import Book as _Book
|
from libprs500.ebooks.lrf.pylrs.pylrs import Book as _Book
|
||||||
from libprs500.ebooks.lrf.pylrs.pylrs import TextBlock, Header, PutObj, Paragraph, TextStyle
|
from libprs500.ebooks.lrf.pylrs.pylrs import TextBlock, Header, PutObj, \
|
||||||
|
Paragraph, TextStyle, BlockStyle
|
||||||
from libprs500 import __version__ as VERSION
|
from libprs500 import __version__ as VERSION
|
||||||
|
|
||||||
__docformat__ = "epytext"
|
__docformat__ = "epytext"
|
||||||
@ -82,7 +83,8 @@ def Book(font_delta=0, header=None, profile=PRS500_PROFILE, **settings):
|
|||||||
textheight=profile.page_height)
|
textheight=profile.page_height)
|
||||||
if header:
|
if header:
|
||||||
hdr = Header()
|
hdr = Header()
|
||||||
hb = TextBlock(textStyle=TextStyle(align='foot', fontsize=60))
|
hb = TextBlock(textStyle=TextStyle(align='foot', fontsize=60),
|
||||||
|
blockStyle=BlockStyle(sidemargin=10))
|
||||||
hb.append(header)
|
hb.append(header)
|
||||||
hdr.PutObj(hb)
|
hdr.PutObj(hb)
|
||||||
ps['headheight'] = 30
|
ps['headheight'] = 30
|
||||||
|
@ -1051,7 +1051,7 @@ def process_file(path, options):
|
|||||||
options.cover = os.path.abspath(os.path.expanduser(options.cover))
|
options.cover = os.path.abspath(os.path.expanduser(options.cover))
|
||||||
cpath = options.cover
|
cpath = options.cover
|
||||||
if os.access(options.cover, os.R_OK):
|
if os.access(options.cover, os.R_OK):
|
||||||
from libprs500.prs500 import PRS500
|
from libprs500.devices.prs500.driver import PRS500
|
||||||
im = PILImage.open(os.path.join(cwd, cpath))
|
im = PILImage.open(os.path.join(cwd, cpath))
|
||||||
cim = im.resize((options.profile.screen_width,
|
cim = im.resize((options.profile.screen_width,
|
||||||
options.profile.screen_height),
|
options.profile.screen_height),
|
||||||
@ -1088,7 +1088,7 @@ def process_file(path, options):
|
|||||||
header = Paragraph()
|
header = Paragraph()
|
||||||
header.append(Bold(options.title))
|
header.append(Bold(options.title))
|
||||||
header.append(' by ')
|
header.append(' by ')
|
||||||
header.append(Italic(options.author))
|
header.append(Italic(options.author+" "))
|
||||||
book = Book(header=header, **args)
|
book = Book(header=header, **args)
|
||||||
le = re.compile(options.link_exclude) if options.link_exclude else \
|
le = re.compile(options.link_exclude) if options.link_exclude else \
|
||||||
re.compile('$')
|
re.compile('$')
|
||||||
|
10
upload
10
upload
@ -6,12 +6,12 @@ PREFIX=/var/www/vhosts/kovidgoyal.net/subdomains/libprs500
|
|||||||
DOWNLOADS=$PREFIX/httpdocs/downloads
|
DOWNLOADS=$PREFIX/httpdocs/downloads
|
||||||
DOCS=$PREFIX/httpdocs/apidocs
|
DOCS=$PREFIX/httpdocs/apidocs
|
||||||
exe=`cd dist && ls -1 libprs500-*.exe | tail -n1 && cd ..`
|
exe=`cd dist && ls -1 libprs500-*.exe | tail -n1 && cd ..`
|
||||||
|
HTML2LRF=src/libprs500/ebooks/lrf/html/demo
|
||||||
|
|
||||||
|
echo "<h2>The HTML</h2><pre>" > ${HTML2LRF}/demo_ext.html
|
||||||
echo "<h2>The HTML</h2><pre>" > src/libprs500/lrf/html/demo/demo_ext.html
|
cat ${HTML2LRF}/demo.html >> ${HTML2LRF}/demo_ext.html
|
||||||
cat src/libprs500/lrf/html/demo/demo.html >> src/libprs500/lrf/html/demo/demo_ext.html
|
echo '</pre>' >> ${HTML2LRF}/demo_ext.html
|
||||||
echo '</pre>' >> src/libprs500/lrf/html/demo/demo_ext.html
|
html2lrf --title='Demonstration of html2lrf' --author='Kovid Goyal' --header --output=/tmp/html2lrf.lrf ${HTML2LRF}/demo.html
|
||||||
html2lrf --title='Demonstration of html2lrf' --author='Kovid Goyal' --header --output=/tmp/html2lrf.lrf src/libprs500/lrf/html/demo/demo.html
|
|
||||||
scp /tmp/html2lrf.lrf castalia:$DOWNLOADS/
|
scp /tmp/html2lrf.lrf castalia:$DOWNLOADS/
|
||||||
|
|
||||||
ssh castalia rm -f $DOWNLOADS/libprs500\*.exe
|
ssh castalia rm -f $DOWNLOADS/libprs500\*.exe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user