added lessons!
This commit is contained in:
parent
93da415c03
commit
95c0ce5062
23
color.lua
23
color.lua
@ -25,10 +25,27 @@ COLOR = Enum {
|
|||||||
"White"
|
"White"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EFFECT = Enum {
|
||||||
|
"Normal",
|
||||||
|
"Bold",
|
||||||
|
"Dim",
|
||||||
|
"Italic",
|
||||||
|
"Underline",
|
||||||
|
"BlinkSlow",
|
||||||
|
"BlinkFast",
|
||||||
|
"Invert",
|
||||||
|
"Conceal",
|
||||||
|
"CrossedOut"
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeTextEffect(Effect, Text)
|
||||||
|
return "\027["..tostring(Effect-1).."m"..Text.."\027[0;m"
|
||||||
|
end
|
||||||
|
|
||||||
function colorText(Color, Text)
|
function colorText(Color, Text)
|
||||||
return "\027[38;5;"..tostring(Color-1).."m"..Text.."\027[0;m"
|
return "\027[38;5;"..tostring(Color-1).."m"..Text.."\027[0;m"
|
||||||
end
|
end
|
||||||
|
|
||||||
function colorTextBackground(Color, Text)
|
function colorTextBackground(Color, Text)
|
||||||
return "\027[48;5;"..tostring(Color-1).."m"..Text.."\027[0;m"
|
return "\027[48;5;"..tostring(Color-1).."m"..Text.."\027[0;m"
|
||||||
end
|
end
|
||||||
|
30
lessons.lua
Normal file
30
lessons.lua
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
-- Source https://stackoverflow.com/a/11130774
|
||||||
|
function scandir(directory)
|
||||||
|
local directory = directory or ""
|
||||||
|
local i, t, popen = 0, {}, io.popen
|
||||||
|
local pfile = popen('ls "'..directory..'"')
|
||||||
|
for filename in pfile:lines() do
|
||||||
|
i = i + 1
|
||||||
|
t[i] = filename
|
||||||
|
end
|
||||||
|
pfile:close()
|
||||||
|
return t
|
||||||
|
end
|
||||||
|
|
||||||
|
function getFormattedLessonNames(directory)
|
||||||
|
local t = scandir(directory)
|
||||||
|
for i=1, #t do
|
||||||
|
t[i] = colorTextBackground(COLOR.Black,"\n#" .. i .. " " .. colorText(COLOR.HighBlue,string.gsub(t[i],".lua","")))
|
||||||
|
end
|
||||||
|
return t
|
||||||
|
end
|
||||||
|
|
||||||
|
function lesson(number)
|
||||||
|
number = tonumber(number)
|
||||||
|
local t = scandir(dir.."/lessons/")
|
||||||
|
if t[number] then
|
||||||
|
dofile("lessons/"..t[number])
|
||||||
|
else
|
||||||
|
print("lesson not found")
|
||||||
|
end
|
||||||
|
end
|
41
lessons/nouns.lua
Normal file
41
lessons/nouns.lua
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
print([[
|
||||||
|
|
||||||
|
]] .. makeTextEffect(EFFECT.Bold,makeTextEffect(EFFECT.Italic,colorText(COLOR.LightGray,[[
|
||||||
|
NOUNS]]))) .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
MODIFYING NOUNS
|
||||||
|
Nouns can be preceeded by a modifier to alter its meaning.]]) .. makeTextEffect(EFFECT.Bold,colorText(COLOR.HighYellow,[[
|
||||||
|
|
||||||
|
|
||||||
|
Examples:]])) .. colorText(COLOR.Black,colorTextBackground(COLOR.HighYellow,[[
|
||||||
|
|
||||||
|
Fruit | shepa |
|
||||||
|
Orange | lunyaton | (modifier & noun!)
|
||||||
|
Orange fruit | lunyaton shepa |]])) .. [[
|
||||||
|
|
||||||
|
]] .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
PLURAL NOUNS
|
||||||
|
Nouns can be made plural by using the suffix "-n".
|
||||||
|
This signifies an ambiguous amount of noun, greater than one.]]) .. [[
|
||||||
|
|
||||||
|
]] .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
POSSESIVE RELATION
|
||||||
|
Nouns can be modified by another noun or pronouns using the suffix "-la".
|
||||||
|
This signifies a possesive from the first noun onto the second.
|
||||||
|
|
||||||
|
If the plural suffix is added to the possesive relation, it brings
|
||||||
|
the sense that it is common of all instances.]]) .. makeTextEffect(EFFECT.Bold,colorText(COLOR.HighYellow,[[
|
||||||
|
|
||||||
|
|
||||||
|
Examples:]])) .. colorText(COLOR.Black,colorTextBackground(COLOR.HighYellow,[[
|
||||||
|
|
||||||
|
Fruit | shepa
|
||||||
|
Fruits | shepan
|
||||||
|
Of the fruit | shepala
|
||||||
|
Of the fruits | shepanla
|
||||||
|
Of all instances of the fruit | shepalan
|
||||||
|
Of all fruits | shepanlan]])) .. [[
|
||||||
|
|
||||||
|
]])
|
56
lessons/personal_pronouns.lua
Normal file
56
lessons/personal_pronouns.lua
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
print([[
|
||||||
|
|
||||||
|
]] .. makeTextEffect(EFFECT.Bold,makeTextEffect(EFFECT.Italic,colorText(COLOR.LightGray,[[
|
||||||
|
PERSONAL PRONOUNS]]))) .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
SINGULAR FORM]]) .. [[
|
||||||
|
|
||||||
|
|
||||||
|
1st Person | re | me
|
||||||
|
2nd Person | ba | you
|
||||||
|
3rd Person | i.ma | they
|
||||||
|
]] .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
DUAL FORM
|
||||||
|
You can combine two singular forms to make for a dual form.
|
||||||
|
Dual forms refers exclusively to pairs of people.]]) .. [[
|
||||||
|
|
||||||
|
|
||||||
|
1st Person Dual | re.re | excludes you
|
||||||
|
| re.ba | includes you
|
||||||
|
| re.ma | emphasizes someone else (not present or unknown)
|
||||||
|
2nd Person Dual | ba.ba | you two
|
||||||
|
| ba.ma | emphasizes someone else (not present or unknown)
|
||||||
|
3rd Person Dual | i.ma.ma |
|
||||||
|
]] .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
OTHER PLURAL FORMS
|
||||||
|
To make other plural forms, you combine singular forms and
|
||||||
|
suffix the plural conjugation <n>.]]) .. [[
|
||||||
|
|
||||||
|
|
||||||
|
1st Person Plural | ren | ambiguous
|
||||||
|
| re.ren | emphasizes (present or known, not you)
|
||||||
|
| re.ban | emphasizes (present or known, you)
|
||||||
|
| re.man | emphasises (not present or unknown)
|
||||||
|
2nd Person Plural | ban | ambiguous
|
||||||
|
| ba.ban | emphasizes (present or known)
|
||||||
|
| ba.man | emphasizes (not present or unknown)
|
||||||
|
3rd Person Plural | i.man | ambiguous
|
||||||
|
| i.ma.man | emphasizes (not present or unknown)
|
||||||
|
Other | re.ba.man | "me, you, everyone else"
|
||||||
|
]] .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
FORMAL FORMS
|
||||||
|
Formal pronouns are used in formal situations. They are formed as following:
|
||||||
|
|
||||||
|
1. If the pronoun is singular or dual, suffixing "-l.fur".
|
||||||
|
2. If the pronoun is another plural form, suffixing -"al.fur" instead.
|
||||||
|
|
||||||
|
(This brings the sense of fully acknowledging the persons).]]) .. [[
|
||||||
|
|
||||||
|
|
||||||
|
1st Person Singular | rel.fur | formal
|
||||||
|
2nd Person Singular | bal.fur | formal
|
||||||
|
3rd Person Singular | i.mal.fur | formal
|
||||||
|
]])
|
21
lessons/syntax.lua
Normal file
21
lessons/syntax.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
print([[
|
||||||
|
|
||||||
|
]] .. makeTextEffect(EFFECT.Bold,makeTextEffect(EFFECT.Italic,colorText(COLOR.LightGray,[[
|
||||||
|
SYNTAXIS]]))) .. colorTextBackground(COLOR.Gray,[[
|
||||||
|
|
||||||
|
1. The basic sentence structure is SOV (Subject - Object - Verb)
|
||||||
|
2. Subject is followed by the marker "chu"
|
||||||
|
3. Markers follow the constituents they target.
|
||||||
|
4. Modifiers precede the constituents they target.]]) .. [[
|
||||||
|
|
||||||
|
]] .. makeTextEffect(EFFECT.Bold,colorText(COLOR.HighYellow,[[
|
||||||
|
|
||||||
|
Examples:]])) .. colorText(COLOR.Black,colorTextBackground(COLOR.HighYellow,[[
|
||||||
|
|
||||||
|
I want to kiss you | re chu ba mukanyapash yu
|
||||||
|
They laughed | baman chu wiwikome
|
||||||
|
To dream dragons | daka shamiminku
|
||||||
|
Did not know | parefakome
|
||||||
|
Orange Fruit | lunyaton shipa]])) .. [[
|
||||||
|
|
||||||
|
]])
|
41
lexicon
41
lexicon
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env lua
|
#!/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
|
if not arg[1] then print("no argument, try again") return end
|
||||||
|
|
||||||
require "R2H2"
|
require "R2H2"
|
||||||
@ -14,6 +16,7 @@ require "search_list"
|
|||||||
require "remove_word"
|
require "remove_word"
|
||||||
require "add_word"
|
require "add_word"
|
||||||
require "edit_word"
|
require "edit_word"
|
||||||
|
require "lessons"
|
||||||
|
|
||||||
data_get = "words.lua"
|
data_get = "words.lua"
|
||||||
data_output = "words.lua"
|
data_output = "words.lua"
|
||||||
@ -35,15 +38,18 @@ or arg[1] == "help"
|
|||||||
or arg[1] == "how"
|
or arg[1] == "how"
|
||||||
or arg[1] == "howdo" then
|
or arg[1] == "howdo" then
|
||||||
print([[
|
print([[
|
||||||
|
|
||||||
|
[a]ll
|
||||||
|
- shows all words in heonian.
|
||||||
|
|
||||||
[e]dit <word_id>
|
[e]dit <word_id>
|
||||||
- removes the word from the lexicon
|
- removes the word from the lexicon
|
||||||
|
|
||||||
[h]elp
|
[h]elp
|
||||||
- shows this message
|
- shows this message
|
||||||
|
|
||||||
[l]ist
|
[l]esson
|
||||||
- shows all words in heonian.
|
- shows heonian lessons.
|
||||||
|
|
||||||
[n]ew
|
[n]ew
|
||||||
- add new word to the data
|
- add new word to the data
|
||||||
@ -62,12 +68,13 @@ General parameters:
|
|||||||
]])
|
]])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if arg[1] == "l"
|
|
||||||
or arg[1] == "list" then
|
if arg[1] == "a"
|
||||||
|
or arg[1] == "all" then
|
||||||
if please_help then
|
if please_help then
|
||||||
print([[
|
print([[
|
||||||
|
|
||||||
[l]ist
|
[a]ll
|
||||||
- shows all words in heonian.
|
- shows all words in heonian.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
@ -79,6 +86,7 @@ Parameters:
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
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
|
||||||
@ -100,6 +108,27 @@ Parameters:
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
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"
|
if arg[1] == "tr"
|
||||||
or arg[1] == "transcript" then
|
or arg[1] == "transcript" then
|
||||||
if please_help then
|
if please_help then
|
||||||
|
@ -293,4 +293,5 @@ table.insert(t,{"yea.mat","area","noun","","",""})
|
|||||||
table.insert(t,{"yesh","adorable","modifier","","",""})
|
table.insert(t,{"yesh","adorable","modifier","","",""})
|
||||||
table.insert(t,{"yi.ma","year","noun","","",""})
|
table.insert(t,{"yi.ma","year","noun","","",""})
|
||||||
table.insert(t,{"yu","denotes topic, emphasis","marker","","","overwrites subject marker if they are in the same position, otherwise goes after it"})
|
table.insert(t,{"yu","denotes topic, emphasis","marker","","","overwrites subject marker if they are in the same position, otherwise goes after it"})
|
||||||
|
table.insert(t,{"po.ku","to paint, to make a color","verb","","",""})
|
||||||
return t
|
return t
|
||||||
|
Loading…
Reference in New Issue
Block a user