<: words work

This commit is contained in:
UndeadMaelys 2022-05-05 13:16:22 +02:00
parent e40bdc2a39
commit afca6cb0c9
10 changed files with 1013 additions and 3 deletions

View File

@ -1,5 +1,29 @@
require "r2h2_modified"
words = dofile("heonian-content/words.lua")
function cell_builder(...)
arg = {...}
for i=1, #arg do
apply_html("html/words/definition/cell_start.html")
apply(arg[i])
apply_html("html/words/definition/cell_end.html")
end
end
function print_word_stuff(word)
apply_html("html/words/definition/start.html")
local exit = false
for _, v in pairs(words) do
if strip_symbols(v[1]) == strip_spaces(word) then
cell_builder(mod_convertToHeonian(word),v[1],v[3],v[2])
exit = true
end
end
if not exit then cell_builder(mod_convertToHeonian(word),word, "???","???") end
apply_html("html/words/definition/end.html")
end
function add_word(str)
local add = true
for _, v in pairs(word_list) do
@ -12,6 +36,12 @@ function add_word(str)
end
end
function strip_spaces(str)
while string.find(str, "% ") do
str = string.gsub(str, " ","")
end
return str
end
function strip_symbols(str)
local symbol_table = "'~()!?:></.,\t"
@ -234,7 +264,10 @@ while p ~= nil do
end
end
apply_html("html/convo/end.html")
convo_end()
-- 3.5 separation
apply_html("html/spacer.html")
-- fourth lets make word lists
-- process contents
@ -249,9 +282,14 @@ while string.find(content, " ") do
--print(string.find(content, " "))
end
-- lets print the words
apply_html("html/spacer.html")
apply_html("html/words/start.html")
for i=1, #word_list do
--print(word_list[i])
print_word_stuff(word_list[i])
end
apply_html("html/words/end.html")
-- pop up
apply_html("html/pop_up.html")
-- lets end the html
apply_html("html/end.html")

10
html/pop_up.html Normal file
View File

@ -0,0 +1,10 @@
<div id="popup-container" style="opacity: 0; pointer-events: none;">
<div id="popup">
<h1>um</h1>
<div>
heonian: <span id="popup-heo"></span><br>
type: <span id="popup-type"></span>
</div>
<p id="popup-meaning"></p>
</div>
</div>

1
html/spacer.html Normal file
View File

@ -0,0 +1 @@
<div class="spacer"></div>

View File

@ -0,0 +1 @@
</th>

View File

@ -0,0 +1 @@
<th>

View File

@ -0,0 +1 @@
</tr>

View File

@ -0,0 +1 @@
<tr>

3
html/words/end.html Normal file
View File

@ -0,0 +1,3 @@
</tbody>
</table>
</div>

7
html/words/start.html Normal file
View File

@ -0,0 +1,7 @@
<div class="words">
<p>words used:</p>
<noscript>
(psst, turn on javascript, and you can click words for explanations!)<br><br>
</noscript>
<table>
<tbody>

947
test.html
View File

@ -554,6 +554,953 @@ relfur chu arilaen dedaka'nya.
<p class="convo-heonian">
   
</p>
</div>
</div>
<div class="spacer"></div>
<div class="spacer"></div>
<div class="words">
<p>words used:</p>
<noscript>
(psst, turn on javascript, and you can click words for explanations!)<br><br>
</noscript>
<table>
<tbody>
<tr>
<th>
</th>
<th>
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
nyan.pash
</th>
<th>
expression
</th>
<th>
hello!, good morning!
</th>
</tr>
<tr>
<th>

</th>
<th>
balfur
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>
</th>
<th>
yu
</th>
<th>
marker
</th>
<th>
denotes topic, emphasis
</th>
</tr>
<tr>
<th>
</th>
<th>
e
</th>
<th>
pronoun
</th>
<th>
which
</th>
</tr>
<tr>
<th>
</th>
<th>
she
</th>
<th>
noun
</th>
<th>
food
</th>
</tr>
<tr>
<th>

</th>
<th>
poliku
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
dre
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>
</th>
<th>
re
</th>
<th>
pronoun
</th>
<th>
i
</th>
</tr>
<tr>
<th>
</th>
<th>
chu
</th>
<th>
marker
</th>
<th>
denotes the subject
</th>
</tr>
<tr>
<th>

</th>
<th>
meshu
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
ponyash
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
aa
</th>
<th>
expression, modifier
</th>
<th>
correct, very
</th>
</tr>
<tr>
<th>

</th>
<th>
an.ko
</th>
<th>
expression
</th>
<th>
thank you
</th>
</tr>
<tr>
<th>
</th>
<th>
ba
</th>
<th>
pronoun
</th>
<th>
you
</th>
</tr>
<tr>
<th>

</th>
<th>
wa.wo.te
</th>
<th>
noun
</th>
<th>
rain
</th>
</tr>
<tr>
<th>
</th>
<th>
to
</th>
<th>
marker
</th>
<th>
and, along (in physical presence)
</th>
</tr>
<tr>
<th>
</th>
<th>
pu
</th>
<th>
noun
</th>
<th>
sun
</th>
</tr>
<tr>
<th>

