Przeglądaj źródła

Removed old code that doesn't do what we want to do

david 5 lat temu
rodzic
commit
b3cbec6ab2
1 zmienionych plików z 0 dodań i 68 usunięć
  1. 0 68
      dataLoad.py

+ 0 - 68
dataLoad.py

@@ -402,73 +402,5 @@ if args.update:
         for line in lines:
             fp.write(line)
 
-# ----------------------------------------------------------------------------------------
-# All below was in a seperate dataJS.py file... but now I have fixed it so it's 1 script!
-# Do we really need to worry about all this right now? (I think we have enough bugs to begin with.)
-JSONME = "false"  # Do not execute
-if JSONME.lower() != "false":
-    print("Now exporting to JSON")
-    print(f"Targeting file: '{JSONME}'")
-    time.sleep(5)
-
-    def test(t):
-        global DIR
-        """
-        given the filename, we read it and add it to a list and return the list.
-        """
-        fname = f"{DIR}/{t}.txt"
-        r = []
-        try:
-            with open(fname, "r") as f:
-                for l in f:
-                    r.append(l.strip())
-            return r
-        except FileNotFoundError:
-            return None
-
-    def insertJS(item):
-        global JSON
-        """
-        Edits the file given and adds the JSONIFIED item to the file between 2 indicators,
-        // T
-        and
-        // t
-        In between the T and t will be replaced with the item.
-        """
-        item = json.dumps(item)
-        item = f"{item},"
-        r = []
-        try:
-            with open(f"{JSONME}", "r") as f:
-                for l in f:
-                    if l != "":
-                        r.append(l.strip("\n"))
-                    else:
-                        r.append("")
-        except FileNotFoundError:
-            print(f"File {JSONME} Not Found!")
-            sys.exit()
-
-        c = 0
-        for e in r:
-            if "// T" == e:
-                temp = r[c + 1]
-                del r[c + 1]
-                r.insert(c + 1, item)
-                r.insert(c + 2, temp)
-            elif "// t" == e:
-                break
-            c += 1
-
-        with open(f"{JSONME}", "w") as f:
-            for e in r:
-                f.write(f"{e}\n")
-
-    for x in range(0, 183):
-        te = test(x)
-        if te != None:
-            word = te
-            insertJS(word)
-
 # Regardless what we did let the user know we at least ran and we are now done
 print("Complete")