DKL9 GitList
Repositories
DKL9 home
memoire
Code
Commits
Branches
Tags
Search
Tree:
7e9857e
Branches
Tags
master
memoire
main.lua
Set up skeleton of main interface
John Smith
commited
7e9857e
at 2021-326 23:26:52
main.lua
Blame
History
Raw
--[[ the main user interface for memoire ]] --[[ check action based on first command-line argument; if nothing valid given, default to help ]] local action = nil if arg[1] then local fc = arg[1]:sub(1, 1) if fc == "a" or fc == "h" or fc == "r" or fc == "s" then action = fc else action = "h" end else action = "h" end --[[ repository file is hardcoded for now; TODO: should be controllable by user in the future ]] local deckfname = "example.rec" --[[ do requested action ]] -- Add card(s) if action == "a" then -- TODO -- Help elseif action == "h" then io.write(string.format( "Usage: %s ACTION\n\nACTION may be one of\n (a)dd card\n (h)elp\n (r)eview session\n (s)tatistics\n", arg[0] )) -- Review session elseif action == "r" then -- TODO -- Statistics elseif action == "s" then -- TODO else io.write "unreachable" end