Skip to content

Commit

Permalink
Updates all the ref: pages in wiki, useful for implementing new template
Browse files Browse the repository at this point in the history
  • Loading branch information
houshuang committed Nov 16, 2012
1 parent 288fba6 commit 1970fd2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions update_ref_headers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$:.push(File.dirname($0))
require 'utility-functions'
require 'wiki-lib'

# script which goes through all the ref pages in wiki, and updates headers
attempt = 0
success = 0
Dir.foreach(Wiki_path + "/data/pages/ref") do |f|
next if f == '.' or f == '..'
next unless f.size < 4 || f[-4..-1].downcase == '.txt'
ref = f[0..-5]
attempt += 1
try { ensure_refpage(ref)
success += 1
}
end

puts "#{success} ref pages updated, out of #{attempt} attempted."

0 comments on commit 1970fd2

Please sign in to comment.