plugged in r2h2

This commit is contained in:
UndeadMaelys
2022-05-04 21:06:53 +02:00
parent 2b3b24a15e
commit 5035a58df2
6 changed files with 359 additions and 146 deletions

View File

@@ -1,6 +1,7 @@
require "R2H2"
function strip_symbols(str)
local symbol_table = " ~()!?:></.\t"
local symbol_table = "'~()!?:></.\t"
for i=1, #symbol_table do
while string.find(str, "%"..string.sub(symbol_table,i,i)) do
str = string.gsub(str, "%"..string.sub(symbol_table,i,i),"")
@@ -72,13 +73,16 @@ while p ~= nil do
convo_end()
elseif string.sub(text,p+1,p+1) == "\t" then
-- its tabbed so its spoken?
convo_start()
apply_html("html/convo/text/start.html")
convo_start(
)
apply_html("html/convo/text/start_roman.html")
print(string.sub(text,p+2,np-1))
content = content .. " " .. reverse_verbs(strip_symbols(string.sub(text,p+2,np-1)))
--content = content .. " " .. reverse_verbs(strip_symbols(string.sub(text,p+2,np-1)))
--print("\n"..reverse_verbs(strip_symbols(string.sub(text,p+2,np-1))))
apply_html("html/convo/text/end.html")
apply_html("html/convo/text/start.html")
print("\n"..reverse_verbs(strip_symbols(string.sub(text,p+2,np-1))))
-- heonian
apply_html("html/convo/text/start_heonian.html")
print(convertToHeonian(strip_symbols(string.sub(text,p+2,np-1))))
apply_html("html/convo/text/end.html")
else
-- new user name