Skip to content

Instantly share code, notes, and snippets.

@oswaldoacauan
Created September 2, 2013 12:08
Show Gist options
  • Save oswaldoacauan/6412190 to your computer and use it in GitHub Desktop.
Save oswaldoacauan/6412190 to your computer and use it in GitHub Desktop.
FileBot film/series pattern
// Film pattern, if you need put your folder path
// Ex: /The Matrix Collection/[1999] The Matrix/The.Matrix.1999.720p.x264
{collection}/[{y}] {n.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().upperInitial().replacePart(' Part $1')}/{n.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().upperInitial().space('.')}.{y}.{vf}.{vc}
// Show pattern, if you need put your folder path
// Ex: /Seinfeld/Season 06/Seinfeld.6x01.The Chaperone.480p.RealVideo
{n.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().upperInitial()}/{'Season '+s.pad(2)}/{n.replaceTrailingBrackets()}.{s+'x'}{e.pad(2)}.{t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'")
.lowerTrail().upperInitial().replacePart(' Part $1')}.{vf}.{vc}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment