require 'csv'
require 'date'
csv_path_base = "./theses-"
prof = ["mtk","mmz"]
date,row = {}
header = "
Software Engineering Research Group
Students who did their MASTER theses in SoftEng
"
footer = ""
theses = Hash.new
File.open("./theses_history.html","w") do |f|
f.write "#{header}"
prof.each do |p|
csv_path_in = "#{csv_path_base}#{p}-filtered.csv"
CSV.foreach(csv_path_in) do |row|
#Date._strptime(row[4], "%d/%m/%Y")
id = row[0].to_s.to_i
line = " #{row[1]} #{row[2]}, #{row[3]} (#{row[4]})
"
theses[id] = line unless id == 0
end
end
theses.sort.reverse.each do |id,line|
f.write "#{line}"
end
f.write "#{footer}"
end