def container():
 rebulk = Rebulk().regex_defaults(flags=re.IGNORECASE).string_defaults(ignore_case=True)
 rebulk.defaults(name='container', formatter=(lambda value: value[1:]), tags=['extension'], conflict_solver=(lambda match, other: (other if ((other.name in ['format', 'video_codec']) or ((other.name == 'container') and ('extension' not in other.tags))) else '__default__')))
 subtitles = ['srt', 'idx', 'sub', 'ssa', 'ass']
 info = ['nfo']
 videos = ['3g2', '3gp', '3gp2', 'asf', 'avi', 'divx', 'flv', 'm4v', 'mk2', 'mka', 'mkv', 'mov', 'mp4', 'mp4a', 'mpeg', 'mpg', 'ogg', 'ogm', 'ogv', 'qt', 'ra', 'ram', 'rm', 'ts', 'wav', 'webm', 'wma', 'wmv', 'iso', 'vob']
 torrent = ['torrent']
 rebulk.regex((('\\.' + build_or_pattern(subtitles)) + '$'), exts=subtitles, tags=['extension', 'subtitle'])
 rebulk.regex((('\\.' + build_or_pattern(info)) + '$'), exts=info, tags=['extension', 'info'])
 rebulk.regex((('\\.' + build_or_pattern(videos)) + '$'), exts=videos, tags=['extension', 'video'])
 rebulk.regex((('\\.' + build_or_pattern(torrent)) + '$'), exts=torrent, tags=['extension', 'torrent'])
 rebulk.defaults(name='container', validator=seps_surround, formatter=(lambda s: s.upper()), conflict_solver=(lambda match, other: (match if ((other.name in ['format', 'video_codec']) or ((other.name == 'container') and ('extension' in other.tags))) else '__default__')))
 rebulk.string(tags=['subtitle'], *[sub for sub in subtitles if (sub not in ['sub'])])
 rebulk.string(tags=['video'], *videos)
 rebulk.string(tags=['torrent'], *torrent)
 return rebulk

def container ( ) : rebulk = Rebulk ( ) . regex_defaults ( flags = re . IGNORECASE ) . string_defaults ( ignore_case = True ) rebulk . defaults ( name = 'container' , formatter = ( lambda value : value [ 1 : ] ) , tags = [ 'extension' ] , conflict_solver = ( lambda match , other : ( other if ( ( other . name in [ 'format' , 'video_codec' ] ) or ( ( other . name == 'container' ) and ( 'extension' not in other . tags ) ) ) else '__default__' ) ) ) subtitles = [ 'srt' , 'idx' , 'sub' , 'ssa' , 'ass' ] info = [ 'nfo' ] videos = [ '3g2' , '3gp' , '3gp2' , 'asf' , 'avi' , 'divx' , 'flv' , 'm4v' , 'mk2' , 'mka' , 'mkv' , 'mov' , 'mp4' , 'mp4a' , 'mpeg' , 'mpg' , 'ogg' , 'ogm' , 'ogv' , 'qt' , 'ra' , 'ram' , 'rm' , 'ts' , 'wav' , 'webm' , 'wma' , 'wmv' , 'iso' , 'vob' ] torrent = [ 'torrent' ] rebulk . regex ( ( ( '\\.' + build_or_pattern ( subtitles ) ) + '$' ) , exts = subtitles , tags = [ 'extension' , 'subtitle' ] ) rebulk . regex ( ( ( '\\.' + build_or_pattern ( info ) ) + '$' ) , exts = info , tags = [ 'extension' , 'info' ] ) rebulk . regex ( ( ( '\\.' + build_or_pattern ( videos ) ) + '$' ) , exts = videos , tags = [ 'extension' , 'video' ] ) rebulk . regex ( ( ( '\\.' + build_or_pattern ( torrent ) ) + '$' ) , exts = torrent , tags = [ 'extension' , 'torrent' ] ) rebulk . defaults ( name = 'container' , validator = seps_surround , formatter = ( lambda s : s . upper ( ) ) , conflict_solver = ( lambda match , other : ( match if ( ( other . name in [ 'format' , 'video_codec' ] ) or ( ( other . name == 'container' ) and ( 'extension' in other . tags ) ) ) else '__default__' ) ) ) rebulk . string ( tags = [ 'subtitle' ] , * [ sub for sub in subtitles if ( sub not in [ 'sub' ] ) ] ) rebulk . string ( tags = [ 'video' ] , * videos ) rebulk . string ( tags = [ 'torrent' ] , * torrent ) return rebulk
require an openvz container .