summaryrefslogtreecommitdiff
path: root/pcr/paraboley
diff options
context:
space:
mode:
authorAurélien DESBRIÈRES <aurelien@hackers.camp>2014-06-13 14:51:08 +0200
committerAurélien DESBRIÈRES <aurelien@hackers.camp>2014-06-13 14:51:08 +0200
commitc9379f3c41d7bdfba7703ae2a519cc584cd5fa73 (patch)
tree98646a4bb86efa81366bd45d621c16008b9654fa /pcr/paraboley
parent6a56e9dd97b0d1a482f2ce4bede5f8921866985c (diff)
paraboley + correction
Diffstat (limited to 'pcr/paraboley')
-rw-r--r--pcr/paraboley/PKGBUILD2
-rwxr-xr-xpcr/paraboley/paraboley37
2 files changed, 19 insertions, 20 deletions
diff --git a/pcr/paraboley/PKGBUILD b/pcr/paraboley/PKGBUILD
index a5f4b8d72..b7b722a03 100644
--- a/pcr/paraboley/PKGBUILD
+++ b/pcr/paraboley/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=paraboley
pkgver=0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Python script to display system infomation alongside the Parabola GNU / Linux-libre logo."
arch=('any')
url="https://github.com/XL04D/paraboley"
diff --git a/pcr/paraboley/paraboley b/pcr/paraboley/paraboley
index 3be683cc9..94d84c02f 100755
--- a/pcr/paraboley/paraboley
+++ b/pcr/paraboley/paraboley
@@ -50,13 +50,13 @@ UNAME_FLAG_MEANINGS = {
'i': 'Hardware Platform',
}
-LOGOS = {'Parabola GNU / Linux-libre': '''{1}
+LOGOS = {'Arch Linux': '''{c1}
{c1} ## ### {results[0]}
{c1} ## ## ##### {results[1]}
{c1} ## ## ## ####### {results[2]}
{c1} # ## ## ## ######## {results[3]}
-{c1} ### ## ## ## ######### {results[4]}
-{c1} ##### ## ######### {results[5]}
+{c1} ### # ######### {results[4]}
+{c1} ### ######### {results[5]}
{c1} ## ######## {results[6]}
{c1} ####### {results[7]}
{c1} ###### {results[8]}
@@ -68,10 +68,9 @@ LOGOS = {'Parabola GNU / Linux-libre': '''{1}
{c1} ### {results[14]}
{c1} ### {results[15]}
{c1} ## {results[16]}
-{c1] # {results[17]}
+{c2} # {results[17]}
\x1b[0m'''
}
-
CLASS_MAPPINGS = {}
@@ -429,7 +428,7 @@ class distroCheck(display):
except IOError:
distro = self.call_command("uname -o")
else:
- distro = "Parabola GNU / Linux-libre"
+ distro = "Arch Linux"
distro = '{0} {1}'.format(distro, self.call_command("uname -m"))
return "OS", distro
@@ -545,9 +544,9 @@ class systemUpgrade(display):
#------------ Config -----------
-class ParaboleyConfigParser(configparser.SafeConfigParser):
+class ArcheyConfigParser(configparser.SafeConfigParser):
"""
- A parser for the Paraboley config file.
+ A parser for the archey config file.
"""
defaults = {'core': {'align': 'top',
@@ -563,19 +562,19 @@ distro(), uname(n), uname(r), uptime(), wm(), de(), packages(), ram(),\
"""
Loads the config options stored in at file_location. If file_location
does not exist, it will attempt to load from the default config location
- ($XDG_CONFIG_HOME/paraboley.cfg). If that does not exist, it will write a
- default config file to $XDG_CONFIG_HOME/paraboley.cfg.
+ ($XDG_CONFIG_HOME/archey3.cfg). If that does not exist, it will write a
+ default config file to $XDG_CONFIG_HOME/archey3.cfg.
"""
if file_location is None and "XDG_CONFIG_HOME" not in os.environ:
- config_location = os.path.expanduser("~/.paraboley.cfg")
+ config_location = os.path.expanduser("~/.archey3.cfg")
elif file_location is None:
- config_location = os.path.expandvars("$XDG_CONFIG_HOME/paraboley.cfg")
+ config_location = os.path.expandvars("$XDG_CONFIG_HOME/archey3.cfg")
else:
config_location = \
os.path.expandvars(os.path.expanduser(file_location))
- loaded = super(ParaboleyConfigParser, self).read(config_location)
+ loaded = super(ArcheyConfigParser, self).read(config_location)
if file_location == None and not loaded:
self.load_default_config()
@@ -583,7 +582,7 @@ distro(), uname(n), uname(r), uptime(), wm(), de(), packages(), ram(),\
return [config_location]
if not loaded:
#Try with default
- loaded = super(ParaboleyConfigParser, self).read()
+ loaded = super(ArcheyConfigParser, self).read()
return loaded
def load_default_config(self):
@@ -690,7 +689,7 @@ def render_class(state, cls, args):
#------------ Display object ---------
-class Paraboley(object):
+class Archey(object):
DISPLAY_PARSING_REGEX = "(?P<func>\w+)\((|(?P<args>[\w, /]+))\)"
def __init__(self, config, options):
@@ -780,7 +779,7 @@ class Paraboley(object):
def parse_display(self):
"""
- Iterates over the display attribute of the Paraboley class, and tries to
+ Iterates over the display attribute of the Archey class, and tries to
parse them using the DISPLAY_PARSING_REGEX.
"""
for func in self.display.split(","):
@@ -856,11 +855,11 @@ def main():
NOTSET, DEBUG, INFO, WARNING, ERROR, and CRITICAL. CRITICAL is the default.")
(options, args) = parser.parse_args()
- config = ParaboleyConfigParser()
+ config = ArcheyConfigParser()
config.read(options.config)
- paraboley = Paraboley(config=config, options=options)
- paraboley.run(options.screenshot)
+ archey = Archey(config=config, options=options)
+ archey.run(options.screenshot)
if __name__ == "__main__":
main()