This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
201 lines (153 sloc) 10.2 KB
#!/bin/env ruby
# encoding: utf-8
# Will you read the book at home tomorrow?
# No, I won't be able to, maybe today.
class Documentation
attr_accessor :path
attr_accessor :dictionaery
attr_accessor :aebeth
def initialize path
@path = path
end
def to_s
index = Index.new
html = "
#{index.add(:root,:basics)}
#{index.add(:basics,:phonology)}
<h4>#{@dictionaery.construct('welcome here.to_be lietal.documentation')}</h4>
<p>Lietal is written from left to right with implicit neutrality, singularity and under the present tense. For the most part, its 6 vowels and 9 consonants are voiced similarly to their english equivalents. </p>
<table>
<tr>
<th>i</th><td>l<b>ea</b>ves</td>
<th>a</th><td>hex<b>a</b>gram</td>
<th>o</th><td><b>au</b>tomobile</td>
</tr>
<tr>
<th>e</th><td>n<b>e</b>ver</td>
<th>u</th><td>n<b>ew</b></td>
<th>y</th><td>j<b>our</b>ney</td>
</tr>
<tr>
<th>k</th><td><b>k</b>iss</td>
<th>t</th><td>ti<b>t</b>le</td>
<th>d</th><td><b>d</b>evice</td>
</tr>
<tr>
<th>r</th><td><b>r</b>eturn</td>
<th>s</th><td><b>s</b>ymphony</td>
<th>l</th><td><b>l</b>igature</td>
</tr>
<tr>
<th>j</th><td><b>g</b>enesis</td>
<th>v</th><td><b>v</b>ideo</td>
<th>f</th><td><b>f</b>estival</td>
</tr>
</table>
#{index.add(:basics,:morphology)}
<p>Building words from Lietal's phonemes is called {_childspeak_}. It makes for rythmical and syllabic words, but take quite a long time to speak. This documentation uses the phonetically denser {_adultspeak_}.</p>
<p>Single syllable words are reversed, so {_#{@dictionaery.translate('no',:lietal).childspeak}_} becomes {_#{@dictionaery.translate('no',:lietal).adultspeak}_}. Vowel sequences, like {_#{@dictionaery.translate('he_she',:lietal).childspeak}_}, are condensed into {_#{@dictionaery.translate('he_she',:lietal).adultspeak}_}. Consonant sequences, like {_#{@dictionaery.translate('grey',:lietal).childspeak}_}, are condensed into {_#{@dictionaery.translate('grey',:lietal).adultspeak}_}. </p>
<table>
<tr><td></td><th>Childspeak</th><th>Adultspeak</th></tr>
<tr><th>Yes</th><td>#{@dictionaery.translate('yes',:lietal).childspeak}</td><td>#{@dictionaery.translate('yes',:lietal).adultspeak}</td></tr>
<tr><th>Who</th><td>#{@dictionaery.translate('who',:lietal).childspeak}</td><td>#{@dictionaery.translate('who',:lietal).adultspeak}</td></tr>
<tr><th>Outside</th><td>#{@dictionaery.translate('outside',:lietal).childspeak}</td><td>#{@dictionaery.translate('outside',:lietal).adultspeak}</td></tr>
<tr><th>To Read</th><td>#{@dictionaery.translate('to_read',:lietal).childspeak}</td><td>#{@dictionaery.translate('to_read',:lietal).adultspeak}</td></tr>
<tr><th>Whenever</th><td>#{@dictionaery.translate('whenever',:lietal).childspeak}</td><td>#{@dictionaery.translate('whenever',:lietal).adultspeak}</td></tr>
</table>
#{@dictionaery.write(@dictionaery.translate('alphabet').childspeak,:title)}
#{index.add(:root,:alphabet)}
<p>The Alphabet, or {_#{@dictionaery.translate('alphabet').to_s.capitalize}_}, is a collection of {*9 elementary particles*}, each is made of a key(consonant) and one of the 6 values(vowels).</p>
#{index.add(:alphabet,:table)}
#{@aebeth.table}
#{@dictionaery.write(@dictionaery.translate('vocabulary').childspeak,:title)}
#{index.add(:root,:vocabulary)}
#{index.add(:vocabulary,:pronouns)}
<p>A sentence is expected to be at the first person if a pronoun has not already been declared, pronouns are often ommited when possible.</p>
#{@dictionaery.side_by_side('you','I give you a book.','you','you.to book to_give')}
#{@dictionaery.collect('pronoun')}
#{index.add(:vocabulary,:verbs)}
<p>Verbs are used at the end of a sentence and are generally built from the <i>#{@aebeth.aeth('interaction').phonetic(:default)}</i> family.</p>
#{@dictionaery.side_by_side('take','I take the book home.','to_take','house.to book to_take')}
#{@dictionaery.collect('interaction')}
#{index.add(:vocabulary,:tenses)}
<p>Sentences are, by default, at the present tense, a tenses marker is used to contrast against an already defined tense. Tenses markers are used at the end of the sentence.</p>
#{@dictionaery.side_by_side('did not','I did not go to school.','negative_past','school.to to_go.negative_past')}
#{@dictionaery.collect('time marker')}
#{index.add(:vocabulary,:prepositions)}
<p>Lietal prepositions are aeths used as particles, placed after the word that they affect.</p>
#{@dictionaery.side_by_side('to','I will go to the city with you.','inside','city.to you.with to_go.future')}
#{@dictionaery.collect('Preposition',4)}
#{index.add(:vocabulary,:colors)}
<p>Colors are built by combining <i>#{@dictionaery.translate('speed',:lietal)}(speed)</i> and <i>#{@dictionaery.translate('color',:lietal)}(color)</i>.</p>
#{@dictionaery.side_by_side('red','Yellow is between red and green.','red','yellow [ red & green ].between to_be')}
#{@dictionaery.collect('Color',3)}
#{index.add(:vocabulary,:numbers)}
<p>Numbers are built by combining <i>#{@dictionaery.translate('counter',:lietal)}(counter)</i> and <i>#{@dictionaery.translate('relation',:lietal)}(relation)</i>. When base10 is used, eleven is not used.</p>
#{@dictionaery.side_by_side('123','1, 2, 3 and 123','100','1 2 3 & 100 10.2 3')}
#{@dictionaery.collect('Number',4)}
<code><comment>23</comment> #{@dictionaery.construct('10.2 3')}<comment>341</comment> #{@dictionaery.construct('100.3 COLLECTION_POP.5 1')}<comment>1782</comment> #{@dictionaery.construct('1000 COLLECTION_POP.7 COLLECTION_POP.8 2')}<comment>900'780</comment> #{@dictionaery.construct('100\'000.9 100.7 COLLECTION_POP.8')}<comment>29'600'000</comment> #{@dictionaery.construct('10\'000\'000.2 1\'000\'000.9 100\'000.6')}</code>
<p>When going through a long number, one can choose to use #{@dictionaery.translate('COLLECTION_POP',:lietal)} instead of the next immediate zero. When one wants to talk about mathematics:</p>
<code><comment>2 + 4 + 6</comment> #{@dictionaery.construct('[ 2 & 4 & 6 ].to_add')}<comment>2.64</comment> #{@dictionaery.construct('2.children 10.6 4')}<comment>2 / 6 = 3</comment> #{@dictionaery.construct('to_divide [ 2 & 6 ] ! to_be 3')}<comment>2 - 6 = -4</comment> #{@dictionaery.construct('to_substract [ 2 & 6 ] ! to_be 3.negative')}</code>
#{@dictionaery.write(@dictionaery.translate('grammar').childspeak,:title)}
#{index.add(:root,:grammar)}
<p>The Lietal word order is :</p>
<code>QUESTION LOCATION/TIME SUBJECT'PARTICLE TOPIC'PARTICLE VERB'TENSE</code>
#{index.add(:grammar,:question)}
<p>Question words are used at the beginning of a sentence.</p>
#{@dictionaery.side_by_side('Where','Where am I? Who are you?','where','where I to_be & who you to_be')}
#{@dictionaery.collect('question word')}
#{index.add(:grammar,:location)}
<p>Locations are the environment of the sentence, it preceeds a sentence.</p>
#{@dictionaery.side_by_side('house','I am at my house.','house','I.house.at to_be')}
#{index.add(:grammar,:time)}
<p>Time is also part of the environment of the sentence, it preceeds a sentence.</p>
#{@dictionaery.side_by_side('morning','I will see you in the morning.','morning','morning.at you to_see.future')}
#{index.add(:vocabulary,:collections)}
<p>Sequences of things, or topics, can be grouped together into collections and used as a single entity. </p>
#{@dictionaery.side_by_side('Between','Between you and I.','between','[ you & I ].between')}
<p>Below is another example with a different sentence structure.</p>
#{@dictionaery.side_by_side('or','Is the house blue or red?','|','house [ red | blue ].to_be')}
<p>Numbers are also using collections</p>
#{@dictionaery.side_by_side('address','The address is two hundred twenty three.','name','house.name [ 100.2 10.3 4 ]')}
#{index.add(:grammar,:summary)}
<p>Here is an example including all of the previous lessons.</p>
#{@dictionaery.side_by_side('tomorrow','Tomorrow, I might go to either the school, or to the library','tomorrow','tomorrow [ school | library ] to_go.potential_future')}
#{index.add(:root,:practice)}
<p>Below is the translation of a segment of the Little Red Riding Hood, try to see if you can make sense of it.</p>
#{index.add(:practice,:vocab)}
<table>
<tr>
<th></th><th>Childspeak</th><th>Adultspeak</th>
<th></th><th>Childspeak</th><th>Adultspeak</th>
</tr>
<tr>
<th>Grandmother</th><td>#{@dictionaery.translate('grandmother',:lietal).childspeak}</td><td>#{@dictionaery.translate('grandmother',:lietal)}</td>
<th>Mother</th><td>#{@dictionaery.translate('mother',:lietal).childspeak}</td><td>#{@dictionaery.translate('mother',:lietal)}</td>
</tr>
<tr>
<th>Stranger</th><td>#{@dictionaery.translate('stranger',:lietal).childspeak}</td><td>#{@dictionaery.translate('stranger',:lietal)}</td>
<th>Woods</th><td>#{@dictionaery.translate('woods',:lietal).childspeak}</td><td>#{@dictionaery.translate('woods',:lietal)}</td>
</tr>
<tr>
<th>Basket</th><td>#{@dictionaery.translate('basket',:lietal).childspeak}</td><td>#{@dictionaery.translate('basket',:lietal)}</td>
<th>Cloak</th><td>#{@dictionaery.translate('cloak',:lietal).childspeak}</td><td>#{@dictionaery.translate('cloak',:lietal)}</td>
</tr>
<tr>
<th>To wear</th><td>#{@dictionaery.translate('to_wear',:lietal).childspeak}</td><td>#{@dictionaery.translate('to_wear',:lietal)}</td>
<th>To say</th><td>#{@dictionaery.translate('to_say',:lietal).childspeak}</td><td>#{@dictionaery.translate('to_say',:lietal)}</td>
</tr>
</table>
#{index.add(:practice,@dictionaery.construct('Cloak little red to_walk'))}
#{@dictionaery.side_by_side_large('little_riding_hood.mh')}
#{@dictionaery.write('liletala',:title)}
#{index.add(:root,:Septambres)}
<p>The runic characters are called the {*Septambres Script*}, the rest of the documentation will be using them. In the case where multiple Aeths are embeded into a single glyph, the characters are read from left to right, top to bottom.</p>
#{@dictionaery.write('li lile lileta liletala',:guide)}
<p>Above is the construction of the {*Lietal*} rune.</p>
#{index.add(:root,:development)}
#{index.add(:development,:contribute)}
<p>You can improve this documentation by the means of {_pull requests_} on {{documentation.rb|http://github.com/XXIIVV/vessel.lietal/blob/master/objects/documentation.rb}}, and you can add new words with {{dictionaery.mh|http://github.com/XXIIVV/vessel.lietal/blob/master/memory/dictionaery.mh}}.</p>
"
return index.to_s(true)+html
end
end