Saturday, 14 May 2016

The initial work

Hi All,
It is really good for me to engaged with free software activities which are interesting for me. I felt great to learn new aspects of life. Also as a new one to SMC and Indic project I get a lot's of new experiences such Instant Relay Chat (#smc-project).

As I mentioned earlier my first target is to create the web interface. As the first and easy step I tried to create a webpage that shows a textarea and user can type in braille way. Since I have no previous experience and lot of things to do immediately I asked my mentor for a hint and he said it can be done with a javascript and learn more about Apache2 webserver. After learning the working strategy of IBus-Braille and some works I just implemented a basic mechanism for testing the possibility and it worked!!. The code is as follows.

   <textarea id="brailletextarea" cols=60 rows=30 type="textarea" onKeyPress="KeyPress(event)" onKeyUp="KeyRelease(event)"> </textarea>
    var items = "";
    function KeyPress(event)
    function case_insensitive_comp(strA, strB) 
  return strA.toLowerCase().localeCompare(strB.toLowerCase());

    function KeyRelease(event)
brailletextarea = document.getElementById('brailletextarea');
if(items != ""){
items = items.split("");
items = items.sort( case_insensitive_comp )
items = items.join("");

if(items == "f"){
brailletextarea.value = brailletextarea.value+"a";
if(items == "df"){
brailletextarea.value = brailletextarea.value+"b";
if(items == "fs"){
brailletextarea.value = brailletextarea.value+"k";
if(items == "dfs"){
brailletextarea.value = brailletextarea.value+"l";
if(items == "fj"){
brailletextarea.value = brailletextarea.value+"c";
if(items == " ")
brailletextarea.value = brailletextarea.value+" ";

Then I where searching over the internet for how extensions are created. On that time mentor Nalin gave me a good hint( which is varnam project( Varnam is a cross platform opensource transliterator for Indian languages which have browser extentions hosted on github. I cloned the codebase of varnam-browser-addon and read it and I understand that it's the best place start the project. Also later I realize that varnam project is also a part of Swathanthra Malayalam Computing(SMC) done by navaneeth.

No comments:

Post a Comment