parameters: (self, context, arg)
docstring: Parse the title string extract only the title text removing the redundant show name
          Call example: 'mnvXpath:mevioTitle(./title/text())'
          return the title text
docstring_summary: Parse the title string extract only the title text removing the redundant show name
          Call example: 'mnvXpath:mevioTitle(./title/text())'
          return the title text
docstring_tokens: Parse the title string extract only the title text removing the redundant show name Call example : mnvXpath : mevioTitle ( . / title / text () ) return the title text
function: def mevioTitle(self, context, arg):
          '''Parse the title string extract only the title text removing the redundant show name
          Call example: 'mnvXpath:mevioTitle(./title/text())'
          return the title text
          '''
          epText = self.mevioEpisode('dummy', arg).text
          if epText:
              epText = 'Ep %s: ' % epText
          else:
              epText = ''
          seperatorStrs = [[' | ', 'before'], [': ', 'after'], [' - ', 'before']]
          for sepStr in seperatorStrs:
              if sepStr[1] == 'after':
                  index = arg[0].find(sepStr[0])
              else:
                  index = arg[0].rfind(sepStr[0])
              if index != -1:
                  if sepStr[1] == 'after':
                      return '%s%s' % (epText, arg[0][index+len(sepStr[0]):].strip())
                  else:
                      return '%s%s' % (epText, arg[0][:index].strip())
          else:
              if epText:
                  return epText
              else:
                  return arg[0].strip()
function_tokens: def mevioTitle ( self , context , arg ) : epText = self . mevioEpisode ( 'dummy' , arg ) . text if epText : epText = 'Ep %s: ' % epText else : epText = '' seperatorStrs = [ [ ' | ' , 'before' ] , [ ': ' , 'after' ] , [ ' - ' , 'before' ] ] for sepStr in seperatorStrs : if sepStr [ 1 ] == 'after' : index = arg [ 0 ] . find ( sepStr [ 0 ] ) else : index = arg [ 0 ] . rfind ( sepStr [ 0 ] ) if index != - 1 : if sepStr [ 1 ] == 'after' : return '%s%s' % ( epText , arg [ 0 ] [ index + len ( sepStr [ 0 ] ) : ] . strip ( ) ) else : return '%s%s' % ( epText , arg [ 0 ] [ : index ] . strip ( ) ) else : if epText : return epText else : return arg [ 0 ] . strip ( )