update
This commit is contained in:
parent
399d23d6cc
commit
22b87e7855
@ -56,51 +56,51 @@ def colorform(data):
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
del frame
|
||||
del frame
|
||||
|
||||
###################################################################################
|
||||
###################################################################################
|
||||
|
||||
self = 'decoded'
|
||||
self = "<plugins.tool_colors_plugin.FOG object at 0x7f6acb87ba60>"
|
||||
|
||||
###################################################################################
|
||||
###################################################################################
|
||||
|
||||
PATHFILENAME=sys._getframe().f_code.co_filename
|
||||
filename=PATHFILENAME.split('/')[-1].split('.')[0]
|
||||
renamed="_"*(19-len(filename))+filename
|
||||
the_origin=origin=renamed
|
||||
the_caller=sys._getframe(1).f_code.co_name
|
||||
|
||||
the_caller_path_to_file=sys._getframe().f_code.co_filename
|
||||
the_caller=the_caller_path_to_file.split('/')[-1].split('.')[0]
|
||||
the_call=sys._getframe(1).f_code.co_name
|
||||
the_function=sys._getframe().f_code.co_name
|
||||
|
||||
the_origin=codeobj.co_filename.split('/')[-1].replace('.py','')
|
||||
the_origin="_"*(19-len(the_origin))+the_origin
|
||||
msg=f'{rgb(b=255)}<<<{rgb(g=255,b=255)} {the_origin} {rgb(b=255)}>>> '
|
||||
|
||||
if self and data and caller:
|
||||
the_class=""
|
||||
the_class=type(self).__name__
|
||||
if codeobj.co_filename==PATHFILENAME:
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{caller}.{the_class}.{the_caller} {rgb(r=255)}]'
|
||||
if codeobj.co_filename==the_caller_path_to_file:
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{caller}.{the_class}.{the_call} {rgb(r=255)}]'
|
||||
else:
|
||||
origin=codeobj.co_filename.split('/')[-1].replace('.py','')
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{origin}.{the_caller}.{caller}.{__name__}.{the_class}.{the_function} {rgb(r=255)}]'
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{origin}.{the_call}.{caller}.{__name__}.{the_class}.{the_function} {rgb(r=255)}]'
|
||||
msg+=f'{rgb(b=255)} - '
|
||||
msg+=f'{rgb(g=128,b=128,r=128)}{data}'
|
||||
else:
|
||||
try:
|
||||
caller=str(self).split(f'<{__name__}.')[1].split()[0]
|
||||
except:
|
||||
caller=str(self).split(f'<{__name__}.')[0]
|
||||
if not self_name and the_caller=="<module>":
|
||||
if codeobj.co_filename==PATHFILENAME:
|
||||
caller=str(self).split(f'<{__name__}.')[1].split()[0]
|
||||
if not self_name and the_call=="<module>":
|
||||
if codeobj.co_filename==the_caller_path_to_file:
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{__name__}.{caller}.{the_function} {rgb(r=255)}]'
|
||||
else:
|
||||
origin=codeobj.co_filename.split('/')[-1].replace('.py','')
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{origin}.{__name__}.{caller}.{the_function} {rgb(r=255)}]'
|
||||
else:
|
||||
if codeobj.co_filename==PATHFILENAME:
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{self_name}.{the_caller}.{caller}.{the_function} {rgb(r=255)}]'
|
||||
if codeobj.co_filename==the_caller_path_to_file:
|
||||
msg+=f'{rgb(r=255)}[ {rgb(r=255,b=255)}{self_name}.{the_call}.{caller}.{the_function} {rgb(r=255)}]'
|
||||
else:
|
||||
caller=codeobj.co_filename.split('/')[-1].replace('.py','')
|
||||
lastcall=str(self_type).split("'")[1]
|
||||
print(f'{rgb(r=255)}[ {rgb(r=255,b=255)}{lastcall}.{the_caller}.{filename}.{caller}.{the_function} {rgb(r=255)}]')
|
||||
the_origin=str(self_type).split("'")[1]
|
||||
print(f'{rgb(r=255)}[ {rgb(r=255,b=255)}{the_origin}.{the_call}.{caller}.{the_function} {rgb(r=255)}]')
|
||||
msg+=f'{rgb(b=255)} - '
|
||||
msg+=f'{rgb(g=128,b=128,r=128)}{data}'
|
||||
print(msg)
|
||||
@ -137,7 +137,7 @@ def colorform(data):
|
||||
|
||||
#######################################################################################
|
||||
#######################################################################################
|
||||
|
||||
|
||||
# s=f"{rgb(b=255)}<<<{rgb(g=255,b=255)} {between_gtlts} {rgb(b=255)}>>> {rgb(r=255)}"
|
||||
# if between_brackets.startswith('('):
|
||||
# s+=f"[{rgb(b=255)} {between_brackets} {rgb(r=255)}]"
|
||||
|
@ -12,7 +12,7 @@ class FOG:
|
||||
###################################### - RGB // RETURNS RGB TERMINAL ESCAPE COLOR CODES
|
||||
|
||||
def rgb(self,r=0,g=0,b=0):return f"\033[38;2;{r};{g};{b}m"
|
||||
|
||||
|
||||
#######################################################################################
|
||||
##################################################### - FOG // RETURNS FORMATTED STRING
|
||||
|
||||
@ -49,7 +49,7 @@ class FOG:
|
||||
except:
|
||||
pass
|
||||
finally:
|
||||
del frame
|
||||
del frame
|
||||
|
||||
###################################################################################
|
||||
###################################################################################
|
||||
|
@ -1 +0,0 @@
|
||||
default
|
Loading…
Reference in New Issue
Block a user