From 94f4539242158705ec70ca2696ebbcdd3da1423d Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 3 May 2020 23:29:47 +0000 Subject: [PATCH] Add clean script --- clean.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 clean.py diff --git a/clean.py b/clean.py new file mode 100644 index 0000000..03891f2 --- /dev/null +++ b/clean.py @@ -0,0 +1,21 @@ +import shelve + +db = shelve.open('t0txt') + +new = shelve.open('new') + +for k in db.keys(): + try: + note = db[k] + except: + print('error', k) + continue + + if not note and not isinstance(note, str): + print('bad', k) + continue + + if k == 'HVQH': + continue + + new[k] = note