def _hook_font(self, book, appendix, container, code, argv): if (code, argv[0]) in self.gaiji: replacement = "{{0x{}}}".format( self.gaiji[(code, argv[0])].encode('hex')) else: replacement = "{{0x{}}}".format(UNKNOWN_SYMBOL.encode('hex')) eb.eb_write_text_string(book, replacement) return eb.EB_SUCCESS
def _hook_end_color_graphic(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "</FIG>") return eb.EB_SUCCESS
def _hook_end_wave(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "</WAV>") return eb.EB_SUCCESS
def _hook_begin_mono_graphic(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "<FIG>") return eb.EB_SUCCESS
def _hook_begin_color_jpeg(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "<FIG>") return eb.EB_SUCCESS
def _hook_end_subscript(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "</SUB>") return eb.EB_SUCCESS
def _hook_end_emphasis(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "</B>") return eb.EB_SUCCESS
def _hook_begin_superscript(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "<SUP>") return eb.EB_SUCCESS
def _hook_end_keyword(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "</HEAD>") return eb.EB_SUCCESS
def _hook_set_indent(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "<INDENT={:d}>".format( argv[1])) return eb.EB_SUCCESS
def _hook_end_reference(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "</LINK[{:d}:{:d}]>".format( argv[1], argv[2])) return eb.EB_SUCCESS
def _hook_begin_reference(self, book, appendix, container, code, argv): eb.eb_write_text_string(book, "<LINK>") return eb.EB_SUCCESS