Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add results from custom CONTRIBUTORS file #14

Open
glasnt opened this issue May 3, 2016 · 0 comments
Open

Add results from custom CONTRIBUTORS file #14

glasnt opened this issue May 3, 2016 · 0 comments

Comments

@glasnt
Copy link
Contributor

glasnt commented May 3, 2016

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_name

Gravatar documentation is here: https://en.gravatar.com/site/implement/images/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant