bumping version, improving field type guessing
This commit is contained in:
parent
730073dcd1
commit
b40e736ae0
4 changed files with 49 additions and 29 deletions
|
@ -21,6 +21,8 @@ def generate_imports():
|
|||
])
|
||||
|
||||
def generate_class_begin(name):
|
||||
name = re.sub(r"^[\d]*", "", name)
|
||||
print name
|
||||
return "class %s(mode.Model):\n" % name
|
||||
|
||||
if args.full:
|
||||
|
@ -67,7 +69,9 @@ for rec in records:
|
|||
|
||||
#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]))
|
||||
name = re.sub('^[^a-zA-Z]*','',rec[0].split(':')[-1])
|
||||
name = re.sub('[^\w]*', '', name)
|
||||
sys.stdout.write("\nclass %s(object):\n" % name)
|
||||
|
||||
for field in builder.load(map(lambda x:x.tuple, rec[1][0:])):
|
||||
sys.stdout.write('\t' + field + '\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue