It took a day or two of blog reading and scala console try outs but I managed to create my first usable Scala script.
import scala.xml._
/**
Sequence number fix script. See http://fugamusic.com/docs/ingestion/ingestion.xsd
**/
object FixSequence {
var seq: List[Pair[Int,Int]] = List()
var working_vol = 0
def main(args: Array[String]) {
val pp = new PrettyPrinter(80, 2)
val fuga = XML.loadFile(args(0))(0)
loadSeq(fuga)
println(pp.format(fixSeq(fuga)))
}
def loadSeq(xml: Node) {
for [...]
