From d6b8c187a0ed9acfd16ce32c92ae5542b12df6a5 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 12 Nov 2012 14:19:53 +0000 Subject: [PATCH] + script printing and querying the history --- website/scripts/history.groovy | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 website/scripts/history.groovy diff --git a/website/scripts/history.groovy b/website/scripts/history.groovy new file mode 100644 index 00000000..fbbe04f0 --- /dev/null +++ b/website/scripts/history.groovy @@ -0,0 +1,16 @@ +// 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) { + args.empty ? true : args.find{ to.absolutePath.startsWith(it.absolutePath) } +} + + +getRenameLog(true).each { from, to -> + if (accept(from, to)) + println template.make(from:from, to:to) +}