diff --git a/CHANGELOG b/CHANGELOG
index 8230d391..3b23c033 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,9 @@
+Version 1.9.0
+24-09-2014
+
+[Updated] - Fix arguments.
+ - Replace less command with pydoc.
+
Version 1.8.9
23-09-2014
diff --git a/PKG-INFO b/PKG-INFO
index 644a98e8..768726f8 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: slpkg
-Version: 1.8.9
+Version: 1.9.0
Author: dslackw
Author-email: d zlatanidis at gmail com
Maintainer: dslackw
diff --git a/README.rst b/README.rst
index 38f98152..82c32219 100644
--- a/README.rst
+++ b/README.rst
@@ -7,9 +7,9 @@
Latest Release:
-- Version: 1.8.9
+- Version: 1.9.0
- `Package `_
-- `Source `_
+- `Source `_
- `CHANGELOG `_
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
@@ -98,8 +98,8 @@ Untar the archive and run install.sh script:
.. code-block:: bash
- $ tar xvf slpkg-1.8.9.tar.gz
- $ cd slpkg-1.8.9
+ $ tar xvf slpkg-1.9.0.tar.gz
+ $ cd slpkg-1.9.0
$ ./install.sh
Using `pip `_ :
@@ -331,7 +331,8 @@ Find packages from slackbuilds.org:
Build Download and build this package
Install Download/Build/Install
Quit Quit
- _
+
+ > _
Auto tool to build package:
@@ -457,8 +458,8 @@ Find installed packages:
[ installed ] - xf86dgaproto-2.1-noarch-1
[ installed ] - xineramaproto-1.2.1-noarch-1
- Found 4 matcing packages
- Total size of installed packages 1.61 Mb
+ Total found 4 matcing packages
+ Size of installed packages 1.61 Mb
Display the contents of the packages:
diff --git a/install.sh b/install.sh
index 9a1da44b..d1cfc14a 100755
--- a/install.sh
+++ b/install.sh
@@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
-VERSION=${VERSION:-1.8.9}
+VERSION=${VERSION:-1.9.0}
TAG=${TAG:-_dsw}
cd ..
diff --git a/man/slpkg.8 b/man/slpkg.8
index 56587f7e..86ba2f5c 100644
--- a/man/slpkg.8
+++ b/man/slpkg.8
@@ -125,166 +125,10 @@ command.
.br
For example:
\fBslpkg \-\-help\fP - display help for slpkg
-.SH EXAMPLES
-
-
-$ \fBslpkg -t brasero\fP
- Reading package lists...... Done
-
- +=========================
- | brasero dependencies :
- +=========================
- \\
- +---[ Tree of dependencies ]
- |
- --1: orc
- |
- --2: gstreamer1
- |
- --3: gst1-plugins-base
- |
- --4: gst1-plugins-bad
- |
- --5: libunique
-
-$ \fBslpkg -s sbo brasero\fP
- Building dependency tree...... Done
-
- The following packages will be automatically installed or upgraded
- with new version:
-
- +==============================================================================
- | Package Version Arch Repository
- +==============================================================================
- Installing:
- brasero 3.11.3 x86_64 SBo
- Installing for dependencies:
- orc 0.4.19 x86_64 SBo
- gstreamer1 1.2.2 x86_64 SBo
- gst1-plugins-base 1.2.2 x86_64 SBo
- gst1-plugins-bad 1.2.2 x86_64 SBo
- libunique 1.1.6 x86_64 SBo
-
- Installing summary
- ===============================================================================
- Total 6 packages.
- 2 packages will be installed, 3 allready installed and 1 packages
- will be upgraded.
-
- Do you want to continue [Y/n]? y
- .
- .
- .
- +==============================================================================
- | Installing new package /tmp/brasero-3.11.3-x86_64-1_SBo.tgz
- +==============================================================================
-
- Verifying package brasero-3.11.3-x86_64-1_SBo.tgz.
- Installing package brasero-3.11.3-x86_64-1_SBo.tgz:
- PACKAGE DESCRIPTION:
- # brasero (CD/DVD burning application)
- #
- # Brasero is a application to burn CD/DVD for the Gnome Desktop. It is
- # designed to be as simple as possible and has some unique features to
- # enable users to create their discs easily and quickly.
- #
- # Homepage: http://projects.gnome.org/brasero
- #
- Executing install script for brasero-3.11.3-x86_64-1_SBo.tgz.
- Package brasero-3.11.3-x86_64-1_SBo.tgz installed.
-
-
-$ \fBslpkg -c sbo upgrade\fP
- Reading package lists. Done
-
- These packages need upgrading:
-
- +==============================================================================
- | Package New version Arch Repository
- +==============================================================================
- Upgrading:
- six-1.7.1 1.7.3 x86_64 SBo
- pysetuptools-3.4 3.6 x86_64 SBo
- Jinja2-2.7.0 2.7.2 x86_64 SBo
- pysed-0.3.0 0.3.1 x86_64 SBo
- Pafy-0.3.56 0.3.58 x86_64 SBo
- MarkupSafe-0.21 0.23 x86_64 SBo
- pip-1.5.3 1.5.6 x86_64 SBo
- colored-1.1.1 1.1.4 x86_64 SBo
-
- Installing summary
- ===============================================================================
- Total 8 packages will be upgraded and 0 package will be installed.
-
- Would you like to upgrade [Y/n]?
-
-$ \fBslpkg -c slack upgrade\fp
- Reading package lists....... Done
-
- Slackware64 v14.1 distribution is up to date
-
-$ \fBslpkg -n termcolor\fP
- Reading package lists. Done
-
- +==============================================================================
- | Package termcolor --> http://slackbuilds.org/repository/14.1/python/termcolor/
- +==============================================================================
- | Description : ANSII Color formatting for output in terminal
- | SlackBuild : termcolor.tar.gz
- | Source : termcolor-1.1.0.tar.gz
- | Requirements :
- +===============================================================================
- README View the README file
- SlackBuild View the SlackBuild file
- Info View the Info file
- Download Download this package
- Build Download and build this package
- Install Download/Build/Install
-
- _
-
- Two files termcolor.tar.gz and termcolor-1.1.0.tar.gz
- must be in the same directory.
-
-$ \fBslpkg -a termcolor.tar.gz termcolor-1.1.0.tar.gz\fP
-
- Slackware package /tmp/termcolor-1.1.0-x86_64-1_SBo.tgz created.
-
-$ \fBslpkg -u /tmp/termcolor-1.1.0-x86_64-1_SBo.tgz\fP
-
- Installing new package ./termcolor-1.1.0-x86_64-1_SBo.tgz
-
-$ \fBslpkg -r termcolor yetris\fP
-
- Packages with name matching [ termcolor, yetris ]
-
- [ delete ] -- > termcolor-1.1.0-x86_64-1_SBo
- No such package yetris: Can't find
-
- Are you sure to remove 1 package(s) [Y/y]
-
- Package: termcolor-1.1.0-x86_64-1_SBo
- Package: yetris-2.0.1-x86_64-1_SBo
- Removing...
-
- Package termcolor removed
-
-$ \fBslpkg -f termcolor\fP
-
- Installed packages with name matching [ termcolor ]
-
- No package was found to match
-
-$ \fBslpkg -d termcolor\fP
-
- No such package termcolor: Can't dislpay
-
-$ \fBslpkg -v\fP
-
- Version: x.x.x
-
.SH AUTHOR
Dimitris Zlatanidis
+.SH HOMEPAGE
+https://github.com/dslackw/slpkg
.SH COPYRIGHT
Copyright \(co 2014 Dimitris Zlatanidis
diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild
index dc346683..15199ca6 100755
--- a/slackbuild/slpkg.SlackBuild
+++ b/slackbuild/slpkg.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
-VERSION=${VERSION:-1.8.9}
+VERSION=${VERSION:-1.9.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_dsw}
diff --git a/slackbuild/slpkg.info b/slackbuild/slpkg.info
index 48c5ab3b..de77bc00 100644
--- a/slackbuild/slpkg.info
+++ b/slackbuild/slpkg.info
@@ -1,7 +1,7 @@
PRGNAM="slpkg"
-VERSION="1.8.9"
+VERSION="1.9.0"
HOMEPAGE="https://github.com/dslackw/slpkg"
-DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.9.tar.gz"
+DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.9.0.tar.gz"
MD5SUM=""
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py
index 09bd5601..3851406f 100644
--- a/slpkg/__metadata__.py
+++ b/slpkg/__metadata__.py
@@ -26,7 +26,7 @@ import subprocess
__all__ = "slpkg"
__author__ = "dslackw"
-__version_info__ = (1, 8, 9)
+__version_info__ = (1, 9, 0)
__version__ = "{0}.{1}.{2}".format(*__version_info__)
__license__ = "GNU General Public License v3 (GPLv3)"
__email__ = "d.zlatanidis@gmail.com"
diff --git a/slpkg/functions.py b/slpkg/functions.py
index a46e2b43..c2176014 100755
--- a/slpkg/functions.py
+++ b/slpkg/functions.py
@@ -27,11 +27,4 @@ def get_file(link, char):
'''
Get filename from links
'''
- i = 0
- results = []
- for file in range(len(link)):
- i -= 1
- results.append(link[i])
- if link[i] == char:
- break
- return ("".join(results[::-1]).replace("/", "").strip())
+ return link.split(char)[-1]
diff --git a/slpkg/messages.py b/slpkg/messages.py
index 36a9c430..7506d056 100755
--- a/slpkg/messages.py
+++ b/slpkg/messages.py
@@ -56,7 +56,7 @@ def err1_args(invalid, choices):
'''
Print error message arguments
'''
- print("{0}: error: invalid choice: '{1}' choose from {2}".format(
+ print("{0}: error: invalid choice: '{1}' (choose from {2})".format(
__all__, invalid, choices))
def err2_args(choices):
diff --git a/slpkg/sbo/read.py b/slpkg/sbo/read.py
index 9e986517..b239c55c 100755
--- a/slpkg/sbo/read.py
+++ b/slpkg/sbo/read.py
@@ -26,27 +26,14 @@ import os
from url_read import url_read
from __metadata__ import slpkg_tmp
-# create directories if not exist
-rdm_path = slpkg_tmp + "readme/"
-if not os.path.exists(slpkg_tmp):
- os.mkdir(slpkg_tmp)
-if not os.path.exists(rdm_path):
- os.mkdir(rdm_path)
-
-def read_readme(sbo_url, name, site):
+def read_readme(sbo_url, sbo_readme):
'''
Read SlackBuild README file
'''
- readme = url_read(sbo_url + site)
- with open("{0}{1}.{2}".format(rdm_path, name, site), "w") as f:
- f.write(readme)
- f.close()
+ return url_read(sbo_url + sbo_readme)
-def read_info_slackbuild(sbo_url, name, site):
+def read_info_slackbuild(sbo_url, name, sbo_file):
'''
- Read info SlackBuild file
+ Read info and SlackBuild file
'''
- info = url_read(sbo_url + name + site)
- with open("{0}{1}{2}".format(rdm_path, name, site), "w") as f:
- f.write(info)
- f.close()
+ return url_read(sbo_url + name + sbo_file)
diff --git a/slpkg/sbo/views.py b/slpkg/sbo/views.py
index 6f975985..166259b6 100755
--- a/slpkg/sbo/views.py
+++ b/slpkg/sbo/views.py
@@ -23,11 +23,12 @@
import os
import sys
+import pydoc
import subprocess
from colors import colors
from functions import get_file
-from __metadata__ import tmp, build_path, pkg_path, slpkg_tmp, sp
+from __metadata__ import tmp, build_path, pkg_path, sp
from messages import pkg_not_found, pkg_found, view_sbo, template, build_FAILED
from pkg.build import build_package
@@ -45,7 +46,6 @@ def sbo_network(name):
View SlackBuild package, read or install them
from slackbuilds.org
'''
- rdm_path = slpkg_tmp + "readme/"
sys.stdout.write("{0}Reading package lists ...{1}".format(
colors.GREY, colors.ENDC))
sys.stdout.flush()
@@ -68,7 +68,7 @@ def sbo_network(name):
FAULT = "".join(source_dwn)
while True:
try:
- read = raw_input("_ ")
+ read = raw_input(" {0}>{1} ".format(colors.GREY, colors.ENDC))
except KeyboardInterrupt:
print # new line at exit
break
@@ -80,20 +80,14 @@ def sbo_network(name):
print("Complete!\n")
break
elif read == "R" or read == "r":
- site = "README"
- read_readme(sbo_url, name, site)
- subprocess.call("less {0}{1}.{2}".format(rdm_path, name, site), shell=True)
- os.remove("{0}{1}.{2}".format(rdm_path, name, site))
+ readme = "README"
+ pydoc.pager(read_readme(sbo_url, readme))
elif read == "F" or read == "f":
- site = ".info"
- read_info_slackbuild(sbo_url, name, site)
- subprocess.call("less {0}{1}{2}".format(rdm_path, name, site), shell=True)
- os.remove("{0}{1}{2}".format(rdm_path, name, site))
+ _info = ".info"
+ pydoc.pager(read_info_slackbuild(sbo_url, name, _info))
elif read == "S" or read == "s":
- site = ".SlackBuild"
- read_info_slackbuild(sbo_url, name, site)
- subprocess.call("less {0}{1}{2}".format(rdm_path, name, site), shell=True)
- os.remove("{0}{1}{2}".format(rdm_path, name, site))
+ _SlackBuild = ".SlackBuild"
+ pydoc.pager(read_info_slackbuild(sbo_url, name, _SlackBuild))
elif read == "B" or read == "b":
if FAULT:
print("\n{0}The package {1}{2}\n".format(colors.RED, FAULT, colors.ENDC))
diff --git a/slpkg/slack/install.py b/slpkg/slack/install.py
index eeb92230..ef7d2bd8 100755
--- a/slpkg/slack/install.py
+++ b/slpkg/slack/install.py
@@ -56,7 +56,7 @@ def install(slack_pkg):
if not os.path.exists(tmp_path):
os.mkdir(tmp_path)
print("\nPackages with name matching [ {0}{1}{2} ]\n".format(
- colors.CYAN, slack_pkg, ENDC))
+ colors.CYAN, slack_pkg, ENDC))
sys.stdout.write ("{0}Reading package lists ...{1}".format(colors.GREY, ENDC))
sys.stdout.flush()
PACKAGES = url_read(mirrors(name="PACKAGES.TXT", location=""))