Massive UI changes, and updates to the collection system

This commit is contained in:
Raelon Masters
2020-03-22 01:05:42 -04:00
parent 72e54ab001
commit 53e9a1d222
10 changed files with 183 additions and 51 deletions

View File

@@ -1,4 +1,6 @@
#!/usr/bin/python
import re
import psycopg2
@@ -96,6 +98,7 @@ class Storage:
return True
def make_collections(self):
_title_regx = re.compile(r"^[0-9][0-9]*|-|\ \B")
_q = "SELECT id,file_name FROM books"
self.cursor.execute(_q)
_set = self.cursor.fetchall()
@@ -107,6 +110,9 @@ class Storage:
_pathing.pop(-1)
for _p in _pathing:
_s = _p.replace("'", "")
_x = re.sub(_title_regx, "", _s)
_s = _x.strip()
breakpoint()
_q_x = """
SELECT id FROM collections where collection='%s' AND book_id_id=%s
""" % (