-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: libravatar
action: blob
revision:
path_from: libravatar.cgi
revision_from: refs/heads/trunk:
path_to:
revision_to:

git.thebackupbox.net

libravatar

git://git.thebackupbox.net/libravatar

blob of:

libravatar

/ libravatar.cgi

refs/heads/trunk:/libravatar.cgi
 #!/usr/bin/env bash

 user="$(uriunescape "$(query_param "$user")")"

 mkdir -p ~/.cache/libravatar
 cache_file=~/.cache/libravatar/"${user}"

 libravatar-resolve.sh "${user}" "${cache_file}"

 type="$(mime-type "$cache_file")"

 case "$type" in
 image/*)
   printf "Content-Type: %s\r\n\r\n" "$type"
   cat "${cache_file}"
   exit 0
   ;;
 *)
   printf "Content-Type: application/svg+xml\r\n\r\n"
 cat <<EOF
 <text>avatar was not image type</text>
 EOF
   exit 0
   ;;
 esac

-- Response ended

-- Page fetched on Sun Jun 2 10:35:33 2024