Esempio n. 1
0
    def save(self, **kwargs):
        render_func = curry(load_path_attr(PARSER[0], **PARSER[1]))

        self.summary_html = render_func(self.summary_txt)
        self.description_html = render_func(self.description_txt)

        super(Project, self).save(**kwargs)
Esempio n. 2
0
                    gloss = None
                if pos in ["V-"]:
                    parse = verb_parse(row["ccat-parse"])
                else:
                    parse = None
                print(backend.word(text, headword, parse, gloss, language))
            else:
                print(backend.word(text))

        elif entry[0] == "VERSE_START":
            if postponed_book:
                print(backend.book_chapter_verse(
                    postponed_book, postponed_chapter, entry[1]))
                postponed_book = postponed_chapter = None
            elif postponed_chapter:
                print(backend.chapter_verse(postponed_chapter, entry[1]))
                postponed_chapter = None
            else:
                print(backend.verse(entry[1]))
        elif entry[0] == "CHAPTER_START":
            postponed_chapter = entry[1]
        elif entry[0] == "BOOK_START":
            postponed_book = entry[1]
        else:
            print(backend.comment(entry))

    print(backend.postamble())


output_reader(verses, load_path_attr(args.backend)(), args.language)
Esempio n. 3
0
                pos = row["ccat-pos"]
                headword = headwords.get(lexeme, lexeme)
                if glosses:
                    gloss = glosses[lexeme].get(
                        row["bcv"], glosses[lexeme]["default"])
                else:
                    gloss = None
                if pos in ["V-"]:
                    parse = verb_parse(row["ccat-parse"])
                else:
                    parse = None
                print(backend.word(text, headword, parse, gloss))
            else:
                print(backend.word(text))

        elif entry[0] == "VERSE_START":
            if postponed_chapter:
                print(backend.chapter_verse(postponed_chapter, entry[1]))
                postponed_chapter = None
            else:
                print(backend.verse(entry[1]))
        elif entry[0] == "CHAPTER_START":
            postponed_chapter = entry[1]
        else:
            print(backend.comment(entry))

    print(backend.postamble())


output_reader(verses, load_path_attr(args.backend)())
Esempio n. 4
0
                if pos in ["V-"]:
                    parse = verb_parse(row["ccat-parse"])
                else:
                    parse = None
                print(backend.word(text, headword, parse, gloss, language))
            else:
                print(backend.word(text))

        elif entry[0] == "VERSE_START":
            if postponed_book:
                print(
                    backend.book_chapter_verse(postponed_book,
                                               postponed_chapter, entry[1]))
                postponed_book = postponed_chapter = None
            elif postponed_chapter:
                print(backend.chapter_verse(postponed_chapter, entry[1]))
                postponed_chapter = None
            else:
                print(backend.verse(entry[1]))
        elif entry[0] == "CHAPTER_START":
            postponed_chapter = entry[1]
        elif entry[0] == "BOOK_START":
            postponed_book = entry[1]
        else:
            print(backend.comment(entry))

    print(backend.postamble())


output_reader(verses, load_path_attr(args.backend)(), args.language)