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)
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)
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)())
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)