diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-08-19 01:24:03 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-08-19 01:24:03 +0000 |
commit | 410404e1bbf1d16a887feba39512ba7867f6136e (patch) | |
tree | bd65e094458457cbd3b61e1c91b652ae7f5b57cc | |
parent | 35a33a56e142edf7f64dc2bd63adea4e9da89317 (diff) | |
download | wrongdoc-410404e1bbf1d16a887feba39512ba7867f6136e.tar.gz |
add a footer to point people to emailing us *properly*
-rw-r--r-- | .wrongdoc.yml | 2 | ||||
-rw-r--r-- | lib/wrongdoc/final.rb | 46 |
2 files changed, 48 insertions, 0 deletions
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!<br /> + Email patches (with <a href="#{SE_URL}">git send-email</a>), + pull requests, questions, bug reports, suggestions, etc. + to us publically at + <a href="mailto:#@public_email">#@public_email</a>.<br /> + EOF + + case @public_email + when /@librelist\.(?:com|org)\z/ + txt << <<-EOF + To subscribe, just send any email to + <a href="mailto:#@public_email">#@public_email</a>, + 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 <b>Cc:</b> you if you're unsubscribed.<br /> + To subscribe, email + <a href="mailto:#{requests}?subject=subscribe">#{requests}</a> + with \"subscribe\" in the Subject + and respond to the automated confirmation message. + EOF + end + + txt << <<-EOF + <br /> + <b> + Do not waste bandwidth with HTML, HTML mail will not be read.<br /> + Quote only parts you're responding to and do not + <a href="http://catb.org/jargon/html/T/top-post.html">top post</a>. + <br /> + </b> + For sensitive topics, email us privately at + <a href="mailto:#@private_email">#@private_email</a>. + EOF + para = Nokogiri::XML.fragment(txt) + + last.parent.parent.add_next_sibling(para) end } end |