tp-apprentissage/clustering-benchmark-master/updreadme.rb
Titouan Labourdette e3009c62af 1er commit
2021-09-28 15:35:45 +02:00

20 lines
570 B
Ruby

#!/bin/ruby
datasets=[]
Dir["src/main/resources/datasets/artificial/*.arff"].each do |f|
datasets << File.basename(f)
end
def basename(file)
file[0...file.rindex('.')]
end
datasets.sort.each do |data|
base = basename(data)
img = <<-EOS
<a href="https://github.com/deric/clustering-benchmark/blob/master/src/main/resources/datasets/artificial/#{data}"><img src="https://github.com/deric/clustering-benchmark/blob/images/fig/artificial/#{base.downcase}.png" alt="#{base}" title="#{base}" width="239px" style="max-width: 100%;float:left;"/></a>
EOS
puts img
end