Permalink
Browse files

Updated content to convert ... to … and added script to check …

…for non english content
  • Loading branch information...
1 parent 2721393 commit 9f542db99ed3438a72d10184992161b92c87435e @jeremyf committed Apr 14, 2011
Showing with 12 additions and 0 deletions.
  1. +10 −0 lib/check_for_english_content.rb
  2. +2 −0 lib/update_content.rb
@@ -0,0 +1,10 @@
+#!/usr/bin/env ruby
+require 'yaml'
+require 'uri'
+
+Dir.glob(File.join(File.dirname(__FILE__), "../storage/serializations/reviews/**/*.yml")).each do |filename|
+ file_info = YAML.load_file(filename)
+ if file_info['content'].grep(/[A-Z]/).none?
+ require 'ruby-debug'; debugger; true;
+ end
+end
View
@@ -29,6 +29,8 @@
end
end
+ file_info['transformed_content'].gsub!(/\. ?\. ?\./, '…')
+
if file_info['transformed_content']
File.open(filename, 'w+') do |file|
file.puts YAML.dump(file_info)

0 comments on commit 9f542db

Please sign in to comment.