projects
/
winfreed.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pkgs: update some packages
[winfreed.git]
/
winfreed.py
diff --git
a/winfreed.py
b/winfreed.py
index
362911a
..
ca3cd32
100755
(executable)
--- a/
winfreed.py
+++ b/
winfreed.py
@@
-24,6
+24,9
@@
import ConfigParser
import urllib2
from progressbar import Bar, ETA, FileTransferSpeed, Percentage, ProgressBar
import urllib2
from progressbar import Bar, ETA, FileTransferSpeed, Percentage, ProgressBar
+# TODO:
+# - support win64
+
# TODO make OUTPUT_DIR and LANGCODE configurable from command line
OUTPUT_DIR = 'downloads'
LANGCODE = 'en-US'
# TODO make OUTPUT_DIR and LANGCODE configurable from command line
OUTPUT_DIR = 'downloads'
LANGCODE = 'en-US'
@@
-60,6
+63,8
@@
def process_all(path, cb):
def show(pkg):
print 'Package: ', pkg['package_name']
print 'Program: ', pkg['name']
def show(pkg):
print 'Package: ', pkg['package_name']
print 'Program: ', pkg['name']
+ if pkg.has_key('version'):
+ print 'Version: ', pkg['version']
print 'Homepage: ', pkg['homepage']
print
print 'Homepage: ', pkg['homepage']
print
@@
-69,9
+74,9
@@
def download_file(src_url, dest_dir):
response = urllib2.urlopen(src_url)
except Exception, e:
if hasattr(e, 'reason'):
response = urllib2.urlopen(src_url)
except Exception, e:
if hasattr(e, 'reason'):
- print 'Download
failed. Reason: ', e.reason
+ print 'Download
ing from', src_url, '
failed. Reason: ', e.reason
elif hasattr(e, 'code'):
elif hasattr(e, 'code'):
- print 'Download
failed. Error code: ', e.code
+ print 'Download
ing from', src_url, '
failed. Error code: ', e.code
return
# get the final URL after possible redirect have been followed
return
# get the final URL after possible redirect have been followed