def create_oebbook(log, path_or_stream, opts, reader=None, encoding='utf-8', populate=True, for_regex_wizard=False, specialize=None):
 from calibre.ebooks.oeb.base import OEBBook
 html_preprocessor = HTMLPreProcessor(log, opts, regex_wizard_callback=regex_wizard_callback)
 if (not encoding):
  encoding = None
 oeb = OEBBook(log, html_preprocessor, pretty_print=opts.pretty_print, input_encoding=encoding)
 if (not populate):
  return oeb
 if (specialize is not None):
  oeb = (specialize(oeb) or oeb)
 log('Parsing all content...')
 if (reader is None):
  from calibre.ebooks.oeb.reader import OEBReader
  reader = OEBReader
 reader()(oeb, path_or_stream)
 return oeb

def create_oebbook ( log , path_or_stream , opts , reader = None , encoding = 'utf-8' , populate = True , for_regex_wizard = False , specialize = None ) : from calibre . ebooks . oeb . base import OEBBook html_preprocessor = HTMLPreProcessor ( log , opts , regex_wizard_callback = regex_wizard_callback ) if ( not encoding ) : encoding = None oeb = OEBBook ( log , html_preprocessor , pretty_print = opts . pretty_print , input_encoding = encoding ) if ( not populate ) : return oeb if ( specialize is not None ) : oeb = ( specialize ( oeb ) or oeb ) log ( 'Parsing all content...' ) if ( reader is None ) : from calibre . ebooks . oeb . reader import OEBReader reader = OEBReader reader ( ) ( oeb , path_or_stream ) return oeb
create an oebbook .