added lessons!
This commit is contained in:
41
lexicon
41
lexicon
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env lua
|
||||
|
||||
dir = os.getenv("PWD") or io.popen("cd"):read()
|
||||
|
||||
if not arg[1] then print("no argument, try again") return end
|
||||
|
||||
require "R2H2"
|
||||
@@ -14,6 +16,7 @@ require "search_list"
|
||||
require "remove_word"
|
||||
require "add_word"
|
||||
require "edit_word"
|
||||
require "lessons"
|
||||
|
||||
data_get = "words.lua"
|
||||
data_output = "words.lua"
|
||||
@@ -35,15 +38,18 @@ or arg[1] == "help"
|
||||
or arg[1] == "how"
|
||||
or arg[1] == "howdo" then
|
||||
print([[
|
||||
|
||||
|
||||
[a]ll
|
||||
- shows all words in heonian.
|
||||
|
||||
[e]dit <word_id>
|
||||
- removes the word from the lexicon
|
||||
|
||||
[h]elp
|
||||
- shows this message
|
||||
|
||||
[l]ist
|
||||
- shows all words in heonian.
|
||||
[l]esson
|
||||
- shows heonian lessons.
|
||||
|
||||
[n]ew
|
||||
- add new word to the data
|
||||
@@ -62,12 +68,13 @@ General parameters:
|
||||
]])
|
||||
return
|
||||
end
|
||||
if arg[1] == "l"
|
||||
or arg[1] == "list" then
|
||||
|
||||
if arg[1] == "a"
|
||||
or arg[1] == "all" then
|
||||
if please_help then
|
||||
print([[
|
||||
|
||||
[l]ist
|
||||
[a]ll
|
||||
- shows all words in heonian.
|
||||
|
||||
Parameters:
|
||||
@@ -79,6 +86,7 @@ Parameters:
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if arg[1] == "s"
|
||||
or arg[1] == "search" then
|
||||
if please_help then
|
||||
@@ -100,6 +108,27 @@ Parameters:
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if arg[1] == "l"
|
||||
or arg[1] == "lesson" then
|
||||
if please_help then
|
||||
print([[
|
||||
|
||||
[l]esson <lesson>
|
||||
- shows heonian lessons. if no lesson is specified, lists all the lessons.
|
||||
|
||||
Parameters:
|
||||
-h / --help (shows what does the command do)
|
||||
]])
|
||||
else
|
||||
if arg[2] then lesson(arg[2])
|
||||
else
|
||||
print("specify a lesson",table.unpack(getFormattedLessonNames(dir.."/lessons/")))
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if arg[1] == "tr"
|
||||
or arg[1] == "transcript" then
|
||||
if please_help then
|
||||
|
||||
Reference in New Issue
Block a user