aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/pks.awk75
-rw-r--r--man/man6/pks.6df4
2 files changed, 76 insertions, 3 deletions
diff --git a/games/pks.awk b/games/pks.awk
index fb40ce7b..2219872b 100644
--- a/games/pks.awk
+++ b/games/pks.awk
@@ -3,8 +3,27 @@
# Process arguments
BEGIN {
- # If no arguments, assume a dictionary file
- if (ARGC == 1) {
+ # Look for options; keep a count of non-option args
+ ac = ARGC
+ for (i = 1; i <= ARGC; i++) {
+
+ # Show a pic of Phil
+ if (ARGV[i] == "--phil") {
+ pic = 1
+ ARGV[i] = ""
+ ac--
+ }
+
+ # End-of-options
+ if (ARGV[i] == "--") {
+ break
+ ARGV[i] = ""
+ ac--
+ }
+ }
+
+ # If no arguments left, assume a dictionary file
+ if (ac == 1) {
ARGC = 2
if ("DICT" in ENVIRON)
ARGV[1] = ENVIRON["DICT"]
@@ -43,5 +62,55 @@ END {
wr = toupper(substr(wr,1,1)) substr(wr,2)
# Return the laughter and the word
- printf "%s! %s!\n", ha, wr
+ if (pic)
+ dopic(ha, wr)
+ else
+ printf "%s! %s!\n", ha, wr
+}
+
+# Ha, ha! Low-res!
+function dopic(ha, wr) {
+ print ""
+ print " " ha "! " wr "!"
+ print " \\"
+ print " .''''''''''''''''''''''.."
+ print " .'''''''''''''''''''''''''''"
+ print " .'''''''''''''''''''''''''''''"
+ print " ,'''''''''''''''''''''''''''''''"
+ print " '''''''''''''''''''''''''''''''':"
+ print " ,'''''''''''##`'''''''''''''''.'''`"
+ print " ;''''''''.###########,'''''',###'''"
+ print " ;'''''';#################:'#####.''"
+ print " `:''''''#########################'."
+ print " ::` ,'+########################';"
+ print " ''''''': .#####################''"
+ print " ''''''''.####` `;#############;##'"
+ print " ;''''''',####,###: +############."
+ print " ,###''''''#############` ;##:#######"
+ print " ,#:##''';+#####+ :###### +##+ +"
+ print " ,'#;#,''#####',+###` ;####`+ "
+ print " ,#'#,#';############++. ,`## "
+ print " :#####+:#######,@,``@@,#####' "
+ print " ;#+#+#############++++##.#+## +"
+ print " ###+################'####'## "
+ print " #######+###################.# :."
+ print " ######'########################'"
+ print " ,+#####;#######################"
+ print " ,#######;############'####+###:"
+ print " ,#######################+#####'"
+ print " ,###############' ` #'# +'#"
+ print " #,##.###########'##+##'###'####"
+ print " ``@.############## `+#@@@@@######"
+ print " +```@@################ ,,. . ####."
+ print " ;````@@,##.##############':..:######"
+ print " ;`````@@@########.##################"
+ print " +````````@@@@#####;####################:"
+ print " +`````.`````@@@@######`###################```+"
+ print " +````````,`````'@@@@@##'#####################`````."
+ print "+ ``````````.``````@@@@@@##'###'################```````` +"
+ print "```````````````````@@@@@@@'#####;##########,##'`````````````.+"
+ print "```````````````````@@@@@@@@@+#####':####+:+'````````````````````,"
+ print "```````````````````,@@@@@@@@@#:#########'@@@``````````````````````"
+ print "```````````.````````@@@@@@@@@@@@#'#####@@@@@```````````````````````"
+ print "```````````.````````@@@@@@@@@@@@@@' @@@@@@@.``````````````````````"
}
diff --git a/man/man6/pks.6df b/man/man6/pks.6df
index 30ae4ba1..47ddf7aa 100644
--- a/man/man6/pks.6df
+++ b/man/man6/pks.6df
@@ -12,6 +12,8 @@ program |
.B pks
-
.br
+.B pks
+--phil
DICT=$HOME/dict
.B pks
.SH DESCRIPTION
@@ -21,6 +23,8 @@ no files are given, it defaults to /usr/share/dict/words, or the value of DICT
(ha, ha!) if specified in the environment.
.P
A hyphen character "-" can be given as an argument to select standard input.
+.P
+Adding --phil will show a picture of our founder, Phil Ken Sebben.
.SH SEE ALSO
<https://www.youtube.com/watch?v=F8ID1KJQxB8>
.SH AUTHOR