Skip to content

CLI Framework is a basic command line interface framework containing methods for layout.

Notifications You must be signed in to change notification settings

DannySantos/cli_framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

CLI FRAMEWORK

CLI Framework is a basic command line interface framework containing methods for layout.

instant_gets()
  Take one key as feedback without pressing Enter
  ----- @menu_choice = instant_gets

indent()
  Indent content x number of spaces
  Pass in your line of content as the first argument
  Optional: pass in number of space to indent by
  Change 43 to something else to change default
  ----- indent("Main Menu", 20)

blank_indent()
  Indent line without line break
  Useful in conjunction with instant_gets (needs to be 1 space more than regular indent for this)
  ----- indent("Main Menu", 20)
  ----- blanck_indent(21)
  ----- instant_gets
  
br()  
  Line break
  Optional: pass in number of line breaks
  ----- indent("Main Menu", 20)
  ----- br(2)
  ----- blanck_indent(21)
  ----- instant_gets
  
hr()
  Horizontal rule
  Optional: pass in "=" for double line instead of single
  ----- hr(=)
  ----- indent("Main Menu", 20)
  ----- br(2)
  ----- blanck_indent(21)
  ----- instant_gets
  
invalid_command()  
  Invalid command warning
  Uses br and indent to format
  Useful for menus in conjunction with case statements/until loops 
  ----- until menu_choice = "q"
  -----   case menu_choice
  -----   when "1"
  -----     some_action
  -----   when "2"
  -----     some_other_action
  -----   when "q"
  -----     menu_choice
  -----   else
  -----     invalid_command
  -----   end
  ----- end

About

CLI Framework is a basic command line interface framework containing methods for layout.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages