labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1425587 - /labs/alike/trunk/demo/run_desc_extractor.py
Date Mon, 24 Dec 2012 05:19:17 GMT
Author: koji
Date: Mon Dec 24 05:19:17 2012
New Revision: 1425587

URL: http://svn.apache.org/viewvc?rev=1425587&view=rev
Log:
add all param to run_desc_extractor.py

Modified:
    labs/alike/trunk/demo/run_desc_extractor.py

Modified: labs/alike/trunk/demo/run_desc_extractor.py
URL: http://svn.apache.org/viewvc/labs/alike/trunk/demo/run_desc_extractor.py?rev=1425587&r1=1425586&r2=1425587&view=diff
==============================================================================
--- labs/alike/trunk/demo/run_desc_extractor.py (original)
+++ labs/alike/trunk/demo/run_desc_extractor.py Mon Dec 24 05:19:17 2012
@@ -16,6 +16,7 @@
 """
 
 import os
+import sys
 import desc_extractor as de
 import conf
 
@@ -27,8 +28,14 @@ cfg = conf.Conf('demo-conf.xml')
 imglist = os.listdir(IMAGES_DIR)
 imglist.sort()
 
-for fl in imglist[:MAX_IMGS]:
+if len(sys.argv) > 1 and sys.argv[1] == 'all':
+  img_proc_list = imglist
+else:
+  img_proc_list = imglist[:MAX_IMGS]
 
+for fl in img_proc_list:
+
+  if not fl.endswith('.jpg'): continue
   fi = IMAGES_DIR + '/' + fl
   fo = 'desc/' + fl[:fl.find('.')] + '.txt'
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message