Changeset 8938 for main/waeup.kofa/trunk
- Timestamp:
- 7 Jul 2012, 22:33:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/tools/fix_import_file.py
r8785 r8938 85 85 'lga': 'lga', 86 86 'order_id': 'no_int', 87 'uniben': 'former', 88 'nysc_year': 'year', 89 'alr_date': 'date', 90 'fst_sit_date': 'date', 91 'scd_sit_date': 'date', 92 'emp_start': 'date', 93 'emp_end': 'date', 94 'emp_start2': 'date', 95 'emp_end2': 'date', 96 'fst_sit_results': 'result', 97 'scd_sit_results': 'result', 98 'alr_results': 'result', 87 99 } 88 100 … … 117 129 'surcharge': 'surcharge_1', 118 130 'session_id': 'p_session', 131 'hq_grade': 'hq_degree', 132 'uniben': 'former_matric', 133 'hq_type2': 'hq2_type', 134 'hq_grade2': 'hq2_degree', 135 'hq_school2': 'hq2_school', 136 'hq_matric_no2': 'hq2_matric_no', 137 'hq_session2': 'hq2_session', 138 'hq_disc2': 'hq2_disc', 139 'emp': 'employer', 140 'emp2': 'employer2', 141 'emp_position2': 'emp2_position', 142 'emp_start2': 'emp2_start', 143 'emp_end2': 'emp2_end', 144 'emp_reason2': 'emp2_reason', 119 145 } 120 146 … … 244 270 245 271 @classmethod 272 def former(self, value): 273 """ True --> yes 274 '2008/2009' --> '2008' 275 """ 276 if value == 'True': 277 return 'yes' 278 return 279 280 @classmethod 281 def year(self, value): 282 """ '0' --> '' 283 """ 284 if value == '0': 285 return 286 if value == 'None': 287 return 288 return value 289 290 291 @classmethod 246 292 def marit_stat(self, value): 247 293 """ 'True'/'False' --> 'married'/'unmarried' … … 335 381 of numbers. 336 382 """ 383 if not value: 384 return 337 385 value = value.replace('-', '') 338 386 value = value.replace('/', '') … … 340 388 phone = match.groups()[0] 341 389 value = '-%s' % phone 342 return value 343 390 return value + '#' 391 392 @classmethod 393 def result(self, value): 394 try: 395 liste = eval(value) 396 except: 397 return 398 if isinstance(liste,list): 399 return [(i[0].lower(),i[1]) for i in liste] 400 return 344 401 345 402 def main():
Note: See TracChangeset for help on using the changeset viewer.