Class ExpressionFormatMethods
java.lang.Object
net.filebot.format.ExpressionFormatMethods
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringConvert to acronym.static StringMatch substring before the given pattern or return the original value.static Filestatic StringConvert Unicode characters to ASCII.static Stringstatic StringasciiQuotes(String self) static StringMatch substring before the given pattern or return the original value.static StructuredFilebitwiseNegate(StructuredFile self) Nullify the Movies / TV Series folder level.static List<?> static ObjectUnwind if an object does not satisfy the given predicate.static StringStrip brackets and other clutter patterns.static StringReplace all colons.static Stringstatic intstatic StructuredFilederive(StructuredFile self, Object tag, Object... tags) Add values to the file name, after the file name, but before the subtitle language suffix and file extension.static StructuredFilederiveFolder(StructuredFile self, Object tag, Object... tags) Add a value to the movie / series folder name.static Filestatic Filestatic Filestatic Filestatic Filestatic MatcherFind match in case-insensitive mode.static MatcherfindWordMatch(String self, String pattern) Find match in between word boundaries in case-insensitive mode.static Stringformat(TemporalAmount self, String pattern) static Stringformat(TemporalAmount self, String pattern, Locale locale) static Stringstatic Stringstatic Stringstatic Stringstatic longgetDiskSpace(File self) getGraphemeClusters(String self) static FilegetRelativePathTail(File self, int tailSize) static Filestatic Filestatic StringinitialName(String self) Reduce first name to initials.static booleanstatic Stringjoining(Collection<?> self, String delimiter) static Stringjoining(Collection<?> self, String delimiter, String prefix, String suffix) static StringjoiningDistinct(Collection<?> self, String delimiter, Closure<?>... mapper) static StringjoiningDistinct(Collection<?> self, String delimiter, String prefix, String suffix, Closure<?>... mapper) static StructuredFileleftShift(StructuredFile self, Object tag) Add a value to the season folder level.static StringConvert all characters to lower case/ e.g.static Stringstatic StringlowerTrail(String self) Convert all trailing characters to lower case.static StringMatch pattern and return or unwind if pattern cannot be found.static Stringstatic ObjectFind matching pattern and return mapped value.static Objectmatch(Collection<?> self, Map<?, ?> matcher) Match all occurrences of the given pattern or unwind if pattern cannot be found.matchBrackets(String self) Match brackets pattern.static Filestatic StructuredFilemod(StructuredFile self, Object tag) Add values to the file name, after the file name, but before the subtitle language suffix and file extension.static StructuredFilemultiply(StructuredFile self, Object tag) Add a value to the movie / series folder name.static ReverseComparablenegative(Comparable self) static Stringpad(CharSequence self, int length, CharSequence padding) static Stringstatic StringPad number patterns to length using the given character.static Datestatic Datestatic Datestatic Filestatic Stringstatic StructuredFilepower(StructuredFile self, Object tag) Add a value to the file name and the movie / series folder name.static Stringstatic Stringstatic StringremoveBrackets(String self) Remove brackets pattern.static StringStrip characters that aren't allowed on Windows from the given filename.static StringApply replacement mappings.static Collection<String> replace(Collection<?> self, Map<String, String> replacer) Apply replacement mappings.static StringreplaceAll(String self, String pattern) static StringReplace characters that aren't allowed on Windows from the given filename with similar-looking unicode equivalentsstatic StringreplacePart(String self) Strip trailing part number.static StringreplacePart(String self, String replacement) Replace trailing part number.static StringStrip trailing parenthesis.static StringreplaceTrailingBrackets(String self, String replacement) Replace trailing parenthesis.static StructuredFilerightShift(StructuredFile self, Object tag) Add a value to the A-Z folder level.static Stringstatic StringReplace numbers 1..12 with Roman numerals.static NumberRound decimal number to precision.static StringReplace all slashes.static StringsortInitial(String self) static StringConvert to sort name.static StringConvert to sort name with custom replacement pattern e.g.static StringReplace all spaces.static LocalDateTimestatic LocalDateTimestatic Filestatic Filestatic Localestatic Stringtransliterate(String self, String transformIdentifier) Apply any ICU script transliteration.static Stringstatic Stringstatic StringConvert all characters to upper case.static Stringstatic StringupperInitial(String self) Convert all initial characters to upper case.static StructuredFilexor(StructuredFile self, Object tag) Replace subtitle language suffix.static ZonedDateTime
-
Method Details
-
lower
-
lower
-
upper
-
upper
-
pad
-
pad
-
pad
-
round
-
match
-
match
-
matchAll
-
matchAll
-
replaceAll
-
removeAll
-
remove
-
removeIllegalCharacters
Strip characters that aren't allowed on Windows from the given filename. e.g. "Sissi: The Young Empress" ➔ "Sissi The Young Empress" -
replaceIllegalCharacters
Replace characters that aren't allowed on Windows from the given filename with similar-looking unicode equivalents -
clean
-
space
-
colon
-
colon
-
slash
-
upperInitial
Convert all initial characters to upper case. e.g. "The Day a new Demon was born" ➔ "The Day A New Demon Was Born" -
lowerTrail
Convert all trailing characters to lower case. e.g. "Gundam SEED" ➔ "Gundam Seed" -
sortName
-
sortName
-
sortInitial
-
initialName
Reduce first name to initials. e.g. "James Cameron" ➔ "J. Cameron" -
truncate
-
truncate
-
before
-
after
-
findMatch
-
findWordMatch
Find match in between word boundaries in case-insensitive mode. -
matchBrackets
Match brackets pattern. e.g. "The IT Crowd (UK)" ➔ "UK" -
removeBrackets
Remove brackets pattern. e.g. "The IT Crowd (UK)" ➔ "The IT Crowd" -
replaceTrailingBrackets
Strip trailing parenthesis. e.g. "The IT Crowd (UK)" ➔ "The IT Crowd" -
replaceTrailingBrackets
Replace trailing parenthesis. e.g. "The IT Crowd (UK)" ➔ "The IT Crowd [UK]" -
replacePart
Strip trailing part number. e.g. "Today Is the Day (1)" ➔ "Today Is the Day" -
replacePart
Replace trailing part number. e.g. "Today Is the Day (1)" ➔ "Today Is the Day, Part 1" -
acronym
-
roman
-
roman
-
transliterate
Apply any ICU script transliteration. e.g. "中国" ➔ "zhōng guó" -
ascii
-
ascii
-
asciiQuotes
-
isLatin
-
getGraphemeClusters
-
replace
-
replace
Apply replacement mappings. e.g. replace('Directors Cut':'DC') -
match
-
match
-
joining
-
joining
-
joiningDistinct
-
joiningDistinct
public static String joiningDistinct(Collection<?> self, String delimiter, String prefix, String suffix, Closure<?>... mapper) -
bounds
-
check
-
derive
Add values to the file name, after the file name, but before the subtitle language suffix and file extension. e.g. "Avatar (2009).mp4" ➔ "Avatar (2009) [720p].mp4" -
deriveFolder
Add a value to the movie / series folder name. e.g. Avatar (2009)/Avatar (2009) ➔ Avatar (2009) [TMDB-19995]/Avatar (2009) -
mod
Add values to the file name, after the file name, but before the subtitle language suffix and file extension. e.g. plex % {" by $director"} % {" [$vf, $vc, $ac]"} -
multiply
Add a value to the movie / series folder name. e.g. plex * " [TMDB-$id]" -
power
Add a value to the file name and the movie / series folder name. e.g. plex ** " [TMDB-$id]" -
bitwiseNegate
Nullify the Movies / TV Series folder level. e.g. ~plex -
leftShift
Add a value to the season folder level. e.g. plex invalid input: '<'invalid input: '<' { sy.bounds().joining('-', ' [', ']') } -
rightShift
Add a value to the A-Z folder level. e.g. plex >> { az } -
xor
Replace subtitle language suffix. e.g. plex ^ {'.'+lang.ISO2} -
ascii
-
getDiskSpace
-
getRoot
-
getTail
-
listPath
-
listPath
-
getRelativePathTail
-
toDate
-
toDate
-
toFile
-
toFile
-
toLocale
-
format
-
format
-
format
-
format
-
format
-
format
-
zone
-
parseDate
-
parseDate
-
parseDate
-
compareTo
-
plus
-
div
-
div
-
div
-
div
-
div
-
mod
-
plus
-
negative
-