This option gives less verbose output
green_start = "\033[32m"
color_stop = "\033[m"
green_start = "\033[32m"
color_stop = "\033[m"
"""This prints the emerge times for different versions in the
normal operating mode of the script"""
"""This prints the emerge times for different versions in the
normal operating mode of the script"""
- for p in self.versions:
- print('-'*90 + "\n" +
- green_start + self.name + p[0] + color_stop + " >>> " +
- time(p[1]) + " >>> " + date(p[2]))
+ for p in self.versions:
+
+ print('-'*90 + "\n" +
+ green_start + self.name + p[0] + color_stop +
+ " >>> " + time(p[1]) + " >>> " + date(p[2]))
print('-'*90 + "\n" + "Package " + green_start +
self.name + color_stop + " emerged " +
print('-'*90 + "\n" + "Package " + green_start +
self.name + color_stop + " emerged " +
def print_pretended_times(self):
"""This is used the print all the pretended times"""
def print_pretended_times(self):
"""This is used the print all the pretended times"""
- print("\t" + green_start + self.name + '-' + self.version + color_stop),
+
+ if QUIET == False:
+ print("\t" + green_start + self.name + '-' + self.version + color_stop),
if len(self.versions) > 1:
aver_time = self.average_time()
if len(self.versions) > 1:
aver_time = self.average_time()
- print("\n\taverage time: " + time(aver_time))
+ if QUIET == False:
+ print("\n\taverage time: " + time(aver_time))
- print("\n\t no previous emerges")
+ if QUIET == False:
+ print("\n\t no previous emerges")
\t-c, --current \t Show time until currently compiling package finishes
\t-p, --pretended Calculate compile time from piped 'emerge -p' output
\t-h, --help \t Show this helpscreen
\t-c, --current \t Show time until currently compiling package finishes
\t-p, --pretended Calculate compile time from piped 'emerge -p' output
\t-h, --help \t Show this helpscreen
+\t-q, --quiet \t Be less verbose
\t--no-color \t Use colorless output"""
print usage
\t--no-color \t Use colorless output"""
print usage
if arg == "-h" or arg == "--help":
usage()
if arg == "-h" or arg == "--help":
usage()
+ if arg == "-q" or arg == "--quiet":
+ QUIET = True
+
if arg == "--no-color":
green_start = ""
color_stop = ""
if arg == "--no-color":
green_start = ""
color_stop = ""