def ProduceURLs(self, consumer):
    """ Produces URLs from our data source, hands them in to the consumer. """

    # Open the file
    (frame, file) = OpenFileForRead(self._path, 'URLLIST')
    if not file:
      return

    # Iterate lines
    linenum = 0
    for line in file.readlines():
      linenum = linenum + 1

      # Strip comments and empty lines
      if self._encoding:
        line = encoder.WidenText(line, self._encoding)
      line = line.strip()
      if (not line) or line[0] == '#':
        continue
      
      # Split the line on tabs
      url = NewsURL()
      cols = line.split('\t')
      for i in range(0,len(cols)):
        cols[i] = cols[i].strip()

      for i in range(0,len(cols)):
        if cols[i]:
          attr_value = cols[i]
	  if i < len(self._tag_order):
            attr_name = self._tag_order[i]
            try:
              url.TrySetAttribute(attr_name, attr_value)
            except __HOLE__:
              output.Warn('Line %d: Unable to parse attribute: %s' %
                        (linenum, cols[i]))

      # Pass it on
      consumer(url, False)

    file.close()
    if frame:
      frame.close()
  #end def ProduceURLs
#end class InputNewsURLList
dataset/ETHPy150Open benoitc/restkit/doc/sitemap_gen.py/InputNewsURLList.ProduceURLs