comparison rankfilter_GCMS/pdfread.py @ 60:35f506f30ae4

fixed small rule in pdfread, and other small enhancements
author pieter.lukasse@wur.nl
date Fri, 19 Dec 2014 11:30:22 +0100
parents 637830ac8bcd
children d685210eef3e
comparison
equal deleted inserted replaced
59:458e05d1d172 60:35f506f30ae4
73 73
74 # uggly workaround for the cases where there ends up to be no space between the name and the formula: exaustive 74 # uggly workaround for the cases where there ends up to be no space between the name and the formula: exaustive
75 # replaces of known cases by the same with a white space: 75 # replaces of known cases by the same with a white space:
76 name_tmp = name_tmp.replace('lC', 'l C').replace(']C', '] C').replace('sC', 's C').replace('9C', '9 C').replace('.C', '. C') 76 name_tmp = name_tmp.replace('lC', 'l C').replace(']C', '] C').replace('sC', 's C').replace('9C', '9 C').replace('.C', '. C')
77 name_tmp = name_tmp.replace(')C', ') C').replace('eC', 'e C').replace('yC', 'y C').replace('oC', 'o C').replace('-C', '- C').replace('dC', 'd C').replace('rC', 'r C') 77 name_tmp = name_tmp.replace(')C', ') C').replace('eC', 'e C').replace('yC', 'y C').replace('oC', 'o C').replace('-C', '- C').replace('dC', 'd C').replace('rC', 'r C')
78 name_tmp = name_tmp.replace('-, LC', '-, L C').replace('-, DC', '-, D C') 78 name_tmp = name_tmp.replace(', LC', ', L C').replace(', DC', ', D C')
79 79
80 name.append((' '.join(name_tmp.split(' ')[0:len(name_tmp) - 1])).replace(" ", " ")) 80 name.append((' '.join(name_tmp.split(' ')[0:len(name_tmp) - 1])).replace(" ", " "))
81 if name_tmp: 81 if name_tmp:
82 if name_tmp.split(' ')[-1][0] == 'C' or name_tmp.split(' ')[-1][0] == 'F' or name_tmp.split(' ')[-1][0] == 'H': 82 if name_tmp.split(' ')[-1][0] == 'C' or name_tmp.split(' ')[-1][0] == 'F' or name_tmp.split(' ')[-1][0] == 'H':
83 formule = (name_tmp.split(' ')[-1]) 83 formule = (name_tmp.split(' ')[-1])