diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-07-02 01:03:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-07-02 01:03:59 +1200 |
commit | e003aab4fe76515593b86b6bd40f7f7d816fd12c (patch) | |
tree | 423efec8b52803fb4e43fa04634683f254917520 | |
parent | Update submodules (diff) | |
download | dotfiles-e003aab4fe76515593b86b6bd40f7f7d816fd12c.tar.gz dotfiles-e003aab4fe76515593b86b6bd40f7f7d816fd12c.zip |
Very important addenda to pks(6df)
-rw-r--r-- | games/pks.awk | 75 | ||||
-rw-r--r-- | man/man6/pks.6df | 4 |
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 |