code: def action_listlocal(all_details=True):
      " select a file from the local repo "
  
      options = get_localontologies()
  
      counter = 1
      # printDebug("------------------", 'comment')
      if not options:
          printDebug(
              "Your local library is empty. Use 'ontospy lib --bootstrap' to add some ontologies to it."
          )
          return
      else:
          if all_details:
              _print_table_ontologies()
          else:
              _print2cols_ontologies()
  
          while True:
              printDebug(
                  "------------------\nSelect a model by typing its number: (enter=quit)",
                  "important")
              var = input()
              if var == "" or var == "q":
                  return None
              else:
                  try:
                      _id = int(var)
                      ontouri = options[_id - 1]
                      # printDebug("\nYou selected:", "comment")
                      printDebug(
                          "---------\nYou selected: " + ontouri + "\n---------",
                          "green")
                      return ontouri
                  except:
                      printDebug("Please enter a valid option.", "comment")
                      continuf action_listlocal(all_details=True):
      " select a file from the local repo "
  
      options = get_localontologies()
  
      counter = 1
      # printDebug("------------------", 'comment')
      if not options:
          printDebug(
              "Your local library is empty. Use 'ontospy lib --bootstrap' to add some ontologies to it."
          )
          return
      else:
          if all_details:
              _print_table_ontologies()
          else:
              _print2cols_ontologies()
  
          while True:
              printDebug(
                  "------------------\nSelect a model by typing its number: (enter=quit)",
                  "important")
              var = input()
              if var == "" or var == "q":
                  return None
              else:
                  try:
                      _id = int(var)
                      ontouri = options[_id - 1]
                      # printDebug("\nYou selected:", "comment")
                      printDebug(
                          "---------\nYou selected: " + ontouri + "\n---------",
                          "green")
                      return ontouri
                  except:
                      printDebug("Please enter a valid option.", "comment")
                      continue
docs: select a file from the local repo