for book in search_books(args.search_type, case_sensitive, values,
orderBy='title'):
print book.title.encode(default_encoding)
- for author in book.authors:
- names = filter(None,
- (author.surname, author.name, author.misc_name))
- fullname = u' '.join(names)
- print fullname.encode(default_encoding),
- print
+ if args.details > 0:
+ print " ", _("Author(s)"), ":",
+ for author in book.authors:
+ names = filter(None,
+ (author.surname, author.name, author.misc_name))
+ fullname = u' '.join(names)
+ print fullname.encode(default_encoding),
+ print
def _search_extensions(case_sensitive, args):
parser.add_argument('-s', '--series', help='search by series')
parser.add_argument('-a', '--archive', help='search by archive (zip file)')
parser.add_argument('-f', '--file', help='search by file name')
+ parser.add_argument('-d', '--details', action='count',
+ help='output more details about books; '
+ 'repeat for even more details')
parser.set_defaults(func=_search_books)
parser = subparsers.add_parser('ext', help='Search extensions')