From 410404e1bbf1d16a887feba39512ba7867f6136e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 19 Aug 2011 01:24:03 +0000 Subject: add a footer to point people to emailing us *properly* --- .wrongdoc.yml | 2 ++ lib/wrongdoc/final.rb | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/.wrongdoc.yml b/.wrongdoc.yml index 0e9c507..70ea654 100644 --- a/.wrongdoc.yml +++ b/.wrongdoc.yml @@ -5,3 +5,5 @@ rdoc_url: http://bogomips.org/wrongdoc/ merge_html: wrongdoc_1: Documentation/wrongdoc.1.html_fragment dotwrongdoc_5: Documentation/dotwrongdoc.5.html_fragment +public_email: wrongdoc@librelist.org +private_email: wrongdoc@bogomips.org diff --git a/lib/wrongdoc/final.rb b/lib/wrongdoc/final.rb index 0a7bd8a..adafefb 100644 --- a/lib/wrongdoc/final.rb +++ b/lib/wrongdoc/final.rb @@ -4,6 +4,7 @@ require 'fileutils' class Wrongdoc::Final include Wrongdoc::ParseXML include Wrongdoc::NewsAtom + SE_URL = 'http://kernel.org/pub/software/scm/git/docs/git-send-email.html' def run Find.find('doc') { |path| /\.html\z/ =~ path and fix(path) } @@ -14,6 +15,8 @@ class Wrongdoc::Final def initialize(opts, git_tag = nil) @cgit_uri = URI.parse(opts[:cgit_url]) @rdoc_uri = URI.parse(opts[:rdoc_url]) + @public_email = opts[:public_email] or warn ":public_email unset" + @private_email = opts[:private_email] or warn ":private_email unset" @git_tag = git_tag end @@ -82,6 +85,49 @@ class Wrongdoc::Final a["href"] = "http://bogomips.org/wrongdoc/" a.content = "wrongdoc" last.add_next_sibling(a) + + @public_email && @private_email or return + txt = <<-EOF + We love to hear from you!
+ Email patches (with git send-email), + pull requests, questions, bug reports, suggestions, etc. + to us publically at + #@public_email.
+ EOF + + case @public_email + when /@librelist\.(?:com|org)\z/ + txt << <<-EOF + To subscribe, just send any email to + #@public_email, + and respond to the automated confirmation message. + EOF + when /\A(.+)@(rubyforge\.org)\z/ # Mailman + requests = "#$1-request@#$2" + txt << <<-EOF + No subscription to the mailing list is necessary, + just let us know to Cc: you if you're unsubscribed.
+ To subscribe, email + #{requests} + with \"subscribe\" in the Subject + and respond to the automated confirmation message. + EOF + end + + txt << <<-EOF +
+ + Do not waste bandwidth with HTML, HTML mail will not be read.
+ Quote only parts you're responding to and do not + top post. +
+
+ For sensitive topics, email us privately at + #@private_email. + EOF + para = Nokogiri::XML.fragment(txt) + + last.parent.parent.add_next_sibling(para) end } end -- cgit v1.2.3-24-ge0c7