package moe.kageru.spektacles import moe.kageru.spektacles.Node.Leaf import kotlin.system.measureTimeMillis fun main() { val time = measureTimeMillis { spektacle() } println("Time spent: $time ms") } fun spektacle() { IoHandler.readFile("test.log") .parse() .filterUsers("kageru_").toList() .filter { it.getMention().nonEmpty() } .toLeaf() .groupBy { it.time.year.toString() } .groupBy { it.time.monthValue.toString() } .groupBy { it.getMention().orNull()!! } .countLeafs() .sort() //.grouped { it.time.year } //.mapValues { it.value.groupBy { it.time.month } }.k() //.ap(mapOf( //1 to { lines: Map> -> lines }, //2 to {lines -> lines.filterKeys { it < Month.APRIL }} //).k()) //.let { it } //.filterModes(UserMode.OP) //.filterMonths(Month.APRIL) //.heatMapByHour() //.deepMap { it.message } .let(::println) } private fun List.toLeaf(): Node = Leaf(this)