view webGL/ruby/directoryReader.rb @ 15:80789d11de5c draft

add function for text draw
author e105711 <yomitan.ie.u-ryukyu.ac.jp>
date Sun, 01 Jul 2012 22:01:18 +0900
parents 1eebc1f7874d
children b322a8557f93
line wrap: on
line source

#!/user/bin/ruby

dir = Dir.open("../music/");
file = File.open("../src/loadMusicFiles.js","w");
file.print "function loadMusicFiles(){\n";
dir.each{|list|
  if list.match(".json") && !(list.match("~")) then
    file.print "\tmusicsArray.push(\"music/" + list + "\");\n";
  end
}
file.print "\tcursor.setMAX(musicsArray.length);\n";
file.print "}\n";
dir.close();
file.close();