improved help messages

This commit is contained in:
UndeadMaelys 2022-03-22 20:19:27 +01:00
parent f044bff0a9
commit f181c7b935

58
lexicon
View File

@ -27,19 +27,40 @@ if arg[1] == "h"
or arg[1] == "help" or arg[1] == "help"
or arg[1] == "how" or arg[1] == "how"
or arg[1] == "howdo" then or arg[1] == "howdo" then
print([[all print([[
shows all words in heonian.
search <query> [a]ll
searches all words and shows only those that return to string.find() - shows all words in heonian.
transcript <word>
transcripts the word to heonian script [h]elp
]]) - shows this message
[s]earch <query>
- searches all words and shows only those that return to string.find()
[tr]anscript <word>
- transcripts the word to heonian script
Parameters:
-h / --help (shows what does the command do)
-a / --all (shows more info on the word, if any)
-v / --verbose (shows the transcription process)
-c / --copy (copies transcription to keyboard)
]])
return return
end end
if arg[1] == "a" if arg[1] == "a"
or arg[1] == "all" then or arg[1] == "all" then
if please_help then if please_help then
print("all\n\tshows all words in heonian") print([[
[a]ll
- shows all words in heonian.
Parameters:
-h / --help (shows what does the command do)
-a / --all (shows more info on the word, if any)
]])
else else
showList() showList()
end end
@ -48,7 +69,15 @@ end
if arg[1] == "s" if arg[1] == "s"
or arg[1] == "search" then or arg[1] == "search" then
if please_help then if please_help then
print("search <query>\n\tsearches all words and shows only those that return to string.find()") print([[
[s]earch <query>
- searches all words and shows only those that return to string.find()
Parameters:
-h / --help (shows what does the command do)
-a / --all (shows more info on the word, if any)
]])
else else
if arg[2] then searchList(arg[2]) if arg[2] then searchList(arg[2])
else print("no query to search") end else print("no query to search") end
@ -58,7 +87,16 @@ end
if arg[1] == "tr" if arg[1] == "tr"
or arg[1] == "transcript" then or arg[1] == "transcript" then
if please_help then if please_help then
print("transcript <word>\n\ttranscripts the word to heonian script") print([[
[tr]anscript <word>
- transcripts the word to heonian script
Parameters:
-h / --help (shows what does the command do)
-v / --verbose (shows the transcription process)
-c / --copy (copies transcription to keyboard)
]])
else else
if arg[2] then print(convertToHeonian(arg[2])) if arg[2] then print(convertToHeonian(arg[2]))
else print("no string to transcript") end else print("no string to transcript") end