-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Given the standardisation of the CONTRIBUTORS file documented in octohatrack, this functionality shouldn't be too hard to implement on the web client.
Additionally, it's possible to pull GitHub files' contents directly from the API (base64 encoded content result on file response) so it should require no local files, and thus is able to be implemented in JavaScript.
Given the command-line can't do avatars (it used to when it also generated HTML), I've added scope in the CONTRIBUTORS format to handle github, twitter and email links. This maps to github avatars, twitter avatars, and gravatars.
The implementation of getting the avatar icons given these three unique identifiers should be possible.
Stub code from octohatrack (python) for the github and twitter avatar code
## Using the GitHub API itself, return the avatar URL
def get_gh_avatar(user_name):
u = get_data("/users/%s" % user_name)
return u["avatar_url"]
## Using the Twitter API, this url resolves to the current avatar for the user (with a redirect, but that should be fine)
def get_twitter_avatar(user_name):
return "https://twitter.com/%s/profile_image?size=original" % user_nameGravatar documentation is here: https://en.gravatar.com/site/implement/images/