/avatar

A simple python gravatar replacement to host yourself. Very usefull if you want to run your own Github Enterprise and don't want to use gravatar.

Primary LanguagePython

avatar

Minimal gravatar replacement to provide avatars on github enterprise.

This little python webserver allows to upload png files in connection with an email address and return the uploaded file when queried for the md5 sum of the supplied email address.

Install and setup

  • install python
  • install python-imaging
  • copy webserver.py and index.html to a folder you wish to use as webserver root
  • create a folder for the pictures to reside in
  • edit webserver.py and put this folder's name in avatar_folder at the top
  • run the program: python webserver.py

Install as a daemon

Avatar comes with an upstart script to start and control it like a system service.

  • edit the paths in avatar.conf
  • copy avatar.conf to /etc/init/
  • create user/group avatar
  • "sudo mkdir /opt/avatar/pics"
  • "sudo chown avatar.avatar /opt/avatar/pics"
  • "sudo service avatar start" and "sudo service avatar stop"

How to use

  • direct your browser to your servers root url to upload an avatar
  • to retrieve a picture go to your provided email's md5 sum like this: http://<yourserver>/<md5 in hex>.png

How to incorporate in github enterprise

Go to the management console and enter the gravatar URL http://<yourserver>/

ToDo

  • Add some authentication mechanism to restrict access to authorized users only (maybe some email verification thingy?)
  • Beautify the webinterface
  • Proper logging for the server