27
27
28
28
from jarvis import settings
29
29
from jarvis .utils .mongoDB import db
30
- from jarvis .utils .console import jarvis_logo , start_text , OutputStyler , add_dashes
30
+ from jarvis .utils .console import jarvis_logo , start_text , OutputStyler , headerize
31
31
from jarvis .enumerations import MongoCollections , InputMode
32
32
33
33
@@ -93,7 +93,7 @@ def console_output(self, text='', debug_log=None, info_log=None, warn_log=None,
93
93
settings_documents = db .get_documents (collection = MongoCollections .GENERAL_SETTINGS .value )
94
94
if settings_documents :
95
95
settings_ = settings_documents [0 ]
96
- print (OutputStyler .HEADER + add_dashes ('GENERAL INFO' ) + OutputStyler .ENDC )
96
+ print (OutputStyler .HEADER + headerize ('GENERAL INFO' ) + OutputStyler .ENDC )
97
97
enabled = OutputStyler .GREEN + 'ENABLED' + OutputStyler .ENDC if settings_ ['response_in_speech' ] else OutputStyler .WARNING + 'NOT ENABLED' + OutputStyler .ENDC
98
98
print (OutputStyler .BOLD + 'RESPONSE IN SPEECH: ' + enabled )
99
99
print (OutputStyler .BOLD + 'INPUT MODE: ' + OutputStyler .GREEN + '{0}' .format (settings_ ['input_mode' ].upper () + OutputStyler .ENDC ) + OutputStyler .ENDC )
@@ -103,7 +103,7 @@ def console_output(self, text='', debug_log=None, info_log=None, warn_log=None,
103
103
# ----------------------------------------------------------------------------------------------------------
104
104
# System info sector
105
105
# ----------------------------------------------------------------------------------------------------------
106
- print (OutputStyler .HEADER + add_dashes ('SYSTEM' ) + OutputStyler .ENDC )
106
+ print (OutputStyler .HEADER + headerize ('SYSTEM' ) + OutputStyler .ENDC )
107
107
print (OutputStyler .BOLD +
108
108
'RAM USAGE: {0:.2f} GB' .format (self ._get_memory ()) + OutputStyler .ENDC )
109
109
@@ -128,18 +128,18 @@ def console_output(self, text='', debug_log=None, info_log=None, warn_log=None,
128
128
129
129
lines = subprocess .check_output (['tail' , '-' + str (MAX_NUMBER_OF_LOG_LINES ), log_path ]).decode ("utf-8" )
130
130
actual_number_of_log_lines = len (lines )
131
- print (OutputStyler .HEADER + add_dashes ('LOG -{0} (Total Lines: {1})' .format (log_path ,
132
- actual_number_of_log_lines )
133
- ) + OutputStyler .ENDC )
131
+ print (OutputStyler .HEADER + headerize ('LOG -{0} (Total Lines: {1})' .format (log_path ,
132
+ actual_number_of_log_lines )
133
+ ) + OutputStyler .ENDC )
134
134
print (OutputStyler .BOLD + lines + OutputStyler .ENDC )
135
135
136
136
# ----------------------------------------------------------------------------------------------------------
137
137
# Assistant input/output sector
138
138
# ----------------------------------------------------------------------------------------------------------
139
- print (OutputStyler .HEADER + add_dashes ('ASSISTANT' ) + OutputStyler .ENDC )
139
+ print (OutputStyler .HEADER + headerize ('ASSISTANT' ) + OutputStyler .ENDC )
140
140
if text :
141
141
print (OutputStyler .BOLD + '> ' + text + '\r ' + OutputStyler .ENDC )
142
- print (OutputStyler .HEADER + add_dashes ( '-' ) + OutputStyler .ENDC )
142
+ print (OutputStyler .HEADER + headerize ( ) + OutputStyler .ENDC )
143
143
else :
144
144
if text :
145
145
print (OutputStyler .BOLD + text + '\r ' + OutputStyler .ENDC )
0 commit comments