Record merging seems to work now that header offsets have been corrected.

There's an issue parsing p1220 on line 2570. Maybe making the parser ignore
full-width lines during parsing would fix the problem, if there's some
way to check the length of a row, only counting single-spaced words?
This commit is contained in:
Binh 2013-01-29 15:48:32 -06:00
parent 6e4a975cfb
commit e6e087ef38
2 changed files with 7 additions and 10 deletions

View file

@ -65,11 +65,11 @@ for rec in records:
# a lump of text and not necessarily a field entry. I assume
# this is cleaned out by the record builder class.
print last_record_ends_at + 1, begins_at
#if last_record_ends_at + 1 != begins_at:
sys.stdout.write("\nclass %s(object):\n" % re.sub('[^\w]','',rec[0]))
#print last_record_ends_at + 1, begins_at
if last_record_ends_at + 1 != begins_at:
sys.stdout.write("\nclass %s(object):\n" % re.sub('[^\w]','',rec[0].split(':')[-1]))
for field in builder.load(map(lambda x:x.tuple, rec[1][1:])):
for field in builder.load(map(lambda x:x.tuple, rec[1][0:])):
sys.stdout.write('\t' + field + '\n')
#print field