Handbook
Glossary
comic-image ( url -- image )
Vocabulary
xkcd
.
private
Inputs
url
an
object
Outputs
image
an
object
Definition
USING:
http.client
images.http
kernel
regexp
sequences
strings
;
IN:
xkcd.private
:
comic-image
( url -- image )
http-get
nip
R/ \/\/imgs\.xkcd\.com\/comics\/[^\.]+\.(png|jpg)/
first-match
>string
"https:"
prepend
load-http-image
;