This commit is contained in:
Kovid Goyal 2007-06-08 02:17:29 +00:00
parent 5cf0a6befb
commit eefa7ec259
6 changed files with 16 additions and 11 deletions

View File

@ -13,7 +13,7 @@
## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
''' E-book management software'''
__version__ = "0.3.46"
__version__ = "0.3.47"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"

View File

@ -13,5 +13,5 @@
## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
'''
Device drivers
'''
Device drivers.
'''

View File

@ -44,6 +44,11 @@ class Device(object):
"""
raise NotImplementedError()
@classmethod
def is_connected(cls):
'''Return True iff the device is physically connected to the computer'''
raise NotImplementedError()
def get_device_information(self, end_session=True):
"""
Ask device for device information. See L{DeviceInfoQuery}.

View File

@ -106,8 +106,8 @@ def Book(options, font_delta=0, header=None,
ps['header'] = hdr
ps['topmargin'] = 10
ps['textheight'] = profile.screen_height - (options.bottom_margin + ps['topmargin']) - profile.fudge
baselineskip = (12 + 2*font_delta)*10
return _Book(textstyledefault=dict(fontsize=100+font_delta*20,
baselineskip = 120 + int(20*font_delta)
return _Book(textstyledefault=dict(fontsize=100+int(font_delta*20),
parindent=80, linespace=12,
baselineskip=baselineskip), \
pagestyledefault=ps, **settings)

View File

@ -124,7 +124,7 @@ class Span(_Span):
elif "large" in val >= 0:
ans = 120
if ans is not None:
ans += font_delta * 20
ans += int(font_delta * 20)
ans = str(ans)
return ans
@ -1222,9 +1222,9 @@ def parse_options(argv=None, cli=True):
laf = parser.add_option_group('LOOK AND FEEL')
laf.add_option('--cover', action='store', dest='cover', default=None, \
help='Path to file containing image to be used as cover')
laf.add_option('--font-delta', action='store', type='int', default=0, \
laf.add_option('--font-delta', action='store', type='float', default=0., \
help="""Increase the font size by 2 * FONT_DELTA pts and """
'''the line spacing by FONT_DELTA pts. '''
'''the line spacing by FONT_DELTA pts. FONT_DELTA can be a fraction.'''
"""If FONT_DELTA is negative, the font size is decreased.""",
dest='font_delta')
laf.add_option('--disable-autorotation', action='store_true', default=False,
@ -1266,7 +1266,7 @@ def parse_options(argv=None, cli=True):
parser.print_help()
raise ConversionError, 'no filename specified'
if options.output:
options.output = os.path.abspath(os.path.expanduser(options.output))
options.output = os.path.abspath(os.path.expanduser(options.output))
return options, args, parser

4
upload
View File

@ -43,15 +43,15 @@ f.write(open(os.path.join(HTML2LRF, 'demo.html')).read())
f.write('\n</pre>')
f.close()
check_call('''html2lrf --title='Demonstration of html2lrf' --author='Kovid Goyal' --header --output=/tmp/html2lrf.lrf %s/demo.html'''%(HTML2LRF,))
check_call('''scp /tmp/html2lrf.lrf castalia:%s/'''%(DOWNLOADS,))
check_call('''python setup.py register sdist bdist_egg upload''')
check_call('''ssh castalia rm -f %s/libprs500\*.exe'''%(DOWNLOADS,))
check_call('''scp dist/%s castalia:%s/'''%(exe, DOWNLOADS))
check_call('''ssh castalia chmod a+r %s/\*'''%(DOWNLOADS,))
check_call('''ssh castalia /root/bin/update-installer-link %s'''%(exe,))
check_call('''python setup.py register sdist bdist_egg upload''')
check_call('''epydoc --config epydoc.conf''')
check_call('''scp -r docs/html castalia:%s/'''%(DOCS,))