######################################################################### # # # # # copyright 2002 Paul Henry Tremblay # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # # General Public License for more details. # # # # # ######################################################################### import os from ebook_converter.ebooks.rtf2xml import copy from ebook_converter.ptempfile import better_mktemp from . import open_for_read, open_for_write class CombineBorders: """Combine borders in RTF tokens to make later processing easier""" def __init__(self, in_file , bug_handler, copy=None, run_level=1, ): self.__file = in_file self.__bug_handler = bug_handler self.__copy = copy self.__write_to = better_mktemp() self.__state = 'default' self.__bord_pos = 'default' self.__bord_att = [] def found_bd(self, line): # cw