Sha256: d43d718d6ab287d3f0bfe9ad12a87fa37b97a2617b7c2d4c7bbe4616533b9ba3

Contents?: true

Size: 480 Bytes

Versions: 17

Compression:

Stored size: 480 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-

require 'tmpdir'

tmpdir = Dir.mktmpdir
table = {}

Dir.entries("text").each do |name|
  next if [".", ".."].include?(name)
  path = File.join(tmpdir,name)
  `nkf -w #{File.join("text",name)} > #{path}`
  text = File.read(path)
  
  text.split("").each do |c|
    table[c] =  table.has_key?(c) ? table[c].succ : 1
  end
end

table.keys.sort {|a,b| table[b] <=> table[a] }.each do |key|
  puts "#{key.inspect[1..-2]}:#{table[key]}"
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pione-0.5.0 example/CountChar/misc/CountChar.rb
pione-0.5.0.alpha.2 example/CountChar/misc/CountChar.rb
pione-0.5.0.alpha.1 example/CountChar/misc/CountChar.rb
pione-0.4.2 example/CountChar/misc/CountChar.rb
pione-0.4.1 example/CountChar/misc/CountChar.rb
pione-0.4.0 example/CountChar/misc/CountChar.rb
pione-0.3.2 example/CountChar/misc/CountChar.rb
pione-0.3.1 example/CountChar/misc/CountChar.rb
pione-0.3.0 example/CountChar/misc/CountChar.rb
pione-0.2.2 example/CountChar/misc/CountChar.rb
pione-0.2.1 example/CountChar/misc/CountChar.rb
pione-0.2.0 example/CountChar/misc/CountChar.rb
pione-0.1.4 example/CountChar/misc/CountChar.rb
pione-0.1.3 example/CountChar/misc/CountChar.rb
pione-0.1.2 example/CountChar/misc/CountChar.rb
pione-0.1.1 example/CountChar/misc/CountChar.rb
pione-0.1.0 example/CountChar/misc/CountChar.rb