diff options
Diffstat (limited to 'archive')
-rw-r--r-- | archive/rfmig.rb | 32 | ||||
-rw-r--r-- | archive/slrnpull.conf | 2 |
2 files changed, 1 insertions, 33 deletions
diff --git a/archive/rfmig.rb b/archive/rfmig.rb deleted file mode 100644 index a7d31e5..0000000 --- a/archive/rfmig.rb +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env ruby -require 'find' -require 'fileutils' -rfdir = 'rubyforge.org:/var/www/gforge-projects/rainbows/' -newbase = 'https://bogomips.org/rainbows/' -refresh = '<meta http-equiv="refresh" content="0; url=%s" />' -old = 'rf.old' -new = 'rf.new' -cmd = %W(rsync -av #{rfdir} #{old}/) -unless File.directory?(old) - system(*cmd) or abort "#{cmd.inspect} failed: #$?" -end - -Find.find(old) do |path| - path =~ /\.html\z/ or next - data = File.read(path) - tmp = path.split(%r{/}) - tmp.shift == old or abort "BUG" - dst = "#{new}/#{tmp.join('/')}" - - tmp[-1] = '' if tmp[-1] == "index.html" - url = "#{newbase}#{tmp.join('/')}" - meta = sprintf(refresh, url) - data.sub!(/(<head[^>]*>)/i, "#$1#{meta}") - data.sub!(/(<body[^>]*>)/i, - "#{$1}Redirecting to <a href=\"#{url}\">#{url}</a> ...<br/>") - FileUtils.mkdir_p(File.dirname(dst)) - File.open(dst, "w") { |fp| fp.write(data) } -end - -print "Verify results in #{new}/, then run:\n " -puts %W(rsync -av #{new}/ #{rfdir}).join(' ') diff --git a/archive/slrnpull.conf b/archive/slrnpull.conf index 9cf80ba..480cbec 100644 --- a/archive/slrnpull.conf +++ b/archive/slrnpull.conf @@ -1,4 +1,4 @@ # group_name max expire headers_only gmane.comp.lang.ruby.rainbows.general 1000000000 1000000000 0 -# usage: slrnpull -d $PWD -h news.gmane.org --no-post +# usage: slrnpull -d $PWD -h news.gmane.io --no-post |