Ejemplo n.º 1
0
def main():
    """
    Produce output and print to pager.
    """
    dummy = TextGen()
    print('')  # pylint: disable=C0325
    text_str = ''
    for _ in range(PARAS):
        pgraph = Paragraph(dummy.chunk(), int(Cli.width() * 0.6), True)
        pgraph.set_lmargin(Cli.width() // 5)
        text_str += str(pgraph)
    if PAGER is True:
        Cli.less(text_str)
    else:
        print(text_str)  # pylint: disable=C0325
Ejemplo n.º 2
0
    def store_paragraph(self, no_indent):
        """
        Use contents of 'buffer' to construct a new Paragraph object,
        and we clear 'buffer' to read in the next paragraph of text.
        """
	#print "begin store_paragraph()"
        self.pgraph_no += 1
        if len(self.buffer) > 0:
            self.easy_subs()

            #self.strip_unknown_tags()

            paragraph = Paragraph(self.buffer, self.tabpoints[1], no_indent)
            paragraph.set_lmargin(self.tabpoints[0])
            #print "add to section"
            self.s_list[len(self.s_list) - 1] += paragraph
            self.buffer = ""