Compare commits

..

2 Commits

Author SHA1 Message Date
Steve Nyemba f17a35cf15 version updates
3 weeks ago
Steve Nyemba f6792be2a8 bug fix: decoding ...
3 weeks ago

@ -63,8 +63,9 @@ def read(**args) :
elif 'cmd' in args : elif 'cmd' in args :
cmd = args['cmd'] cmd = args['cmd']
if cmd : if cmd :
handler = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE) handler = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,encoding='utf-8')
stream = str(handler.communicate()[0]).replace("b'",'') stream = str(handler.communicate()[0]) #.decode('utf-8') #.replace("b'",'')
return _parser (stream) if _parser else stream return _parser (stream) if _parser else stream

@ -35,7 +35,7 @@ class Util :
def read(**args): def read(**args):
""" """
The path can also take in regular expressions The path can also take in regular expressions, this only works for linux based systems.
""" """
cmd = {"size":"du -sh :path","content":"find :path -type f -exec md5sum {} + | sort -z|md5sum"} cmd = {"size":"du -sh :path","content":"find :path -type f -exec md5sum {} + | sort -z|md5sum"}
r = {} r = {}

@ -1,6 +1,6 @@
import os import os
__app_name__= "smart-logger" __app_name__= "smart-logger"
__version__ = "1.14" __version__ = "1.16"
__author__ = "Steve L. Nyemba, info@the-phi.com" __author__ = "Steve L. Nyemba, info@the-phi.com"
__home__ = os.sep.join([os.environ['HOME'],'.smart-logger']) __home__ = os.sep.join([os.environ['HOME'],'.smart-logger'])
__database__='smart_logs' __database__='smart_logs'

Loading…
Cancel
Save