Exemplo n.º 1
0
    def get_text(self):
        """
        Return text (e.g., HTML, LaTeX, etc.) for the report.

        By default this method calls :meth:`.get_markup` and converts
        the markup to the desired output *format*.

        """
        name, _ = os.path.splitext(os.path.basename(self.outfile))
        doc = Document(title=name)
        doc.add_text(self.get_markup() or "No tables were generated. "
                     "This happens when no significant changes occured or "
                     "if for all attributes and all problems never all "
                     "algorithms had a value for this attribute in a "
                     "per-domain report.")
        return doc.render(self.output_format, {"toc": self.toc})
Exemplo n.º 2
0
    def get_text(self):
        """
        This method should be overwritten in subclasses that want to produce
        e.g. HTML or LaTeX markup or programming code directly instead of
        creating `txt2tags <http://txt2tags.org/>`_ markup.
        """
        name, ext = os.path.splitext(os.path.basename(self.outfile))
        doc = Document(title=name)
        markup = self.get_markup()

        if not markup:
            markup = ('No tables were generated. '
                      'This happens when no significant changes occured or '
                      'if for all attributes and all problems never all '
                      'configs had a value for this attribute in a '
                      'domain-wise report.')

        doc.add_text(markup)
        if len(markup) < 100000:
            print 'REPORT MARKUP:\n'
            print doc
        return doc.render(self.output_format, {'toc': self.toc})
Exemplo n.º 3
0
    def get_text(self):
        """
        This method should be overwritten in subclasses that want to produce
        e.g. HTML or LaTeX markup or programming code directly instead of
        creating `txt2tags <http://txt2tags.org/>`_ markup.
        """
        name, ext = os.path.splitext(os.path.basename(self.outfile))
        doc = Document(title=name)
        markup = self.get_markup()

        if not markup:
            markup = ('No tables were generated. '
                      'This happens when no significant changes occured or '
                      'if for all attributes and all problems never all '
                      'configs had a value for this attribute in a '
                      'domain-wise report.')

        doc.add_text(markup)
        if len(markup) < 100000:
            print 'REPORT MARKUP:\n'
            print doc
        return doc.render(self.output_format, {'toc': self.toc})