parameters: (self)
return_statement: return html
docstring: Returns generated html code.
docstring_summary: Returns generated html code.
docstring_tokens: Returns generated html code .
function: def render(self):
          """ Returns generated html code.
          """
          template_src = codecs.open(self.template_file, encoding=self.encoding)
          template = jinja2.Template(template_src.read())
          slides = self.fetch_contents(self.source)
          context = self.get_template_vars(slides)
  
          html = template.render(context)
  
          if self.embed:
              images = re.findall(r'\s+background(?:-image)?:\surl\((.+?)\).+;',
                              html, re.DOTALL | re.UNICODE)
  
              for img_url in images:
                  img_url = img_url.replace('"', '').replace("'", '')
  
                  source = os.path.join(THEMES_DIR, self.theme, 'css')
  
                  encoded_url = utils.encode_image_from_url(img_url, source)
  
                  html = html.replace(img_url, encoded_url, 1)
  
          return html
function_tokens: def render ( self ) : template_src = codecs . open ( self . template_file , encoding = self . encoding ) template = jinja2 . Template ( template_src . read ( ) ) slides = self . fetch_contents ( self . source ) context = self . get_template_vars ( slides ) html = template . render ( context ) if self . embed : images = re . findall ( r'\s+background(?:-image)?:\surl\((.+?)\).+;' , html , re . DOTALL | re . UNICODE ) for img_url in images : img_url = img_url . replace ( '"' , '' ) . replace ( "'" , '' ) source = os . path . join ( THEMES_DIR , self . theme , 'css' ) encoded_url = utils . encode_image_from_url ( img_url , source ) html = html . replace ( img_url , encoded_url , 1 ) return html