123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/usr/bin/sidef
- # Change the names of the interpreters inside the generated reports.
- var replaces = Hash(
- 'Elixir' => 'Elixir 1.5.1',
- 'Julia' => 'Julia 0.6.0',
- 'OCaml' => 'OCaml 4.05.0',
- 'Groovy' => 'Groovy 2.4.12',
- 'LuaJIT' => 'LuaJIT 2.0.5',
- 'PyPy' => 'PyPy 5.8.0',
- 'Crystal' => 'Crystal 0.23.1',
- 'Scala' => 'Scala 2.12.3',
- 'PHP' => 'PHP 7.1.9',
- 'Python 2' => 'Python 2.7.14',
- 'Python 3' => 'Python 3.6.2',
- 'JRuby' => 'JRuby 9.1.12',
- 'mRuby' => 'mRuby 1.3.0',
- 'AWK (mawk)', 'Mawk 1.3.4',
- 'Perl6 MoarVM' => 'Rakudo 2017.09',
- 'Ruby' => 'Ruby 2.4.2',
- 'Lua' => 'Lua 5.3.4',
- 'Perl' => 'Perl 5.26.1',
- 'AWK (gawk)' => 'Gawk 4.1.4',
- 'Clojure' => 'Clojure 1.8.0',
- 'Tcl' => 'Tcl 8.6.7',
- 'Pike' => 'Pike 8.0.438',
- )
- glob("Reports/Interpreted/*").each { |file|
- file ~~ /\.csv\z/ || next
- File(file).edit { |line|
- replaces.each_kv { |key, value|
- line.sub!(Regex('^"?\K' + key.escape + '(?="?,)', 'i'), value)
- }
- line
- }
- }
|