From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason at zx2c4.com (Jason A. Donenfeld) Date: Mon, 13 Jan 2014 04:53:04 +0100 Subject: Adding Filter Types to cgit [was: RFE: .so filters] In-Reply-To: References: Message-ID: zx2c4 at thinkpad ~/Projects/cgit/filters $ cat email-gravatar.lua -- 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 -- -- require("crypto") function filter_open(email) buffer = "" md5 = crypto.digest("md5", email:sub(2, -2):lower()) end function filter_close() html(" " .. buffer) end function filter_write(str) buffer = buffer .. str end