2012-11-12 14:19:53 +00:00
|
|
|
// filebot -script fn:history --format "$from => $to"
|
|
|
|
|
|
|
|
// use --format parameter to specify your own output format
|
|
|
|
def format = _args.format ?: '[$from.name] => [$to.name]'
|
|
|
|
def template = new groovy.text.GStringTemplateEngine().createTemplate(format)
|
|
|
|
|
|
|
|
// use args to list history only for the given folders if desired
|
|
|
|
def accept(from, to) {
|
2012-11-12 14:30:29 +00:00
|
|
|
args.empty ? true : args.find{ to.absolutePath.startsWith(it.absolutePath) } && to.exists()
|
2012-11-12 14:19:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getRenameLog(true).each { from, to ->
|
|
|
|
if (accept(from, to))
|
|
|
|
println template.make(from:from, to:to)
|
|
|
|
}
|