1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 08:25:02 -04:00

Move data file maintenance to GitHub

This commit is contained in:
Reinhard Pointner 2016-02-24 19:33:04 +00:00
parent ebcd2f9677
commit 385c192757

View File

@ -1,6 +1,6 @@
#!/usr/bin/env filebot -script
import java.util.regex.*
import org.tukaani.xz.*
@ -22,8 +22,8 @@ def dir_data = "${dir_website}/data"
def output = new File("${dir_data}/${it}")
def set = new TreeSet(String.CASE_INSENSITIVE_ORDER)
input.getText('UTF-8').split(/\R/).each{
set += java.util.regex.Pattern.compile(it.trim()).pattern()
input.getText('UTF-8').split(/\R/)*.trim().findAll( it.length() > 0 ).each{
set += Pattern.compile(it).pattern()
}
set.join('\n').saveAs(output)