commit bb863c6786fef8a2ce76ede09c7ec96e5c5e3a51 Author: UndeadMaelys Date: Wed May 4 20:02:10 2022 +0200 upload diff --git a/base.html b/base.html new file mode 100644 index 0000000..35d9999 --- /dev/null +++ b/base.html @@ -0,0 +1,70 @@ + + + + + + avg convo + + + + + +
+
+
+
+ ariri + ariri + 2022/05/04 +
+

this is some text +

+
+
+

here are some notes about something!

+
+
+
+
+
+ ariri + remrem + 2022/05/04 +
+

+ ariri is really cute actually +

+
+
+
+
+

words used:

+ + + + + + + + + + + + + + + + + + + + +
heonianromanizationtypemeaning
aririobjective facta cute cat
 + lilikuverbto like (but twice, for emphasis)
+
+
+ + + \ No newline at end of file diff --git a/converter.lua b/converter.lua new file mode 100644 index 0000000..840c1da --- /dev/null +++ b/converter.lua @@ -0,0 +1,87 @@ +function apply_html(path) + -- copy + local file = io.open(path,"r") + local html = file:read("*all") + + file:close() + -- paste + print(html) +end + +function convo_start(color) + if not convo then + if color then + apply_html("html/convo/start_green.html") + else + apply_html("html/convo/start_gray.html") + end + convo = true + end +end + +function convo_end() + if convo then + apply_html("html/convo/end.html") + convo = false + end +end + +-- lets make the html +apply_html("html/start.html") +-- get text +local file = io.open("input.txt","r") +local text = file:read("*all") +file:close() + +-- first analyze text +-- (this is the fun part) +local p = 0 +local s = 0 +local convo = false +local green = true +while p ~= nil do + s = s + 1 + local np = string.find(text,"\n",p+1) + if np and p - np ~= 1 then + if p then + if string.sub(text,p+1,p+1) == "\n" + or string.sub(text,p+1,p+1) == "/" then + -- end of new bubble + 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") + print(string.sub(text,p+2,np-1)) + apply_html("html/convo/text/end.html") + else + -- new user name + convo_end() + if green then + green = false + else + green = true + end + convo_start(green) + apply_html("html/convo/header/start.html") + apply_html("html/convo/header/name/start.html") + print(string.sub(text,p+1,np-1)) + apply_html("html/convo/header/name/end.html") + apply_html("html/convo/header/end.html") + --print(s,string.sub(text,p+1,np)) + end + else + --print(s,string.sub(text,p+1)) + end + p = string.find(text,"\n",p+1) + else + break + end +end + +apply_html("html/convo/end.html") + +-- fourth lets make word lists + +-- lets end the html +apply_html("html/end.html") diff --git a/html/convo/end.html b/html/convo/end.html new file mode 100644 index 0000000..49d41e5 --- /dev/null +++ b/html/convo/end.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/html/convo/header/date/end.html b/html/convo/header/date/end.html new file mode 100644 index 0000000..894bd90 --- /dev/null +++ b/html/convo/header/date/end.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/html/convo/header/date/start.html b/html/convo/header/date/start.html new file mode 100644 index 0000000..e57b0e2 --- /dev/null +++ b/html/convo/header/date/start.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/html/convo/header/end.html b/html/convo/header/end.html new file mode 100644 index 0000000..7f5eaa3 --- /dev/null +++ b/html/convo/header/end.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/html/convo/header/image.html b/html/convo/header/image.html new file mode 100644 index 0000000..eb918c8 --- /dev/null +++ b/html/convo/header/image.html @@ -0,0 +1 @@ +

\ No newline at end of file diff --git a/html/convo/header/name/end.html b/html/convo/header/name/end.html new file mode 100644 index 0000000..894bd90 --- /dev/null +++ b/html/convo/header/name/end.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/html/convo/header/name/start.html b/html/convo/header/name/start.html new file mode 100644 index 0000000..19dd4ef --- /dev/null +++ b/html/convo/header/name/start.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/html/convo/header/start.html b/html/convo/header/start.html new file mode 100644 index 0000000..eb81ef7 --- /dev/null +++ b/html/convo/header/start.html @@ -0,0 +1 @@ +

