def MetaInformation(title, authors=(_('Unknown'),)):
 from calibre.ebooks.metadata.book.base import Metadata
 mi = None
 if (hasattr(title, 'title') and hasattr(title, 'authors')):
  mi = title
  title = mi.title
  authors = mi.authors
 return Metadata(title, authors, other=mi)

def MetaInformation ( title , authors = ( _ ( 'Unknown' ) , ) ) : from calibre . ebooks . metadata . book . base import Metadata mi = None if ( hasattr ( title , 'title' ) and hasattr ( title , 'authors' ) ) : mi = title title = mi . title authors = mi . authors return Metadata ( title , authors , other = mi )
convenient encapsulation of book metadata .