Skip to content

Instantly share code, notes, and snippets.

@rgchris rgchris/gravatar.r
Last active Dec 20, 2018

Embed
What would you like to do?
Gravatar Lookup for Rebol and Red
Rebol [
Title: "Get Gravatar"
File: %gravatar.r
Date: 27-Nov-2012
Purpose: "Generate Gravatar Profile Image URLs"
]
gravatar: use [to-md5][
to-md5: func [val [any-string!]][
lowercase enbase/base checksum/method to binary! lowercase trim form val 'md5 16
]
func [
"Obtain the Gravatar Profile Image for the given Email Address"
email [email!] "Email Address to Lookup"
][
rejoin [http://www.gravatar.com/avatar/ to-md5 email]
]
]
Red [
Title: "Get Gravatar"
File: %gravatar.red
Date: 19-Dec-2018
Purpose: "Generate Gravatar Profile Image URLs"
]
gravatar: func [
"Obtain the Gravatar Profile Image for the given Email Address"
email [email!] "Email Address to Lookup"
][
rejoin [http://www.gravatar.com/avatar/ lowercase enbase/base checksum lowercase trim form email 'md5 16]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.