\ No newline at end of file diff --git a/html/convo/start_gray.html b/html/convo/start_gray.html new file mode 100644 index 0000000..2253463 --- /dev/null +++ b/html/convo/start_gray.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/html/convo/start_green.html b/html/convo/start_green.html new file mode 100644 index 0000000..1586a16 --- /dev/null +++ b/html/convo/start_green.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/html/convo/text/end.html b/html/convo/text/end.html new file mode 100644 index 0000000..353ac76 --- /dev/null +++ b/html/convo/text/end.html @@ -0,0 +1 @@ +

\ No newline at end of file diff --git a/html/convo/text/start.html b/html/convo/text/start.html new file mode 100644 index 0000000..eb918c8 --- /dev/null +++ b/html/convo/text/start.html @@ -0,0 +1 @@ +

\ No newline at end of file diff --git a/html/end.html b/html/end.html new file mode 100644 index 0000000..3c3e9b8 --- /dev/null +++ b/html/end.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/html/start.html b/html/start.html new file mode 100644 index 0000000..753f39d --- /dev/null +++ b/html/start.html @@ -0,0 +1,9 @@ + + + + + + avg convo + + + diff --git a/input.txt b/input.txt new file mode 100644 index 0000000..abf9f94 --- /dev/null +++ b/input.txt @@ -0,0 +1,69 @@ +LU'NYA + nyan’pash! balfur yu e she polika'nya dre? + +ESH'NYUI + re chu meshu yu polika'nya + (po'nyash!!!) + +LU'NYA + aa, anko! + (po'nyash!) + +ESH'NYUI + ba yu e wawote to pu mipura lili'nya dre? + uwu + +LU'NYA + relfur chu mya pu yu mya relfur lup apatka’nya faka’nya’pash ponme mya wawote polika’nya peekaka’nya’pash. + +ESH'NYUI + mi’shi’pash~ + balfur yu e ton polika’nya dre? + +LU'NYA + mishi’pash!! + relfurla mya ton polika'nya yu meluton ka’nya! + balfurla yu dra? + +ESH'NYUI + relfurla yu esh’dre mya ton polika’nya yu puroton ka’nya~ + relfur yu shi’ro’bae’pu yu pon’ya ka’nya~ + +LU'NYA + puroton yu ponya ton ka’nya! + +ESH'NYUI + be’nyui-rerenlafura yu meluton mimifaka’nya… + relfur yu meluton mimiku'pash~ + +LU'NYA + ’o, relfur chu parefaka’nya… + be’nyui-babanlafura yu meluton naomiminku dre? + +ESH'NYUI + uu, relfur yu naomiminku mya mimifuku mya ton ka’nya... + relfur yu guraton to meluton mimifuku.. + relfur yu ton mimiku’pash~ + +LU'NYA + ishi-balfur yu mishi'pash! + balfur chu mya arilaen yu en ka’nya peekaka’nya fa'dre? + +ESH'NYUI + yesh-balfur yu mishi'pash~ + (>///////////////<) + relfur yu ari’laen parefaka’nya, balfur yu pareka’nya dra? + +LU'NYA + relfur chu arilaen dedaka’nya. + imanla rila shashka’nya’pash. + imanla shoo chu ike to pikeshe ka’nya. +/ + relfur chu arilaenlan luka’nya’pash. + +ESH'NYUI + arilaenla shoo chu pikeshe fuka’nya’bash dra? + +LU'NYA + gao chu relfur yu fayu kan’ya. + relfur chu arilaen dedaka’nya. diff --git a/input_example.txt b/input_example.txt new file mode 100644 index 0000000..5178319 --- /dev/null +++ b/input_example.txt @@ -0,0 +1,71 @@ +LU'NYA + nyan’pash! balfur yu e she polika'nya dre? + +ESH'NYUI + re chu meshu yu polika'nya + (po'nyash!!!) + +LU'NYA + aa, anko! + (po'nyash!) + +ESH'NYUI + ba yu e wawote to pu mipura lili'nya dre? + uwu + +LU'NYA + relfur chu mya pu yu mya relfur lup apatka’nya faka’nya’pash ponme mya wawote polika’nya peekaka’nya’pash. + +ESH'NYUI + mi’shi’pash~ + balfur yu e ton polika’nya dre? + +LU'NYA + mishi’pash!! + relfurla mya ton polika'nya yu meluton ka’nya! + balfurla yu dra? + +ESH'NYUI + relfurla yu esh’dre mya ton polika’nya yu puroton ka’nya~ + relfur yu shi’ro’bae’pu yu pon’ya ka’nya~ + +LU'NYA + puroton yu ponya ton ka’nya! + +ESH'NYUI + be’nyui-rerenlafura yu meluton mimifaka’nya… + relfur yu meluton mimiku'pash~ + +LU'NYA + ’o, relfur chu parefaka’nya… + be’nyui-babanlafura yu meluton naomiminku dre? + +ESH'NYUI + uu, relfur yu naomiminku mya mimifuku mya ton ka’nya... + relfur yu guraton to meluton mimifuku.. + relfur yu ton mimiku’pash~ + + +LU'NYA + ishi-balfur yu mishi'pash! + balfur chu mya arilaen yu en ka’nya peekaka’nya fa'dre? + +ESH'NYUI + yesh-balfur yu mishi'pash~ + (>///////////////<) + relfur yu ari’laen parefaka’nya, balfur yu pareka’nya dra? + +LU'NYA + relfur chu arilaen dedaka’nya. + imanla rila shashka’nya’pash. + imanla shoo chu ike to pikeshe ka’nya. + + relfur chu arilaenlan luka’nya’pash. + +ESH'NYUI + arilaenla shoo chu pikeshe fuka’nya’bash dra? + +LU'NYA + gao chu relfur yu fayu kan’ya. + relfur chu arilaen dedaka’nya. + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/test.html b/test.html new file mode 100644 index 0000000..b31f3b5 --- /dev/null +++ b/test.html @@ -0,0 +1,276 @@ + + + + + + avg convo + + + + +

+
+
+ +LU'NYA + +
+

+nyan’pash! balfur yu e she polika'nya dre? +

+
+
+
+
+
+ +ESH'NYUI + +
+

+re chu meshu yu polika'nya +

+

+(po'nyash!!!) +

+
+
+
+
+
+ +LU'NYA + +
+

+aa, anko! +

+

+(po'nyash!) +

+
+
+
+
+
+ +ESH'NYUI + +
+

+ba yu e wawote to pu mipura lili'nya dre? +

+

+uwu +

+
+
+
+
+
+ +LU'NYA + +
+

+relfur chu mya pu yu mya relfur lup apatka’nya faka’nya’pash ponme mya wawote polika’nya peekaka’nya’pash. +

+
+
+
+
+
+ +ESH'NYUI + +
+

+mi’shi’pash~ +

+

+balfur yu e ton polika’nya dre? +

+
+
+
+
+
+ +LU'NYA + +
+

+mishi’pash!! +

+

+relfurla mya ton polika'nya yu meluton ka’nya! +

+

+balfurla yu dra? +

+
+
+
+
+
+ +ESH'NYUI + +
+

+relfurla yu esh’dre mya ton polika’nya yu puroton ka’nya~ +

+

+relfur yu shi’ro’bae’pu yu pon’ya ka’nya~ +

+
+
+
+
+
+ +LU'NYA + +
+

+puroton yu ponya ton ka’nya! +

+
+
+
+
+
+ +ESH'NYUI + +
+

+be’nyui-rerenlafura yu meluton mimifaka’nya… +

+

+relfur yu meluton mimiku'pash~ +

+
+
+
+
+
+ +LU'NYA + +
+

+’o, relfur chu parefaka’nya… +

+

+be’nyui-babanlafura yu meluton naomiminku dre? +

+
+
+
+
+
+ +ESH'NYUI + +
+

+uu, relfur yu naomiminku mya mimifuku mya ton ka’nya... +

+

+relfur yu guraton to meluton mimifuku.. +

+

+relfur yu ton mimiku’pash~ +

+
+
+
+
+
+ +LU'NYA + +
+

+ishi-balfur yu mishi'pash! +

+

+balfur chu mya arilaen yu en ka’nya peekaka’nya fa'dre? +

+
+
+
+
+
+ +ESH'NYUI + +
+

+yesh-balfur yu mishi'pash~ +

+

+(>///////////////<) +

+

+relfur yu ari’laen parefaka’nya, balfur yu pareka’nya dra? +

+
+
+
+
+
+ +LU'NYA + +
+

+relfur chu arilaen dedaka’nya. +

+

+imanla rila shashka’nya’pash. +

+

+imanla shoo chu ike to pikeshe ka’nya. +

+
+
+
+
+

+relfur chu arilaenlan luka’nya’pash. +

+
+
+
+
+
+ +ESH'NYUI + +
+

+arilaenla shoo chu pikeshe fuka’nya’bash dra? +

+
+
+
+
+
+ +LU'NYA + +
+

+gao chu relfur yu fayu kan’ya. +

+

+relfur chu arilaen dedaka’nya. +

+
+
+ + + + diff --git a/text_analysis.css b/text_analysis.css new file mode 100644 index 0000000..8de459a --- /dev/null +++ b/text_analysis.css @@ -0,0 +1,113 @@ +:root { + --notes-color: rgb(255, 235, 181); + --spacer-color: rgba(0,0,0,0.4); + --spacer-color-2: rgba(0,0,0,0.2); + --left-color: rgb(167, 179, 167); + --right-color: rgb(97, 206, 97); + } + + @font-face { + font-family: "heonian"; + src: url('https://cronut.cafe/~lustlion/myrheon/HeonianAlone.otf'); + } + + body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif + } + + main { + max-width: 600px; + margin: auto; + } + + .convo-container { + display: flex; + justify-content: space-between; + align-items: center; + margin: 8px; + } + + .right { + flex-direction: row-reverse; + } + + .convo { + width: 400px; + border: 1px solid var(--left-color); + border-radius: 8px; + padding: 8px; + } + + .right .convo { + border: 1px solid var(--right-color); + } + + .convo p { + margin: 0; + margin-top: 8px; + } + + .convo-header { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 1.5rem; + } + + .convo-header img { + border-radius: 42069px; + width: 48px; + margin-right: 8px; + } + + .convo-date { + font-size: 0.75rem; + color: var(--spacer-color); + flex-grow: 1; + text-align: right; + } + + .notes { + width: 300px; + margin: 8px; + border-top: 1px solid var(--notes-color); + border-bottom: 1px solid var(--notes-color); + text-align: center; + } + + .spacer { + width: calc(100% - 16px); + height: 1px; + margin-top: 8px; margin-bottom: 8px; + margin: auto; + background-color: var(--spacer-color); + } + + .words { + text-align: center; + } + + .words table { + margin: auto; + border-collapse: collapse; + text-align: left; + } + + .words table td, .words table th { + padding: 8px; + border-right: 1px solid var(--spacer-color-2); + } + + .words table td:last-child, .words table th:last-child { + border-right: none; + } + + .words table th { + border-top: 1px solid var(--spacer-color); + border-bottom: 1px solid var(--spacer-color); + } + + .words table td:first-of-type { + font-family: "heonian"; + } \ No newline at end of file