docs: def reference_id_from_filename(filename):
      """\
      Extracts the reference identifier from the provided filename.
      """
      reference_id = os.path.basename(filename)
      if reference_id.rfind('.htm') > 0:
          reference_id = reference_id[:reference_id.rfind('.')]
      #TODO: else: raise ValueError('bla bla')?
      return reference_id