14 def make_insert(table,fields):
15 s = 'INSERT INTO ' + table + ' VALUES('
30 if thisline[-2:] == '\r\n':
31 thisline = thisline[:-2]
34 if lastline == 'Name:':
35 names = thisline.split()
37 firstName = add_quotes(names[0])
40 thisName = add_quotes(thisline)
41 if lastline == 'Born:':
42 yb = findYear.find_year(thisline)
43 thisBorn = add_quotes(thisline)
44 if lastline == 'Died:':
45 yd = findYear.find_year(thisline)
46 thisDied = add_quotes(thisline)
48 if lastline == 'Father:':
49 a = is_number(thisline)
50 s = make_insert('parents',[thisID, a])
52 if lastline=='Mother:':
54 s = make_insert('parents',[thisID, a])
57 if finishedRecord ==1:
58 s = make_insert('people',\
59 [thisID,thisName,firstName,thisBorn,yb,thisDied,yd])
62 if lastline == 'Style:':
63 thisStyle = add_quotes(thisline)
69 thisTerr.append(add_quotes(thisline))
70 if lastline == 'Territories:':
71 thisTerr=[add_quotes(thisline)]
75 yf = findYear.find_year(thisline)
76 thisFrom = add_quotes(thisline)
78 yt = findYear.find_year(thisline)
79 thisTo = add_quotes(thisline)
80 s = make_insert('styles',[thisID,thisStyle,thisFrom,\
85 s = make_insert('territories',[thisID,terr,\
86 thisFrom,yf,thisTo,yt])