Commits

John Louis del Rosario committed 2f9005c

show total rows in output.

  • Participants
  • Parent commits 919659c

Comments (0)

Files changed (1)

         set_file = open(set_filename, 'r')
         reader = csv.reader(set_file, delimiter='\t')
         counter = 0
+        total = 0
         for row in reader:
             if counter > 0:
                 try:
                     print set_filename, row[0], row[1]
                     print row
             if counter == 0: counter += 1
-        print 'Imported %d cards from %s.' % (counter, set_filename)
+            total += 1
+        print 'Imported %d/%d cards from %s.' % (counter, total, set_filename)
         set_file.close()
 
     cursor.execute('DELETE FROM CardImages')
         card_image_file = open(card_image_filename, 'r')
         reader = csv.reader(card_image_file, delimiter='\t')
         counter = 0
+        total = 0
         for row in reader:
             if counter > 0:
                 try:
                     print set_filename, row[0]
                     print row
             if counter == 0: counter += 1
-        print 'Imported %d cards from %s.' % (counter, card_image_filename)
+            total += 1
+        print 'Imported %d/%d card images data from %s.' % (counter, total, card_image_filename)
         card_image_file.close()
 
     update_list.close()