diff --git a/scripts/import-from-xon.py b/scripts/import-from-xon.py index dd9d841..b3bf87d 100644 --- a/scripts/import-from-xon.py +++ b/scripts/import-from-xon.py @@ -59,7 +59,7 @@ def init_logging(): return filename #------------------------------------------------+ -# Functions: Clean up. +# uid2namefix #------------------------------------------------+ # Unlike other rows, # the separator character, '/' is part of the value of the second column. @@ -68,6 +68,7 @@ def init_logging(): # \/uid2name/Mnumg2Yh/yxNFDTqGI+YyhlM7QDI0fpEmAaBJ8cI5dU=\Tuxxy # it should become: # ["uid2name", "Mnumg2Yh/yxNFDTqGI+YyhlM7QDI0fpEmAaBJ8cI5dU=", "Tuxxy"] + def uid2namefix(row): # quick fix # replace first and last occurrence of backslash @@ -120,11 +121,6 @@ def filters(db): sid.append([ e[0], unquote(e[-1]) ]) return tt, tr, ti, s, sid -#------------------------------------------------+ -# Functions: Database Creation -#------------------------------------------------+ - -# insert new data directly into new database file def insert_to_database(d, s): def insert(c, q, d): for x in d: @@ -166,7 +162,6 @@ def insert_to_database(d, s): if con: con.rollback() -# 'insert' new data into a file i.e sql query file def write_query(out_file, data): times, \ ranks, \