</th>
<th>
mipura
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
lilinya
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
uwu
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
relfur
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
mya
</th>
<th>
marker
</th>
<th>
preceeds subordinate clause
</th>
</tr>
<tr>
<th>

</th>
<th>
lup
</th>
<th>
modifier
</th>
<th>
slow
</th>
</tr>
<tr>
<th>

</th>
<th>
a.pat.ku
</th>
<th>
verb
</th>
<th>
to lie (on a surface)
</th>
</tr>
<tr>
<th>
</th>
<th>
ku
</th>
<th>
verb
</th>
<th>
to be
</th>
</tr>
<tr>
<th>

</th>
<th>
pon.me
</th>
<th>
marker
</th>
<th>
because
</th>
</tr>
<tr>
<th>

</th>
<th>
pee.ka.ku
</th>
<th>
verb
</th>
<th>
to think, to become aware
</th>
</tr>
<tr>
<th>

</th>
<th>
mishipash
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
ton
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
relfurla
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
me.lu.ton
</th>
<th>
noun
</th>
<th>
red
</th>
</tr>
<tr>
<th>

</th>
<th>
balfurla
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
dra
</th>
<th>
marker
</th>
<th>
indicates question
</th>
</tr>
<tr>
<th>

</th>
<th>
esh.dre
</th>
<th>
noun
</th>
<th>
moon, secret
</th>
</tr>
<tr>
<th>

</th>
<th>
pu.ro.ton
</th>
<th>
modifier
</th>
<th>
yellow
</th>
</tr>
<tr>
<th>

</th>
<th>
shi.ro.bae.pu
</th>
<th>
noun
</th>
<th>
night sky
</th>
</tr>
<tr>
<th>

</th>
<th>
po.nya
</th>
<th>
modifier
</th>
<th>
good
</th>
</tr>
<tr>
<th>

</th>
<th>
be.nyui
</th>
<th>
noun
</th>
<th>
bunny
</th>
</tr>
<tr>
<th>

</th>
<th>
rerenlafura
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
mi.mi.ku
</th>
<th>
verb
</th>
<th>
to see
</th>
</tr>
<tr>
<th>

</th>
<th>
oo
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
pa.re.ku
</th>
<th>
verb
</th>
<th>
to know, to learn
</th>
</tr>
<tr>
<th>

</th>
<th>
babanlafura
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
nao.mi.min.ku
</th>
<th>
verb
</th>
<th>
to dream
</th>
</tr>
<tr>
<th>

</th>
<th>
u.u
</th>
<th>
expression
</th>
<th>
no
</th>
</tr>
<tr>
<th>

</th>
<th>
mimifuku
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
gu.ra.ton
</th>
<th>
modifier
</th>
<th>
green
</th>
</tr>
<tr>
<th>

</th>
<th>
i.shi
</th>
<th>
noun
</th>
<th>
beauty
</th>
</tr>
<tr>
<th>

</th>
<th>
arilaen
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
en
</th>
<th>
noun
</th>
<th>
being
</th>
</tr>
<tr>
<th>

</th>
<th>
fadre
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
yesh
</th>
<th>
modifier
</th>
<th>
adorable
</th>
</tr>
<tr>
<th>

</th>
<th>
de.da.ku
</th>
<th>
verb
</th>
<th>
to hate
</th>
</tr>
<tr>
<th>

</th>
<th>
imanla
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
ri.la
</th>
<th>
noun
</th>
<th>
horns
</th>
</tr>
<tr>
<th>

</th>
<th>
shash.ku
</th>
<th>
verb
</th>
<th>
to split, to cut, to divide
</th>
</tr>
<tr>
<th>

</th>
<th>
shoo
</th>
<th>
noun
</th>
<th>
essence, core, heart
</th>
</tr>
<tr>
<th>

</th>
<th>
i.ke
</th>
<th>
modifier
</th>
<th>
bad
</th>
</tr>
<tr>
<th>

</th>
<th>
pi.ke.she
</th>
<th>
modifier
</th>
<th>
rotten
</th>
</tr>
<tr>
<th>

</th>
<th>
arilaenlan
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
lu.ku
</th>
<th>
verb
</th>
<th>
to die
</th>
</tr>
<tr>
<th>

</th>
<th>
arilaenla
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
fuku
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
<tr>
<th>

</th>
<th>
ga.o
</th>
<th>
pronoun
</th>
<th>
that
</th>
</tr>
<tr>
<th>

</th>
<th>
fayu
</th>
<th>
???
</th>
<th>
???
</th>
</tr>
</tbody>
</table>
</div>
<div id="popup-container" style="opacity: 0; pointer-events: none;">
<div id="popup">
<h1>um</h1>
<div>
heonian: <span id="popup-heo"></span><br>
type: <span id="popup-type"></span>
</div>
<p id="popup-meaning"></p>
</div>
</div>
</main>
<script src="main.js"></script>