@666philb , @dimkr , @jamesbond , @peebee , @fredx181 , @BarryK
(sorry if I forgot someone or bothered someone too much )
I have a suggestion for all developers and assemblers of different versions of Puppy.
Add such a wonderful thing as ANSI Code Generator to your future projects (if not added yet).
This wonderful bash script is not only fun, but also useful.
I put it in /root/my-applications/bin/ and now I can do various useful things and even such perversions :
Code: Select all
#!/bin/bash
showLine() {
local I LEN REPLACED
LEN="${#1}"
REPLACED=""
ansi -n --column=$((CENTER - ((LEN + 1) / 2)))
for ((I=0; I < ${#1}; I++)); do
case "${1:$I:1}" in
"&")
REPLACED+="$Cyan "
;;
"R")
REPLACED+="$Red "
;;
"#")
REPLACED+="$Y*"
;;
"|")
REPLACED+="$G|"
;;
*)
REPLACED+="$R?"
;;
esac
done
echo "$REPLACED$R"
}
# Yellow
Y=$(ansi --bg-yellow --magenta --no-restore)
# Green
G=$(ansi --bg-black --green --no-restore)
# Red
Red=$(ansi --bg-red --no-restore)
# Cyan
Cyan=$(ansi --bg-cyan --no-restore)
# Reset
R=$(ansi --reset-color)
PUP=(
""
"R###&||##||##|R###R||R###R||R#||#R"
"##||##|##||##|##||##|##||##|##||##"
"R###&||RR||RR|R###R||R###R|||&##&|"
"##|||||##||##|##|||||##|||||||##||"
"R&||||||#R&#||R&|||||R&|||||||##||"
)
CENTER=$(tput cols)
CENTER=$((CENTER / 2))
ansi -n --save-cursor --hide-cursor --position=2,1
for LINE in "${PUP[@]}"; do
showLine "$LINE"
done
ansi -n --cup=7,23 " ___"
ansi -n --cup=8,23 " /--| * | "
ansi -n --cup=9,23 " \-| __| \ "
ansi -n --cup=10,23 " |______| |"
ansi -n --cup=11,23 " ______||---||| | "
ansi -n --cup=12,23 "|-|------| ||| \__ "
ansi -n --cup=13,23 "|_| ____||| ___ _ _ "
ansi -n --cup=14,23 "|_|_____|------| [ ] | "
ansi -n --cup=15,23 " |____| \ |_______] | _|_ "
ansi -n --cup=16,23 " | (--) | "
ansi -n --cup=17,23 " | {__} _| |\ | "
ansi -n --cup=18,23 " | /----\ / | \| "
ansi -n --cup=19,23 " | | || | | | "
ansi -n --cup=20,23 " | | || | \_/ "
ansi -n --cup=21,23 " | | || | \/ "
ansi -n --cup=22,23 " |_| \_| /\ "
ansi --title=PuppyLinux -n --show-cursor --restore-cursor
An old friend of mine said today that Puppy here does not look like a Robopup, but looks like... a miner in a coal mine Mmmm... Okay, there's something to it (helmet?!)
Result: