diff --git a/CHANGELOG b/CHANGELOG index d76fd3e7..3ee20adf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +Version 2.2.6 +26-2-2015 + +[Feature] - Added counter download. + +[Updated] - Update Slackware release message. + + Version 2.2.5 24-2-2015 diff --git a/PKG-INFO b/PKG-INFO index d905d24c..441e824c 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 2.2.5 +Version: 2.2.6 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/README.rst b/README.rst index d399b488..63767dd4 100644 --- a/README.rst +++ b/README.rst @@ -23,6 +23,11 @@ .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/slpkg_package.png :target: https://github.com/dslackw/slpkg + +| + +.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/poweredbyslack.gif + :target: http://www.slackware.com/ | .. contents:: Table of Contents: diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index d82426ab..8e468ad7 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -79,16 +79,15 @@ def select_slack_release(slack_rel): defined wrong ''' if slack_rel not in ['stable', 'current']: - print("\n You have not specified the Slackware release.\n" - " Edit file '/etc/slpkg/slpkg.conf' and change the \n" - " value of the variable RELEASE.\n") + return 'FAULT' + return slack_rel class MetaData(object): __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (2, 2, 5) + __version_info__ = (2, 2, 6) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" @@ -131,6 +130,7 @@ class MetaData(object): 'slackr', 'slonly', 'ktown', 'multi', 'slacke', 'salix', 'slackl', 'rested'] + # read value from configuration file if os.path.isfile('%s%s' % (conf_path, 'slpkg.conf')): f = open('%s%s' % (conf_path, 'slpkg.conf'), 'r') conf = f.read() @@ -164,7 +164,7 @@ class MetaData(object): repositories = [repo.strip() for repo in repositories] # Check Slackware release - select_slack_release(slack_rel) + slack_rel = select_slack_release(slack_rel) # Grap sub repositories ktown_kde_repo = grab_sub_repo(repositories, 'ktown') diff --git a/slpkg/arguments.py b/slpkg/arguments.py index 4e0060df..2df523f5 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -28,8 +28,8 @@ from __metadata__ import MetaData as _m def options(): arguments = [ - "\nslpkg - version {0} | set: {1}\n".format(_m.__version__, - _m.slack_rel), + "\nslpkg - version {0} | Slackware release: {1}\n".format( + _m.__version__, _m.slack_rel), "Slpkg is a user-friendly package manager for Slackware " "installations\n", "Commands:", @@ -88,8 +88,8 @@ def usage(repo): error_repo = ("slpkg: error: repository '{0}' does not exist" "\n".format(repo)) view = [ - "\nslpkg - version {0} | set: {1}\n".format(_m.__version__, - _m.slack_rel), + "\nslpkg - version {0} | Slackware release: {1}\n".format( + _m.__version__, _m.slack_rel), "Usage: slpkg Commands:", " [update] [upgrade] [repo-add [repository name] [URL]]", " [repo-remove [repository]] [repo-list]", diff --git a/slpkg/downloader.py b/slpkg/downloader.py index c5c7ba52..ea3f26b2 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -40,15 +40,17 @@ class Download(object): ''' Download files usign wget. ''' + dwn_count = 1 for dwn in self.url: self.file_name = dwn.split("/")[-1] - print("\n[ {0}Download{1} ] -->{1} {2}\n".format(_m.color['GREEN'], - _m.color['ENDC'], - self.file_name)) + print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format( + dwn_count, len(self.url), _m.color['GREEN'], _m.color['ENDC'], + self.file_name)) try: subprocess.call("wget {0} --directory-prefix={1} {2}".format( self.wget_options, self.path, dwn), shell=True) self._check_if_downloaded() + dwn_count += 1 except KeyboardInterrupt: print # new line at cancel sys.exit(0)