summaryrefslogtreecommitdiff
path: root/parse_datasheet/imch_conf.py
blob: 3f344c6bb75786684427ed239171c76de60833c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from datasheet_tables import TE_Id, ProfileBase, register_profile


class Imch(ProfileBase):
    name = "imch_conf"
    min_page = 391
    max_page = 444
    te_table = {
        (432, TE_Id(text=u'N 00001b', top=384, left=409, width=60, height=8)):
             [TE_Id(text=u'N',        top=384, left=409, width=4,  height=8),
              TE_Id(text=u'00001b',   top=384, left=427, width=50, height=8)],
    }
    def special_replace(self, ps, te):
        return self.special_te_mapper(ps, te, self.te_table)
    def post_fix(self, a_t):
        t = a_t.find_by_base_name('DRC')
        for l in t.lines:
            if l.c_range.range == (7, 8):
                l.c_range.paragraphs = ["8:7"]
                l.analyse_line()
    def table_blacklisted(self, chapter, table_num):
        return ((chapter, table_num) == (16, 43))
            

register_profile(Imch)