code: function replaceVariableTokens(pattern, next) {
          var filenames = config.timemarks.map(function(t, i) {
            return pattern
              .replace(/%s/g, utils.timemarkToSeconds(t))
              .replace(/%(0*)i/g, function(match, padding) {
                var idx = '' + (i + 1);
                return padding.substr(0, Math.max(0, padding.length + 1 - idx.length)) + idx;
              });
          });
  
          self.emit('filenames', filenames);
          next(null, filenames);
        }
docs: Replace variable tokens in pattern (%s, %i) and generate filename list