Return html representation.
6670
def html(self) -> str:
        """"""
        if isinstance(self.value, bool):
            val = 'true' if self.value else 'false'
        else:
            val = str(self.value)
        return 'draggable="{}"'.format(val)
314069
def toString(self) -> str:
        """"""
        return ' '.join(attr.html for attr in self._dict.values())
573789
def as_html(self):
        
        url = '{prefix}{code}.html?download'.format(prefix=EPSG_IO_URL,
                                                    code=self.id)
        return requests.get(url).text
919933
def html(body, status=200, headers=None):
    '''
    
    '''
    return HTTPResponse(body, status=status, headers=headers,
                        content_type='text/html; charset=utf-8')
1002824
def html(self, data='', py=True):
        

        if py:
            value = self.to_html(data)
        else:
            value = data
        if self.static:
            return str('<span class="value">%s</span>' % safe_str(value))
        else:
            if self.hidden:
                build = Hidden
            else:
                build = self.build
            self._get_http_attrs()
            return str(build(name=self.name, value=value, id=self.id, **self.html_attrs))
186981
def _repr_html_():
    """"""
    from bonobo.commands.version import get_versions

    return (
        '<div style="padding: 8px;">'
        '  <div style="float: left; width: 20px; height: 20px;">{}</div>'
        '  <pre style="white-space: nowrap; padding-left: 8px">{}</pre>'
        "</div>"
    ).format(__logo__, "<br/>".join(get_versions(all=True)))
913594
def to_html(style="")
      html = @groups.map do |group|
        [
          "<h3>#{group['title']}</h3>",
          "<ul>",
          flatten_subgroups(group["items"]).map {|g| "<li><a href='#!/guide/#{g['name']}'>#{g['title']}</a></li>" },
          "</ul>",
        ]
      end.flatten.join("\n")

      return <<-EOHTML
        <div id='guides-content' style='#{style}'>
            #{html}
        </div>
      EOHTML
    end
543801
def abstract_html(self):
        """"""
        descriptions = _pluralize(self._r['descriptions'], 'description')
        for desc in descriptions:
            if desc['@descriptionType'] == 'Abstract':
                return desc['#text']
556463
def raw_html(self) -> _RawHTML:
        
        if self._html:
            return self._html
        else:
            return etree.tostring(self.element, encoding='unicode').strip().encode(self.encoding)
290820
def render_content(self):
        """"""
        if not self.has_content:
            return ""
        template = self.template
        if isinstance(self.template, str):
            template = self.app.ps.jinja2.env.get_template(self.template)
        context = self.render_vars()
        content = template.render(app=self.app, request=self.request, **context)
        return content
320749
def get_as_html(self) -> str:
        
        table_string = self._get_pretty_table().get_html_string()
        title = ('{:^' + str(len(table_string.splitlines()[0])) + '}').format(self.title)
        return f'<center><h1>{title}</h1></center>{table_string}'
1096399
def _repr_html_(self, indices=None, iops=None, lx=None, li=None, lls=None):
        """"""
        filter_ = self._current_slice_
        vals = self.flat
        if indices is None: indices = self._indices(filter_)
        if iops is None:
            ravi = self._raveled_index(filter_)
            iops = OrderedDict([name, iop.properties_for(ravi)] for name, iop in self._index_operations.items())
        if lls is None: lls = [self._max_len_names(iop, name) for name, iop in iops.items()]

        header_format = """
<tr>
  <th><b>{i}</b></th>
  <th><b>{x}</b></th>
  <th><b>{iops}</b></th>
</tr>"""
        header = header_format.format(x=self.hierarchy_name(), i=__index_name__, iops="</b></th><th><b>".join(list(iops.keys())))  # nice header for printing

        to_print = ["""<style type="text/css">
.tg  {padding:2px 3px;word-break:normal;border-collapse:collapse;border-spacing:0;border-color:#DCDCDC;margin:0px auto;width:100%;}
.tg td{font-family:"Courier New", Courier, monospace !important;font-weight:bold;color:#444;background-color:#F7FDFA;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#DCDCDC;}
.tg th{font-family:"Courier New", Courier, monospace !important;font-weight:normal;color:#fff;background-color:#26ADE4;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#DCDCDC;}
.tg .tg-left{font-family:"Courier New", Courier, monospace !important;font-weight:normal;text-align:left;}
.tg .tg-right{font-family:"Courier New", Courier, monospace !important;font-weight:normal;text-align:right;}
</style>"""]
        to_print.append('<table class="tg">')
        to_print.append(header)

        format_spec = self._format_spec(indices, iops, lx, li, lls, False)
        format_spec[:2] = ["<tr><td class=tg-left>{i}</td>".format(i=format_spec[0]), "<td class=tg-right>{i}</td>".format(i=format_spec[1])]
        for i in range(2, len(format_spec)):
            format_spec[i] = '<td class=tg-left>{c}</td>'.format(c=format_spec[i])
        format_spec = "".join(format_spec) + '</tr>'

        for i in range(self.size):
            to_print.append(format_spec.format(index=indices[i], value="{1:.{0}f}".format(__precision__, vals[i]), **dict((name, ' '.join(map(str, iops[name][i]))) for name in iops)))
        return '\n'.join(to_print)
570895
def _htmlify_text(self, s):
    """"""
    colored = self._handle_ansi_color_codes(html.escape(s))
    return linkify(self._buildroot, colored, self._linkify_memo).replace('\n', '</br>')
5903
def _repr_html_(self):
        """"""
        out = "<table class='taqltable' style='overflow-x:auto'>\n"

        # Print column names (not if they are all auto-generated)
        if not(all([colname[:4] == "Col_" for colname in self.colnames()])):
            out += "<tr>"
            for colname in self.colnames():
                out += "<th><b>"+colname+"</b></th>"
            out += "</tr>"

        cropped = False
        rowcount = 0
        for row in self:
            rowout = _format_row(row, self.colnames(), self)
            rowcount += 1
            out += rowout
            if "\n" in rowout:  # Double space after multiline rows
                out += "\n"
            out += "\n"
            if rowcount >= 20:
                cropped = True
                break

        if out[-2:] == "\n\n":
            out = out[:-1]

        out += "</table>"

        if cropped:
            out += ("<p style='text-align:center'>(" +
                    str(self.nrows()-20)+" more rows)</p>\n")

        return out
451595
def get_text_from_html(html):
  """"""

  try:
    soup = bs4.BeautifulSoup(html, "html.parser")
  except:  # pylint: disable=bare-except
    # Some docs don't parse
    return ""
  # Remove script and style tags
  for s in soup(["script", "style"]):
    s.decompose()
  return "\n".join([s for s in _soup_strings(soup)])
940221
def to_html(self):
        
        if self.text is None:
            return
        else:
            return '<p%s>%s%s</p>' % (
                self.html_attributes(), self.html_icon(), self.text.to_html())
1173596
def get_html(self):
        """"""
        if self.__htmltree is not None:
            return self.__htmltree
        else:
            self.__make_tree()
            return self.__htmltree