Rocs’ include system – include (firstPost.js)

First sorry people by my late in report something in GSoC, but now i have some results to show to you.
This is my first post about GSoC with some progress, here i will describe a little of the include system in development.
The idea behind Rocs’ include system is to make the user capable of reuse the algorithms without copy paste (this make a simple algorithm file become huge and is not guaranteed that a method is the most actual).
To over with all this copy/paste and update all the files with some method, we bring to you this feature.

Now just put your algorithms in a directory and tell to Rocs where is it and just:

include ( my_file.js)

and you got it! all that methods and algorithms very useful :)

Now to the questions:

How Rocs know where is my files?
To make more confortable to user, he/she just say to Rocs to seek in some directories, like /home/homie/JsScripts;/other/path/.
Rocs will search in that two folder. now beyond: If you saved your working script in other directory, Rocs wiil seek first in directory of your plugin and, only if not found the file in that directory, pass to other in list.

And if some of my files have cyclic includes?
Rocs make a deep first search, avoiding clycles (if exists) for instance if:

a.js includes -> b.js and b.js -> includes a.js

only b.js will be inserted in a.js

Inseted?!, what you mean?
Yeah, Rocs’ script engine process only one file, so when you say include (foo.js), the content of foo is copied replacing the include line.

So, is it working right now?

Yeah, look the video above:

Just explaing a little ( i am new to kdenlive and recordmydesktop and the quality is far from good :( ) :
I have a script file in my home directory. First i need to tell to Rocs where it’s will search from files (for now i can put more than one directory separated by ‘;’).

After it i can call the plugin just by include (coloring_.js). In this case, this script do all the job (find the colors and pu the colors) but this can only walk by graph and mark the position of node in graph and after i write my own method to use this information and fill the colors.

But, i still have some issues, like:

  • Commented includes still being processed (inline comments is solved (if starts with // don’t process)). I should fix it in a couple of days (just remove comments before search for includes).
  • The screen to user inform the paths to seek for plugins is far from what i desire (i whant a list with an add, remove and edit buttons).
  • To include a file with the path (include (/path/to/file.js) need some love in it, but is working to full path.

2 Responses to Rocs’ include system – include (firstPost.js)

  1. manoel says:

    Porque estes site nao pode ser escrito em portugues

    • wiglot says:

      Pode, mas como alguns post vão para o, eles devem ser escritos em inglês.
      Vamos tentar escrever algo em português (ou ao menos postar a tradução dos artigos)

      Obrigado pelo Feedback :)

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do

Você está comentando utilizando sua conta Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

%d blogueiros gostam disto: