cleaned up comments - import-from-xon.py
This commit is contained in:
parent
70fb324923
commit
ae200646c2
@ -59,7 +59,7 @@ def init_logging():
|
|||||||
return filename
|
return filename
|
||||||
|
|
||||||
#------------------------------------------------+
|
#------------------------------------------------+
|
||||||
# Functions: Clean up.
|
# uid2namefix
|
||||||
#------------------------------------------------+
|
#------------------------------------------------+
|
||||||
# Unlike other rows,
|
# Unlike other rows,
|
||||||
# the separator character, '/' is part of the value of the second column.
|
# the separator character, '/' is part of the value of the second column.
|
||||||
@ -68,6 +68,7 @@ def init_logging():
|
|||||||
# \/uid2name/Mnumg2Yh/yxNFDTqGI+YyhlM7QDI0fpEmAaBJ8cI5dU=\Tuxxy
|
# \/uid2name/Mnumg2Yh/yxNFDTqGI+YyhlM7QDI0fpEmAaBJ8cI5dU=\Tuxxy
|
||||||
# it should become:
|
# it should become:
|
||||||
# ["uid2name", "Mnumg2Yh/yxNFDTqGI+YyhlM7QDI0fpEmAaBJ8cI5dU=", "Tuxxy"]
|
# ["uid2name", "Mnumg2Yh/yxNFDTqGI+YyhlM7QDI0fpEmAaBJ8cI5dU=", "Tuxxy"]
|
||||||
|
|
||||||
def uid2namefix(row):
|
def uid2namefix(row):
|
||||||
# quick fix
|
# quick fix
|
||||||
# replace first and last occurrence of backslash
|
# replace first and last occurrence of backslash
|
||||||
@ -120,11 +121,6 @@ def filters(db):
|
|||||||
sid.append([ e[0], unquote(e[-1]) ])
|
sid.append([ e[0], unquote(e[-1]) ])
|
||||||
return tt, tr, ti, s, sid
|
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_to_database(d, s):
|
||||||
def insert(c, q, d):
|
def insert(c, q, d):
|
||||||
for x in d:
|
for x in d:
|
||||||
@ -166,7 +162,6 @@ def insert_to_database(d, s):
|
|||||||
if con:
|
if con:
|
||||||
con.rollback()
|
con.rollback()
|
||||||
|
|
||||||
# 'insert' new data into a file i.e sql query file
|
|
||||||
def write_query(out_file, data):
|
def write_query(out_file, data):
|
||||||
times, \
|
times, \
|
||||||
ranks, \
|
ranks, \
|
||||||
|
Loading…
Reference in New Issue
Block a user