diff options
Diffstat (limited to 'parsers/scans.py')
-rw-r--r-- | parsers/scans.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/parsers/scans.py b/parsers/scans.py index ad9c110..e5138c3 100644 --- a/parsers/scans.py +++ b/parsers/scans.py @@ -85,15 +85,15 @@ def load_all_scans(): seen = [] c = 0 wallets = {} - for p in scans_path.rglob("*"): + for p in scans_path.rglob("*"): # this implicitly ignoires empty folders as it looks only for files if p.is_file(): - if p.suffix.lower() not in valids and p.name.lower() not in validnames: + # if p.suffix.lower() not in valids and p.name.lower() not in validnames: + # # we do not care how the files are called. Many have no suffices at all. # print(f"'{p}'", end='\n') - pass - elif p.parent == scans_path: # skip files directly in /surveyscans/ + # pass + if p.parent == scans_path: # skip files directly in /surveyscans/ pass else: - c += 1 if c % 15 == 0: print(".", end="") @@ -101,6 +101,7 @@ def load_all_scans(): print("\n ", end="") if p.parent.parent.parent.parent == scans_path: + # the wallet has subfolders, which we are uninterested in at this point. # print(f"too deep {p}", end='\n') fpath = p.parent.parent walletname = p.parent.parent.name # wallet is one level higher @@ -167,7 +168,7 @@ def load_all_scans(): ) print(f"\n - found another {wjson:,} JSON files, making a total of {len(wallets):,} wallets") - # Only the 1999 wallets have filenames which mean that the walletyear will be unset: + # Only the 1999 wallets have filepaths which would mean that the walletyear will be unset: wallets = Wallet.objects.filter(walletyear=None) for w in wallets: w.walletyear = datetime.date(1999, 1, 1) |