Last active
March 17, 2016 04:31
-
-
Save skoji/0fe9feaec2830bdc58d7 to your computer and use it in GitHub Desktop.
ズンドコキヨシ (PostScript版、Ghostscript 9.18で動作確認)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% zundoko-kiyoshi in postscript | |
/Palatino-Italic findfont 40 scalefont setfont | |
/height 50 def | |
clippath pathbbox /top exch def pop pop pop newpath | |
10 top moveto | |
/zd { | |
rand 2 mod 0 eq | |
{ (zun) } | |
{ (doko) } | |
ifelse | |
} def | |
(%Calendar%) currentdevparams | |
dup /Second get | |
exch dup /Minute get 60 mul | |
exch /Hour get 60 60 mul mul | |
add add srand | |
/zunct 0 def | |
/kiyoshi false def | |
{ | |
currentpoint exch pop height lt { | |
showpage 10 top moveto | |
} if | |
kiyoshi { | |
(kiyoshi) show | |
showpage | |
exit | |
} if | |
zd | |
dup (zun) eq zunct 4 lt and | |
{ | |
/zunct zunct 1 add def | |
} if | |
dup (doko) eq | |
{ | |
zunct 4 eq { | |
/kiyoshi true def | |
} | |
{ | |
/zunct 0 def | |
} ifelse | |
} if | |
gsave | |
show | |
grestore | |
0 height neg rmoveto | |
} loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment