From ec6c1eb5a12c7519f5a0cdc105a8d4fbdd77a0c9 Mon Sep 17 00:00:00 2001 From: lickthecheese Date: Tue, 24 Mar 2020 17:56:44 -0400 Subject: [PATCH] clear spaces from db lol --- clean.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 clean.py diff --git a/clean.py b/clean.py new file mode 100755 index 0000000..98912e8 --- /dev/null +++ b/clean.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import json + +with open('nboard.json', 'r') as file: + data = json.load(file) + +print(len(data)) + +data = {k:v for k, v in data.items() if v is not " "} + +print(len(data)) + +with open('nboard.json', 'w') as file: + json.dump(data, file) +