Article 4ZRH7 [FRILLS] Get your ChangeLog rococo

[FRILLS] Get your ChangeLog rococo

by
NonNonBa
from LinuxQuestions.org on (#4ZRH7)
Hi,

Just sharing a little piece of code, to get a colorized version of the ChangeLog of your Slack (did you know the Greek statues were originally painted?)

Have fun. :hattip:

Code:#!/bin/sh

log=https://mirrors.slackware.com/slackware/slackware
[ "$(uname -m)" = "x86_64" ] && log=${log}64

read a v </etc/slackware-version
if [ "${v%+}" = "$v" ]; then
log=$log-$v
else
log=$log-current
fi

curl -sL $log/ChangeLog.txt | awk '
/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) [A-S].. / {
print "\033[1;7m"$0"\033[0;0m"; next
}
/^[^: ]+\/[^: ]+:/ {
x = tolower($2)
c = "1;34m"
if ((index(x, "added") == 1))
c = "1;32m"
else if ((index(x, "removed") == 1))
c = "1;31m"
$1 = "\033["c$1"\033[0;0m"; print; next
}
/^\+---+/{ $0 = "" }{ print }' | less -sirlatest?d=yIl2AUoC8zA latest?i=RqUi5H9GLhc:ZY-Dja4TnwE:F7zBnMy latest?i=RqUi5H9GLhc:ZY-Dja4TnwE:V_sGLiP latest?d=qj6IDK7rITs latest?i=RqUi5H9GLhc:ZY-Dja4TnwE:gIN9vFwRqUi5H9GLhc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments