user/dev discussion of public-inbox itself
 help / color / Atom feed
a8f9e1d1a9c129b69f42d295adb3fe3c19f3fb8a blob 1048 bytes (raw)

 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
-- Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
-- License: GPLv2 or later <https://www.gnu.org/licenses/gpl-2.0.txt>
-- This commit filter maps a subject line to a search URL of a public-inbox
-- disclaimer: written by someone who does not know Lua.
--
-- This requires cgit linked with Lua
-- Usage (in your cgitrc(5) config file):
--
--   commit-filter=lua:/path/to/this/script.lua
--
-- Example site: https://80x24.org/public-inbox.git/

local urls = {}
urls['public-inbox.git'] = 'https://public-inbox.org/meta/'
-- additional URLs here...

function filter_open(...)
	lineno = 0
	buffer = ""
end

function filter_close()
	if lineno == 1 and string.find(buffer, "\n") == nil then
		u = urls[os.getenv('CGIT_REPO_URL')]
		if u == nil then
			html(buffer)
		else
			html('<a href="' .. u .. '?x=t&amp;q=')
			html_url_arg('"' .. buffer .. '"')
			html('"><tt>')
			html_txt(buffer)
			html('</tt></a>')
		end
	else
		html(buffer)
	end
	return 0
end

function filter_write(str)
	lineno = lineno + 1
	buffer = buffer .. str
end
debug log:

solving a8f9e1d ...
found a8f9e1d in https://80x24.org/public-inbox.git

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror http://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.org/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git