{"id":16337704,"url":"https://github.com/unhammer/gnavatar","last_synced_at":"2025-10-27T07:02:27.623Z","repository":{"id":136757247,"uuid":"378459317","full_name":"unhammer/gnavatar","owner":"unhammer","description":"Elisp gravatar/bbdb-image wrapper ","archived":false,"fork":false,"pushed_at":"2023-03-12T14:33:37.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-27T00:41:50.415Z","etag":null,"topics":["avatar","bbdb","emacs","gravatar"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unhammer.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-19T16:41:16.000Z","updated_at":"2024-11-12T12:03:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"18a9a14d-5b6e-45f3-90d6-a72e37bf06eb","html_url":"https://github.com/unhammer/gnavatar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unhammer%2Fgnavatar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unhammer%2Fgnavatar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unhammer%2Fgnavatar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unhammer%2Fgnavatar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unhammer","download_url":"https://codeload.github.com/unhammer/gnavatar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239399826,"owners_count":19632022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avatar","bbdb","emacs","gravatar"],"created_at":"2024-10-10T23:47:48.222Z","updated_at":"2025-10-27T07:02:27.553Z","avatar_url":"https://github.com/unhammer.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: gnavatar\n\n[[https://melpa.org/#/gnavatar][https://melpa.org/packages/gnavatar-badge.svg]]\n[[https://stable.melpa.org/#/gnavatar][https://stable.melpa.org/packages/gnavatar-badge.svg]]\n\n* For users who want to override gravatar\n\nIf you want to use this instead of plain Gravatar everywhere, you can\nuse:\n#+begin_src emacs-lisp\n(advice-add 'gravatar-retrieve :around #'gnavatar-override)\n#+end_src\n\nFor e-mails that exist in Gravatar, you'll get a result from\nGravatar. If they aren't in Gravatar, it'll try BBDB, using the\n=image-uri= xfield.\n\nCustomize =gnavatar-providers= to change the priority (if you want to\ntry BBDB first).\n\n* Use as library to insert avatars\n\nThe API is exactly the same as gravatar.el:\n\n#+begin_src emacs-lisp\n  (require 'gnavatar)\n  (let ((buf (current-buffer)))\n    (gnavatar-retrieve\n     \"a-gravatar-user@example.org\"\n     (lambda (i)\n       (with-current-buffer buf\n         (insert-image i)))))\n#+end_src\n\nIf you use it like this, your end-users don't have to add any advice.\n\n* Interactive helpers to add images to BBDB\n\n#+begin_src emacs-lisp\n  (require 'gnavatar-bbdb)\n  (define-key bbdb-mode-map (kbd \"y\") #'gnavatar-bbdb-add-clipboard-image-contents)\n  (define-key bbdb-mode-map (kbd \"U\") #'gnavatar-bbdb-add-clipboard-image-url)\n#+end_src\n\nNow you can copy an image and hit =y= or an image url and hit =U= on\na BBDB entry and it'll fill the image-uri field with that.\n\n\nIf you want to show the images in BBDB:\n#+begin_src emacs-lisp\n  (defun my-bbdb-image-size-ok (image)\n    \"Is IMAGE small enough?\"\n    (let* ((size (image-size image))\n           (w (car size))\n           (h (cdr size)))\n      (and (\u003c w 10) (\u003c h 10))))\n\n  (defun my-bbdb-maybe-insert-image (record)\n    \"If RECORD has an image that's small enough, insert it.\"\n    (when-let ((image (gnavatar-bbdb-create-image record)))\n      (when (my-bbdb-image-size-ok image)\n        (insert \" \")\n        (insert-image image))))\n\n  (advice-add #'bbdb-display-name-organization :after #'my-bbdb-maybe-insert-image)\n#+end_src\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funhammer%2Fgnavatar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funhammer%2Fgnavatar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funhammer%2Fgnavatar/lists"}