[xiph-cvs] cvs commit: positron/positron cmd_add.py cmd_sync.py

Stan Seibert volsung at xiph.org
Thu Jun 12 13:42:14 PDT 2003



volsung     03/06/12 16:42:14

  Modified:    positron cmd_add.py cmd_sync.py
  Log:
  Number the tracks during upload so you have some idea of how much progress
  has been made.  Added at the request of slestak(at)cavtel.net.

Revision  Changes    Path
1.4       +3 -1      positron/positron/cmd_add.py

Index: cmd_add.py
===================================================================
RCS file: /usr/local/cvsroot/positron/positron/cmd_add.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cmd_add.py	9 Jun 2003 01:04:46 -0000	1.3
+++ cmd_add.py	12 Jun 2003 20:42:14 -0000	1.4
@@ -95,8 +95,10 @@
         print
     else:
         print "Adding %d tracks to the Neuros..." % (len(filelist),)
+        i = 1
         for sourcename, targetname, metadata in filelist:
-            print "  %s..." % (sourcename,)
+            print "  %d. %s..." % (i, sourcename)
+            i += 1
             add_track(neuros, sourcename, targetname, metadata)
 
     if config.sort_database:

<p><p>1.4       +9 -4      positron/positron/cmd_sync.py

Index: cmd_sync.py
===================================================================
RCS file: /usr/local/cvsroot/positron/positron/cmd_sync.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cmd_sync.py	9 Jun 2003 01:04:46 -0000	1.3
+++ cmd_sync.py	12 Jun 2003 20:42:14 -0000	1.4
@@ -122,10 +122,12 @@
                 print "Copying 1 new track."
             else:
                 print "Copying %d new tracks."% (len(filelist),)
-                
+
+            i = 1
             for sourcename, targetname, metadata in filelist:
                 basename = path.basename(sourcename)
-                print "    %s..." % (basename,)
+                print "    %d. %s..." % (i, basename)
+                i += 1
                 add_track(neuros, sourcename, targetname, metadata)
 
 
@@ -148,19 +150,22 @@
                 print "Copying %d new recordings to host." \
                       % (len(new_recordings),)
 
+            i = 1
             for neuros_trackname in new_recordings:
                 sourcename = neuros.neurospath_to_hostpath(neuros_trackname)
                 basename = path.basename(sourcename)
                 targetname = path.join(config.recordingdir, basename)
 
-                print "    %s..." % (basename,)
+                print "    %d. %s..." % (i, basename)
+                i += 1
                 util.copy_file(sourcename, targetname)
                 config.add_recording(neuros_trackname.lower())
 
     # Only pack when necessary
     if audio_db.count_deleted() > 0:
-        print "  Packing audio database."
+        print "  Packing audio database...",
         audio_db.pack()
+        print " Done."
         
     neuros.close_db("audio")
     

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list