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

View File

@ -13,5 +13,5 @@
## with this program; if not, write to the Free Software Foundation, Inc., ## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ## 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() 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): def get_device_information(self, end_session=True):
""" """
Ask device for device information. See L{DeviceInfoQuery}. 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['header'] = hdr
ps['topmargin'] = 10 ps['topmargin'] = 10
ps['textheight'] = profile.screen_height - (options.bottom_margin + ps['topmargin']) - profile.fudge ps['textheight'] = profile.screen_height - (options.bottom_margin + ps['topmargin']) - profile.fudge
baselineskip = (12 + 2*font_delta)*10 baselineskip = 120 + int(20*font_delta)
return _Book(textstyledefault=dict(fontsize=100+font_delta*20, return _Book(textstyledefault=dict(fontsize=100+int(font_delta*20),
parindent=80, linespace=12, parindent=80, linespace=12,
baselineskip=baselineskip), \ baselineskip=baselineskip), \
pagestyledefault=ps, **settings) pagestyledefault=ps, **settings)

View File

@ -124,7 +124,7 @@ class Span(_Span):
elif "large" in val >= 0: elif "large" in val >= 0:
ans = 120 ans = 120
if ans is not None: if ans is not None:
ans += font_delta * 20 ans += int(font_delta * 20)
ans = str(ans) ans = str(ans)
return ans return ans
@ -1222,9 +1222,9 @@ def parse_options(argv=None, cli=True):
laf = parser.add_option_group('LOOK AND FEEL') laf = parser.add_option_group('LOOK AND FEEL')
laf.add_option('--cover', action='store', dest='cover', default=None, \ laf.add_option('--cover', action='store', dest='cover', default=None, \
help='Path to file containing image to be used as cover') 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 """ 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.""", """If FONT_DELTA is negative, the font size is decreased.""",
dest='font_delta') dest='font_delta')
laf.add_option('--disable-autorotation', action='store_true', default=False, laf.add_option('--disable-autorotation', action='store_true', default=False,

2
upload
View File

@ -46,12 +46,12 @@ f.close()
check_call('''html2lrf --title='Demonstration of html2lrf' --author='Kovid Goyal' --header --output=/tmp/html2lrf.lrf %s/demo.html'''%(HTML2LRF,)) 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('''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('''ssh castalia rm -f %s/libprs500\*.exe'''%(DOWNLOADS,))
check_call('''scp dist/%s castalia:%s/'''%(exe, DOWNLOADS)) check_call('''scp dist/%s castalia:%s/'''%(exe, DOWNLOADS))
check_call('''ssh castalia chmod a+r %s/\*'''%(DOWNLOADS,)) check_call('''ssh castalia chmod a+r %s/\*'''%(DOWNLOADS,))
check_call('''ssh castalia /root/bin/update-installer-link %s'''%(exe,)) 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('''epydoc --config epydoc.conf''')
check_call('''scp -r docs/html castalia:%s/'''%(DOCS,)) check_call('''scp -r docs/html castalia:%s/'''%(DOCS,))