Git Product home page Git Product logo

nim-libravatar's Introduction

Nim-Libravatar

Libravatar library for Nim, Gravatar alternative. Libravatar is an open source federated avatar api and service.

Features

  • Your users nor you dont need a Libravatar account if you dont want to, because if Libravatar cant find you it redirects you to your Gravatar, if you have no Gravatar then it returns a default autogenerated image.
  • Federation supported passing baseUrl, DNS server discovery is up to you if you want to, Pull Request welcome.
  • 404 wont return 404, but a default image, use default="404" for a HTTP 404 Error.
  • Uses func so is Side Effects Free, works with Async & MultiSync.
  • runnableExamples included, Self-Documented, NEP-1 Ok.
  • Best quality avatar sizes are between 80 & 128, 512 may or may not look a little stretched, depends on original quality.
  • Tiny and simple but reusable code.
  • By design is also a Gravatar library :)

Install

Use

import libravatar
var email = "[email protected]"
getLibravatarUrl(email)
echo email
email = "[email protected]"
getLibravatarUrl(email, size=512, default="monsterid")
echo email
email = "[email protected]"
getLibravatarUrl(email, size=9, default="404", baseUrl="https://MyCustomFederatedServer.org/avatar/")
echo email

Libravatar App

  • This module is also a crossplatform command line terminal App.
  • Just compile and run it, compiles to a single file 0-dependency native binary executable of ~120Kb.
  • Only takes 1 argument thats the email that you want the avatar from, filename will be the email.
$ nim c -d:release -d:ssl libravatar.nim
$ ./libravatar "[email protected]"
$ file "[email protected]"
[email protected]: JPEG image data, JFIF standard 1.0, resolution (DPI), precision 8, 128x128

Libravatar Vs Gravatar

Feature Libravatar Gravatar
JPEG and PNG support Yes Yes
GIF support Yes No
Upload size limit 10 MB ???
Image size (in pixels) 1 to 512 2048
HTTPS support Yes Yes
IPv6 support Yes No
Supported email hashes MD5, SHA256 MD5 only
OpenID URL support Yes No
Redirection to Gravatar Yes No
Customizable default image Yes Yes
MPAA-style image ratings (Adult Content, Nude, Porn) G-Rated only (No Porn) Yes
Text-based profile information No Yes
Federation via DNS SRV records Yes No
LDAP authentication Yes No
OpenID authentication Yes No
Automatic photo importers Yes No
Translated user interface Yes Yes
Account export Yes No
Account deletion Yes No
XML-RPC API No Yes
Libraries/plugins available Yes Yes
Free and Open Source software Yes No
Distributed service Community mirrors Commercial Proprietary
Corporate owner No Automattic

Stars

Star nim-libravatar on GitHub

nim-libravatar's People

Contributors

juancarlospaco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

refaqtor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.