|
|
|
@ -20,7 +20,9 @@ for hus_name in next(os.walk(BASEDIR))[1]: |
|
|
|
|
cur = con.cursor() |
|
|
|
|
|
|
|
|
|
cards = [] |
|
|
|
|
for txt in glob.glob(f"{BASEDIR+hus_name}/**/*.TXT", recursive=True): |
|
|
|
|
all_txts = sorted(glob.glob(f"{BASEDIR+hus_name}/**/*.TXT", recursive=True)) |
|
|
|
|
#print(all_txts) |
|
|
|
|
for txt in all_txts: |
|
|
|
|
|
|
|
|
|
card, year, month = os.path.split(txt)[1].split('.')[0].split('-') |
|
|
|
|
|
|
|
|
@ -101,7 +103,6 @@ for hus_name in next(os.walk(BASEDIR))[1]: |
|
|
|
|
# Sometimes, some of the lines in a file are the wrong size. |
|
|
|
|
# When that happens, we skip the file. |
|
|
|
|
if len(data[-1]) != len(col_names): |
|
|
|
|
print(" - Invalid file format; SKIPPING!", len(data[-1]), len(col_names)) |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
placeholder = f"({','.join('?' for _ in range(len(data[0])))})" |
|
|
|
|