mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
updated for version 1.2.4
This commit is contained in:
parent
04299c5ea9
commit
54b7cd45ad
6 changed files with 49 additions and 42 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
19-05-2014
|
||||||
|
Version 1.2.4
|
||||||
|
|
||||||
|
[Feature] - Added download source code by pc arcitecture
|
||||||
|
|
||||||
19-05-2014
|
19-05-2014
|
||||||
Version 1.2.3
|
Version 1.2.3
|
||||||
|
|
||||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
||||||
Metadata-Version: 1.1
|
Metadata-Version: 1.1
|
||||||
Name: slpkg
|
Name: slpkg
|
||||||
Version: 1.2.3
|
Version: 1.2.4
|
||||||
Author: dslackw
|
Author: dslackw
|
||||||
Author-email: d zlatanidis at gmail com
|
Author-email: d zlatanidis at gmail com
|
||||||
Maintainer: dslackw
|
Maintainer: dslackw
|
||||||
|
|
24
README.rst
24
README.rst
|
@ -87,7 +87,7 @@ Check if your packages is up to date (www.slackbuilds.org):
|
||||||
|
|
||||||
|
|
||||||
$ slpkg -c flashplayer-plugin
|
$ slpkg -c flashplayer-plugin
|
||||||
Searching for `flashplayer-plugin` from www.slackbuilds.org Please wait ...
|
Searching for `flashplayer-plugin` from www.slackbuilds.org > Please wait ...
|
||||||
|
|
||||||
New version is available !!!
|
New version is available !!!
|
||||||
+==================================================
|
+==================================================
|
||||||
|
@ -96,22 +96,16 @@ Check if your packages is up to date (www.slackbuilds.org):
|
||||||
|
|
||||||
|
|
||||||
$ slpkg -c ranger
|
$ slpkg -c ranger
|
||||||
Searching for `ranger` from www.slackbuilds.org Please wait ...
|
Searching for `ranger` from www.slackbuilds.org > Please wait ...
|
||||||
|
|
||||||
Your package is up to date
|
Your package is up to date
|
||||||
|
|
||||||
|
|
||||||
$ slpkg -c termcolor
|
$ slpkg -c termcolor
|
||||||
Searching for `termcolor` from www.slackbuilds.org Please wait ...
|
Searching for `termcolor` from www.slackbuilds.org > Please wait ...
|
||||||
|
|
||||||
The package `termcolor` not found on your system
|
The package `termcolor` not found on your system
|
||||||
|
|
||||||
New version is available !!!
|
|
||||||
+==================================================
|
|
||||||
| termcolor 1.1.0
|
|
||||||
+==================================================
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Find slackbuild from network (www.slackbuilds.org):
|
Find slackbuild from network (www.slackbuilds.org):
|
||||||
|
|
||||||
|
@ -121,7 +115,7 @@ Find slackbuild from network (www.slackbuilds.org):
|
||||||
This find the slackbuild , source, extra downloads and package requirements !!!
|
This find the slackbuild , source, extra downloads and package requirements !!!
|
||||||
|
|
||||||
$ slpkg -n brasero
|
$ slpkg -n brasero
|
||||||
Searching for `brasero` from www.slackbuilds.org Please wait ...
|
Searching for `brasero` from www.slackbuilds.org > Please wait ...
|
||||||
|
|
||||||
+=================================================================================
|
+=================================================================================
|
||||||
| The `brasero` found in --> http://slackbuilds.org/repository/14.1/system/brasero/
|
| The `brasero` found in --> http://slackbuilds.org/repository/14.1/system/brasero/
|
||||||
|
@ -129,7 +123,7 @@ Find slackbuild from network (www.slackbuilds.org):
|
||||||
|
|
||||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/system/brasero.tar.gz
|
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/system/brasero.tar.gz
|
||||||
Source Downloads : https://download.gnome.org/sources/brasero/3.11/brasero-3.11.3.tar.xz
|
Source Downloads : https://download.gnome.org/sources/brasero/3.11/brasero-3.11.3.tar.xz
|
||||||
Extra Downloads : []
|
Extra Downloads :
|
||||||
Package requirements : libunique gst1-plugins-bad
|
Package requirements : libunique gst1-plugins-bad
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,7 +133,7 @@ And try again:
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ slpkg -n bitfighter
|
$ slpkg -n bitfighter
|
||||||
Searching for `bitfighter` from www.slackbuilds.org Please wait ...
|
Searching for `bitfighter` from www.slackbuilds.org > Please wait ...
|
||||||
|
|
||||||
+======================================================================================
|
+======================================================================================
|
||||||
| The `bitfighter` found in --> http://slackbuilds.org/repository/14.1/games/bitfighter/
|
| The `bitfighter` found in --> http://slackbuilds.org/repository/14.1/games/bitfighter/
|
||||||
|
@ -147,12 +141,12 @@ And try again:
|
||||||
|
|
||||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/games/bitfighter.tar.gz
|
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/games/bitfighter.tar.gz
|
||||||
Source Downloads : http://bitfighter.org/files/bitfighter-019c.tar.gz
|
Source Downloads : http://bitfighter.org/files/bitfighter-019c.tar.gz
|
||||||
Extra Downloads : [https://bitfighter.googlecode.com/files/classic_level_pack.zip]
|
Extra Downloads : https://bitfighter.googlecode.com/files/classic_level_pack.zip
|
||||||
Package requirements : OpenAL SDL2 speex libmodplug
|
Package requirements : OpenAL SDL2 speex libmodplug
|
||||||
|
|
||||||
|
|
||||||
$ slpkg -n termcolor
|
$ slpkg -n termcolor
|
||||||
Searching for `termcolor` from www.slackbuilds.org Please wait ...
|
Searching for `termcolor` from www.slackbuilds.org > Please wait ...
|
||||||
|
|
||||||
+======================================================================================
|
+======================================================================================
|
||||||
| The `termcolor` found in --> http://slackbuilds.org/repository/14.1/python/termcolor/
|
| The `termcolor` found in --> http://slackbuilds.org/repository/14.1/python/termcolor/
|
||||||
|
@ -160,7 +154,7 @@ And try again:
|
||||||
|
|
||||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz
|
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz
|
||||||
Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz
|
Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz
|
||||||
Extra Downloads : []
|
Extra Downloads :
|
||||||
Package requirements :
|
Package requirements :
|
||||||
|
|
||||||
|
|
||||||
|
|
28
bin/slpkg
28
bin/slpkg
|
@ -16,11 +16,14 @@ import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
__author__ = "dslackw"
|
__author__ = "dslackw"
|
||||||
__version__ = "1.2.3"
|
__version__ = "1.2.4"
|
||||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||||
__email__ = "d.zlatanidis@gmail.com"
|
__email__ = "d.zlatanidis@gmail.com"
|
||||||
|
|
||||||
|
|
||||||
|
# grep computer architecture
|
||||||
|
uname = os.uname()
|
||||||
|
arch = (uname[4])
|
||||||
|
|
||||||
|
|
||||||
# path file record
|
# path file record
|
||||||
|
@ -130,6 +133,14 @@ def sbo_source_dwn(sbo_url, name):
|
||||||
sbo_url = sbo_url.replace("repository", "slackbuilds")
|
sbo_url = sbo_url.replace("repository", "slackbuilds")
|
||||||
|
|
||||||
# read lines from .info files grep download line and return source link
|
# read lines from .info files grep download line and return source link
|
||||||
|
if arch == "x86_64":
|
||||||
|
for line in url_read(sbo_url).splitlines():
|
||||||
|
if line.startswith('DOWNLOAD_x86_64='):
|
||||||
|
line = line[17:-1]
|
||||||
|
|
||||||
|
return line
|
||||||
|
|
||||||
|
if arch != "x86_64":
|
||||||
for line in url_read(sbo_url).splitlines():
|
for line in url_read(sbo_url).splitlines():
|
||||||
if line.startswith('DOWNLOAD='):
|
if line.startswith('DOWNLOAD='):
|
||||||
line = line[10:-1]
|
line = line[10:-1]
|
||||||
|
@ -137,7 +148,6 @@ def sbo_source_dwn(sbo_url, name):
|
||||||
return line
|
return line
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# find extra source downloads
|
# find extra source downloads
|
||||||
def sbo_extra_dwn(sbo_url, name):
|
def sbo_extra_dwn(sbo_url, name):
|
||||||
sbo_url = sbo_url + name + ".info"
|
sbo_url = sbo_url + name + ".info"
|
||||||
|
@ -253,6 +263,7 @@ def main():
|
||||||
if args.network:
|
if args.network:
|
||||||
find_sbo_url = sbo_search_pkg(args.network)
|
find_sbo_url = sbo_search_pkg(args.network)
|
||||||
if find_sbo_url == None:
|
if find_sbo_url == None:
|
||||||
|
print ("\n")
|
||||||
print ("{}The {}'{}'{} not found{}".format(colors.RED,
|
print ("{}The {}'{}'{} not found{}".format(colors.RED,
|
||||||
colors.CYAN, args.network, colors.RED, colors.ENDC))
|
colors.CYAN, args.network, colors.RED, colors.ENDC))
|
||||||
print
|
print
|
||||||
|
@ -286,38 +297,35 @@ def main():
|
||||||
# check if packages from www.slackbuilds.org is up to date
|
# check if packages from www.slackbuilds.org is up to date
|
||||||
if args.check:
|
if args.check:
|
||||||
find_sbo_url = sbo_search_pkg(args.check)
|
find_sbo_url = sbo_search_pkg(args.check)
|
||||||
print
|
|
||||||
if find_sbo_url == None:
|
if find_sbo_url == None:
|
||||||
print
|
print ("\n")
|
||||||
print ("{}The {}`{}`{} not found{}".format(colors.RED,
|
print ("{}The {}`{}`{} not found{}".format(colors.RED,
|
||||||
colors.CYAN, args.check, colors.RED, colors.ENDC))
|
colors.CYAN, args.check, colors.RED, colors.ENDC))
|
||||||
|
|
||||||
print
|
print
|
||||||
else:
|
else:
|
||||||
find_sbo_version = sbo_version_pkg(find_sbo_url, args.check)
|
find_sbo_version = sbo_version_pkg(find_sbo_url, args.check)
|
||||||
|
|
||||||
if find_package(args.check) == []:
|
if find_package(args.check) == []:
|
||||||
print
|
print ("\n")
|
||||||
print (" {}The package {}`{}`{} not found on your system{}".format(colors.RED,
|
print (" {}The package {}`{}`{} not found on your system{}".format(colors.RED,
|
||||||
colors.CYAN, args.check, colors.RED, colors.ENDC))
|
colors.CYAN, args.check, colors.RED, colors.ENDC))
|
||||||
sbo_file = ""
|
sbo_file = ""
|
||||||
|
print
|
||||||
else:
|
else:
|
||||||
sbo_file = "".join(find_package(args.check)) # convert list to string
|
sbo_file = "".join(find_package(args.check)) # convert list to string
|
||||||
name_len = len(args.check)
|
name_len = len(args.check)
|
||||||
uname = os.uname()
|
|
||||||
arch = (uname[4]) # get computer architecture
|
|
||||||
arch_len = len(arch)
|
arch_len = len(arch)
|
||||||
sbo_file = sbo_file[name_len+1:-arch_len-7]
|
sbo_file = sbo_file[name_len+1:-arch_len-7]
|
||||||
|
|
||||||
if find_sbo_version > sbo_file:
|
if find_sbo_version > sbo_file:
|
||||||
print
|
print ("\n")
|
||||||
print ("{} New version is available !!!{}".format(colors.YELLOW, colors.ENDC))
|
print ("{} New version is available !!!{}".format(colors.YELLOW, colors.ENDC))
|
||||||
print ("+" + "=" * 50)
|
print ("+" + "=" * 50)
|
||||||
print ("| {} {}".format(args.check, find_sbo_version))
|
print ("| {} {}".format(args.check, find_sbo_version))
|
||||||
print ("+" + "=" * 50)
|
print ("+" + "=" * 50)
|
||||||
print
|
print
|
||||||
else:
|
else:
|
||||||
print
|
print ("\n")
|
||||||
print ("{}Your package is up to date{}".format(colors.GREEN, colors.ENDC))
|
print ("{}Your package is up to date{}".format(colors.GREEN, colors.ENDC))
|
||||||
print
|
print
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ $ \fBslpkg -n termcolor\fP
|
||||||
|
|
||||||
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz
|
Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz
|
||||||
Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz
|
Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz
|
||||||
Extra Downloads : []
|
Extra Downloads :
|
||||||
Package requirements :
|
Package requirements :
|
||||||
|
|
||||||
Etc. download from www.slackbuilds.org the package termcolor
|
Etc. download from www.slackbuilds.org the package termcolor
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ from distutils.core import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'slpkg',
|
name = 'slpkg',
|
||||||
version = "1.2.3",
|
version = "1.2.4",
|
||||||
description = "Python tool to manage Slackware packages",
|
description = "Python tool to manage Slackware packages",
|
||||||
keywords = ["slackware", "slpkg", "upgrade", "install", "remove",
|
keywords = ["slackware", "slpkg", "upgrade", "install", "remove",
|
||||||
"view", "slackpkg", "tool"],
|
"view", "slackpkg", "tool"],
|
||||||
|
|
Loading…
Add table
Reference in a new issue