robohash: adding a robot-based hashing tool.
parent
5e1c0580d7
commit
ce48bb2ebf
|
@ -0,0 +1 @@
|
||||||
|
John Benediktsson
|
|
@ -0,0 +1,23 @@
|
||||||
|
! Copyright (C) 2011 John Benediktsson.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
|
||||||
|
USING: images.http kernel sequences urls urls.encoding ;
|
||||||
|
|
||||||
|
IN: robohash
|
||||||
|
|
||||||
|
<PRIVATE
|
||||||
|
|
||||||
|
: robohash-url ( str -- url )
|
||||||
|
url-encode "http://robohash.org/" prepend >url ;
|
||||||
|
|
||||||
|
: (robohash) ( str type -- image )
|
||||||
|
[ robohash-url ] [ "set" set-query-param ] bi*
|
||||||
|
load-http-image ;
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
||||||
|
: robohash1 ( str -- image ) "set1" (robohash) ;
|
||||||
|
|
||||||
|
: robohash2 ( str -- image ) "set2" (robohash) ;
|
||||||
|
|
||||||
|
: robohash3 ( str -- image ) "set3" (robohash) ;
|
|
@ -0,0 +1 @@
|
||||||
|
Robohash!
|
Loading…
Reference in New Issue