aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-07-02 01:03:59 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-07-02 01:03:59 +1200
commite003aab4fe76515593b86b6bd40f7f7d816fd12c (patch)
tree423efec8b52803fb4e43fa04634683f254917520 /games
parentUpdate submodules (diff)
downloaddotfiles-e003aab4fe76515593b86b6bd40f7f7d816fd12c.tar.gz
dotfiles-e003aab4fe76515593b86b6bd40f7f7d816fd12c.zip
Very important addenda to pks(6df)
Diffstat (limited to 'games')
-rw-r--r--games/pks.awk75
1 files changed, 72 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 "```````````.````````@@@@@@@@@@@@@@' @@@@@@@.``````````````````````"
}