cleaned up comments - import-from-xon.py

This commit is contained in:
scuti 2024-10-28 23:33:02 -07:00
parent 70fb324923
commit ae200646c2

View File

@ -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, \