Permalink
Browse files

デバッグプリント削除

  • Loading branch information...
1 parent 61026c3 commit 2cb72af1bdebba35402410abd3164b06a6e2dc2e @murakamiy committed Mar 5, 2012
Showing with 0 additions and 10 deletions.
  1. +0 −10 home/mc/xdg-user-dirs/media/bin/database/aggregate.py
@@ -143,12 +143,9 @@
csr = con.cursor()
csr.execute(sql_8, (back_date,))
sql_new = csr.fetchall()
-csr.close()
-csr = con.cursor()
csr.execute(sql_9, (back_date,))
sql_old = csr.fetchall()
csr.close()
-
pattern = re.compile(u" ")
list_new = []
list_old = []
@@ -165,7 +162,6 @@
m["title_sub"] = re.sub(pattern, '', unicodedata.normalize('NFKC', l["title"]))
m["sql_row"] = l
list_old.append(m)
-
for new in list_new:
for old in list_old:
if (new["sql_row"]["category_id"] == old["sql_row"]["category_id"] and
@@ -180,7 +176,6 @@
if len(new["title_identical"]) < i - 2:
new["title_identical"] = new["title_sub"][0:i - 2]
break
-
csr = con.cursor()
for l in list_new:
if 2 < len(l["title_identical"]) and len(l["title_sub"]) / 3 < len(l["title_identical"]):
@@ -196,7 +191,6 @@
list_like = csr.fetchall()
for ll in list_like:
if abs(len(l["title_identical"]) - len(ll["title"])) == 1:
- print 'like', l["title_identical"], ll["title"], len(l["title_identical"]), len(ll["title"])
r = ll
break
if r == None:
@@ -208,20 +202,16 @@
l["sql_row"]["length"]
))
series_id = csr.lastrowid
- print 'insert', l["sql_row"]["category_id"], l["title_identical"], l["sql_row"]["length"]
else:
series_id = r["series_id"]
csr.execute(sql_12, (l["sql_row"]["length"], series_id))
- print 'update', l["sql_row"]["length"], series_id
csr.execute(sql_13,
(
series_id,
l["sql_row"]["transport_stream_id"],
l["sql_row"]["service_id"],
l["sql_row"]["event_id"]
))
- print 'update2', series_id, l["sql_row"]["transport_stream_id"], l["sql_row"]["service_id"], l["sql_row"]["event_id"]
-
csr.close()
con.commit()

0 comments on commit 2cb72af

Please sign in to comment.