This commit is contained in:
Kovid Goyal 2007-09-06 17:06:04 +00:00
parent 072852e031
commit 4673151e0f

View File

@ -605,6 +605,8 @@ def option_parser():
parser.add_option("--get-thumbnail", action="store_true", \ parser.add_option("--get-thumbnail", action="store_true", \
dest="get_thumbnail", default=False, \ dest="get_thumbnail", default=False, \
help="Extract thumbnail from LRF file") help="Extract thumbnail from LRF file")
parser.add_option('--bookid', action='store', type='string', default=None,
dest='book_id', help='Set book ID')
parser.add_option("-p", "--page", action="store", type="string", \ parser.add_option("-p", "--page", action="store", type="string", \
dest="page", help="Don't know what this is for") dest="page", help="Don't know what this is for")
@ -638,6 +640,8 @@ def main(args=sys.argv):
f = open(path, "rb") f = open(path, "rb")
lrf.thumbnail = f.read() lrf.thumbnail = f.read()
f.close() f.close()
if options.book_id is not None:
lrf.book_id = options.book_id
if options.comment: if options.comment:
path = os.path.expanduser(os.path.expandvars(options.comment)) path = os.path.expanduser(os.path.expandvars(options.comment))
lrf.free_text = open(path).read() lrf.free_text = open(path).read()