parameters: (in_file, index, base_uri=None)
docstring: Process .html file
          in_file: path to file
          :type in_file: str
          index:
          :type index: dics(str, set(tuple(str, str)))
          :param base_uri: base uri for links in index
          :type base_uri: str|None
  
        :raise: RuntimeError in case of processing error
docstring_summary: Process .html file
          in_file: path to file
          :type in_file: str
          index:
          :type index: dics(str, set(tuple(str, str)))
          :param base_uri: base uri for links in index
          :type base_uri: str|None
docstring_tokens: Process . html file in_file : path to file : type in_file : str index : : type index : dics ( str set ( tuple ( str str ))) : param base_uri : base uri for links in index : type base_uri : str|None
function: def process_file(in_file, index, base_uri=None):
      """
        Process .html file
          in_file: path to file
          :type in_file: str
          index:
          :type index: dics(str, set(tuple(str, str)))
          :param base_uri: base uri for links in index
          :type base_uri: str|None
  
        :raise: RuntimeError in case of processing error
      """
      if not os.path.isfile(in_file):
          raise RuntimeError("File not found: {}".format(in_file))
  
      _LOGGER.debug("Processing file <{}> with base <{}>"
                    .format(in_file, base_uri))
  
      name = os.path.basename(in_file)
  
      if base_uri:
          name = os.path.join(base_uri, name)
  
      root = etree.parse(in_file, etree.HTMLParser())
      title = root.findtext("head/title") or ""
  
      for param in root.iterfind(".//object[@classid='{}']/param"
                                 .format(_KEYWORD_CLSID)):
          if param.get("name") == "Keyword":
              value = param.get("value", "")
              if not value:
                  _LOGGER.warning("Skipping entry with empty keyword in {}".
                                  format(name))
                  continue
  
              if value not in index:
                  index[value] = set()
  
              index[value].add((title, name))
function_tokens: def process_file ( in_file , index , base_uri = None ) : if not os . path . isfile ( in_file ) : raise RuntimeError ( "File not found: {}" . format ( in_file ) ) _LOGGER . debug ( "Processing file <{}> with base <{}>" . format ( in_file , base_uri ) ) name = os . path . basename ( in_file ) if base_uri : name = os . path . join ( base_uri , name ) root = etree . parse ( in_file , etree . HTMLParser ( ) ) title = root . findtext ( "head/title" ) or "" for param in root . iterfind ( ".//object[@classid='{}']/param" . format ( _KEYWORD_CLSID ) ) : if param . get ( "name" ) == "Keyword" : value = param . get ( "value" , "" ) if not value : _LOGGER . warning ( "Skipping entry with empty keyword in {}" . format ( name ) ) continue if value not in index : index [ value ] = set ( ) index [ value ] . add ( ( title , name ) )