[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1860] Patch from majeru to print line number on lasts
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1860] Patch from majeru to print line number on lastscrape import |
Date: |
Thu, 28 May 2009 23:38:58 +0000 |
Revision: 1860
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1860
Author: clint
Date: 2009-05-28 23:38:57 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Patch from majeru to print line number on lastscrape import
Modified Paths:
--------------
trunk/lastscrape/import.py
Modified: trunk/lastscrape/import.py
===================================================================
--- trunk/lastscrape/import.py 2009-05-28 23:35:28 UTC (rev 1859)
+++ trunk/lastscrape/import.py 2009-05-28 23:38:57 UTC (rev 1860)
@@ -41,9 +41,11 @@
password = getpass.getpass()
gobbler = GobbleServer(server, username, password)
+ n = 0
for line in file(data):
+ n = n + 1
artist,track,timestamp = line.strip().split("\t")
dt = datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%SZ")
gobbler.add_track(GobbleTrack(artist, track, dt))
- print "Adding to post %s playing %s" % (artist, track)
+ print "%d: Adding to post %s playing %s" % (n, artist, track)
gobbler.submit()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1860] Patch from majeru to print line number on lastscrape import,
Clint Adams <=