# ==============================================================================
"""FRAMEWORDS : frame each word of a user-provided list of words"""
# ==============================================================================
__author__  = "Christophe Schlick modified by Philippe Blasi"
__version__ = "1.0"
__date__    = "2022-11-12"
__usage__   = """
User input : <word> [word ...] (where word:str without whitespaces)
App output : several framing modes for the list of words"""
# ==============================================================================
from ezCLI import *
# ------------------------------------------------------------------------------
def framewords(command:str) -> str:
  """several framing modes for the list of words by using the 'grid' function"""
  one_cell = grid([[command]])
  one_row  = grid([command.split()])
  one_col  = grid([[word] for word in command.split()])
  one_grid = grid(command.split(), size=3)
  return '\n'.join((one_cell, one_row, one_col, one_grid))
# ==============================================================================
if __name__ == '__main__':
  userloop(framewords, "Enter <word> [word ...]")
# ==============================================================================
