-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wish List - 2019/2020/2021/2022/2023 #3
Comments
Colorized output would be great |
Can you sort the HTML output that is sent in email by package name? |
I have started to code some of the enhancements. Current changes (v0.3.0) :
@sgeto When you say colorized output, you mean on CLI right? For now, the output is prettier just by formatting a table, eg:
|
WOW, that was QUICK! Thanks |
It works like a charm ( v 0.3.0 ) . The only weird thing is that I get this during the updates:
|
Found a minor problem with the new listing, not printing the first item to screen (email is fine). |
@Goro2030 That is weird... It seems to be a opkg post-install error (when applying the new configs). Example:
It may be that it only happens when upgrading though. |
Yes, it happens anyway (when manually updating) . Offtopic, but, what can be wrong with my installation? |
@Goro2030 Found this: Quote:
|
Version 0.3.4 was pushed. v0.3.4 :
|
v0.3.5 works perfectly. New looks of the html email sent is great! |
Sorry for the delay. Something like this maybe (sorry for the terrible script): #!/bin/sh
# Colors config . . . [[ JZ . . . ]]
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
# Router Details
MTHOST="192.168.1.11"
# Check if Router is accessible. If not, EXIT immediately.
while ! ping -c 1 $MTHOST &>/dev/null
do
echo -e ""$COL_RED"ALERT ..... Router $MTHOST is DOWN$COL_RESET"
exit 1
done
echo -e "Router is accessible... $COL_GREEN OK $COL_RESET" |
Thanks for the snippet. Since this is busybox/ash there is no I made a little research online and adapted some stuff I tested within this little test script. #!/bin/sh
# Gustavo Arnosti Neves - Dec 2018
# Modified from many other snippets
# Adapted to work virtually anywhere
# Works on busybox/ash
ESeq="\x1b["
RCol="$ESeq"'0m' # Text Reset
# Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds
Bla="$ESeq"'0;30m'; BBla="$ESeq"'1;30m'; UBla="$ESeq"'4;30m'; IBla="$ESeq"'0;90m'; BIBla="$ESeq"'1;90m'; On_Bla="$ESeq"'40m'; On_IBla="$ESeq"'0;100m';
Red="$ESeq"'0;31m'; BRed="$ESeq"'1;31m'; URed="$ESeq"'4;31m'; IRed="$ESeq"'0;91m'; BIRed="$ESeq"'1;91m'; On_Red="$ESeq"'41m'; On_IRed="$ESeq"'0;101m';
Gre="$ESeq"'0;32m'; BGre="$ESeq"'1;32m'; UGre="$ESeq"'4;32m'; IGre="$ESeq"'0;92m'; BIGre="$ESeq"'1;92m'; On_Gre="$ESeq"'42m'; On_IGre="$ESeq"'0;102m';
Yel="$ESeq"'0;33m'; BYel="$ESeq"'1;33m'; UYel="$ESeq"'4;33m'; IYel="$ESeq"'0;93m'; BIYel="$ESeq"'1;93m'; On_Yel="$ESeq"'43m'; On_IYel="$ESeq"'0;103m';
Blu="$ESeq"'0;34m'; BBlu="$ESeq"'1;34m'; UBlu="$ESeq"'4;34m'; IBlu="$ESeq"'0;94m'; BIBlu="$ESeq"'1;94m'; On_Blu="$ESeq"'44m'; On_IBlu="$ESeq"'0;104m';
Pur="$ESeq"'0;35m'; BPur="$ESeq"'1;35m'; UPur="$ESeq"'4;35m'; IPur="$ESeq"'0;95m'; BIPur="$ESeq"'1;95m'; On_Pur="$ESeq"'45m'; On_IPur="$ESeq"'0;105m';
Cya="$ESeq"'0;36m'; BCya="$ESeq"'1;36m'; UCya="$ESeq"'4;36m'; ICya="$ESeq"'0;96m'; BICya="$ESeq"'1;96m'; On_Cya="$ESeq"'46m'; On_ICya="$ESeq"'0;106m';
Whi="$ESeq"'0;37m'; BWhi="$ESeq"'1;37m'; UWhi="$ESeq"'4;37m'; IWhi="$ESeq"'0;97m'; BIWhi="$ESeq"'1;97m'; On_Whi="$ESeq"'47m'; On_IWhi="$ESeq"'0;107m';
printInfo() {
echo -e "${BICya}>>>> ${BIYel}${1}${RCol}"
}
printInfo "REGULAR"
echo -e "${Bla}BLACK ${Blu}BLUE ${Red}RED ${Gre}GREEN ${Yel}YELLOW ${Pur}PURPLE ${Cya}CYAN ${Whi}WHITE ${RCol}\n"
# Using printf
#printf "${Bla}BLACK ${Blu}BLUE ${Red}RED ${Gre}GREEN ${Yel}YELLOW ${Pur}PURPLE ${Cya}CYAN ${Whi}WHITE ${RCol}\n\n"
printInfo "BOLD"
echo -e "${BBla}BLACK ${BBlu}BLUE ${BRed}RED ${BGre}GREEN ${BYel}YELLOW ${BPur}PURPLE ${BCya}CYAN ${BWhi}WHITE ${RCol}\n"
printInfo "UNDERLINE"
echo -e "${UBla}BLACK ${UBlu}BLUE ${URed}RED ${UGre}GREEN ${UYel}YELLOW ${UPur}PURPLE ${UCya}CYAN ${UWhi}WHITE ${RCol}\n"
printInfo "HIGH INTENSITY"
echo -e "${IBla}BLACK ${IBlu}BLUE ${IRed}RED ${IGre}GREEN ${IYel}YELLOW ${IPur}PURPLE ${ICya}CYAN ${IWhi}WHITE ${RCol}\n"
printInfo "BOLD HIGH INTENSITY"
echo -e "${BIBla}BLACK ${BIBlu}BLUE ${BIRed}RED ${BIGre}GREEN ${BIYel}YELLOW ${BIPur}PURPLE ${BICya}CYAN ${BIWhi}WHITE ${RCol}\n"
printInfo "BACKGROUND"
echo -e "${On_Bla}BLACK ${On_Blu}BLUE ${On_Red}RED ${On_Gre}GREEN ${On_Yel}YELLOW ${On_Pur}PURPLE ${On_Cya}CYAN ${On_Whi}WHITE ${RCol}\n"
printInfo "HIGH INTENSITY BACKGROUND"
echo -e "${On_IBla}BLACK ${On_IBlu}BLUE ${On_IRed}RED ${On_IGre}GREEN ${On_IYel}YELLOW ${On_IPur}PURPLE ${On_ICya}CYAN ${On_IWhi}WHITE ${RCol}\n" Example run: Now I need to make hundreds of tests on how to make it pretty with colors. I will probably make a flag to disable colorized output as well, since some people dislike/disable colors. I may also do it in a way that it can be themed, which should be almost the same effort:
Cheers! |
Already Implemented
v0.3.2 :
opkg list-upgradable
may print something like"Multiple packages (libpthread and libpthread) providing same name marked HOLD or PREFER. Using latest."
within the list. This used to cause an error because it would be parsed as a package name.awk + printf
to print an ASCII table of the updates (prettier)v0.3.4 :
/etc/openwrt_release
when availableDISTRIB_RELEASE='SNAPSHOT'
and show warning about upgrading thosePending
Self-Update
parameter/functionality (to upgrade from github master)squashfs
"problem" (read only, uses new space)SNAPSHOT
"problem" (why those should not be upgraded)/etc/config/*-opkg
files (or get from installer message)diff
orgit diff
to offer comparison (if available)tav
The text was updated successfully, but these errors were encountered: