about summary refs log tree commit diff
path: root/filters/email-gravatar.lua
blob: 52cf4268a4963188e577aa0de8b06ad5dfc447c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
-- This script may be used with the email-filter or repo.email-filter settings in cgitrc.
-- It adds gravatar icons to author names. It is designed to be used with the lua:
-- prefix in filters. It is much faster than the corresponding python script.
--
-- Requirements:
-- 	luacrypto >= 0.3
-- 	<http://mkottman.github.io/luacrypto/>
--

local crypto = require("crypto")

function filter_open(email, page)
	buffer = ""
	md5 = crypto.digest("md5", email:sub(2, -2):lower())
end

function filter_close()
	html("<img src='//www.gravatar.com/avatar/" .. md5 .. "?s=13&amp;d=retro' width='13' height='13' alt='Gravatar' /> " .. buffer)
	return 0
end

function filter_write(str)
	buffer = buffer .. str
end


eb9f753495c3b4f4f78&follow=1'>Retry on EINTR from waitpid(2)June McEnroe This was reported by hovsater on IRC but I only saw it on my phone and I guess am missing logs for it. In any case the link to their patch is expired, so I wrote this. 2026-04-23Add dais from Left Hand of DarknessJune McEnroe I have not read it. This was contributed by the woman who made me install Real War: Not Fake. 2026-04-23Add y-d templateJune McEnroe 2026-03-23Replace tmppath pledge with rpath wpath cpathJune McEnroe 2026-03-23Add -ll for hilexJune McEnroe huh. should have always been there I guess, but now it actually matters, at least on OpenBSD? 2026-02-17Remove photo metadata directoriesJune McEnroe 2026-02-17Ignore photo metadataJune McEnroe I just don't want to be adding all this stuff to git. 2026-02-16Populate films datalist with 20 most recently usedJune McEnroe 2026-02-16Select last used bodyJune McEnroe 2026-02-15Don't break on trip with removed bodyJune McEnroe 2026-02-11Keep manpath.conf sortedJune McEnroe