Пример #1
0
    def str_per_command_line(self):
        result = []

        #result.append(self.text_per_command_line())
        text_item = []
        if command_line_arguments.original:
            text_item.append(self.line_num_str + self.original_text)
        if command_line_arguments.text:
            text_item.append(self.line_num_str + self.text)
        result.append('\n'.join(text_item))

        if command_line_arguments.letters:
            result.append(str_per_command_line(self.letters))
        if command_line_arguments.elisions:
            result.append(str_per_command_line(self.with_elisions))
        if command_line_arguments.clusters:
            result.append(str_per_command_line(self.with_clusters))
        if command_line_arguments.syllables:
            result.append(str_per_command_line(self.syllables))
        if command_line_arguments.feet:
            result.append(str_per_command_line(self.scans))
        return '\n'.join(intersperse('', result))
Пример #2
0
 def test_latex(self):
     command_line_arguments.format = 'latex'
     oe = Letter('oe')
     self.assertEqual(str_per_command_line(oe), r'{\oe}')