Navegante - a framework to build intrusive high order proxies
$ make $ navegante examples/program
To build an application using Navegante you need to have a program file. This program file is splitted in two major sections:
The first section is used to specify application parameters using a well defined DSL, detailed in the next section.
The second section is used to define any kind of functions needed by our application in Perl syntax.
The statements that can currently be used are:
init(STRING)
The name of the function that is called in the beginning of every application call.
desc(STRING)
The function that prints the application's behavior.
formtitle(STRING)
Define the form's title of the application.
save
TODO
mail
TODO
filename(STRING)
The destination filename for the newly create application. If no filename
is specified, prints to standard output.
feedback(STRING)
The function that is called when the application's feedback link is followed.
proc(STRING)
The function that is used to actually process the page content.
proctags(STRING)
The functions that should be called to process specific HTML tags content. For example:
proctags(h1=toitalic,h2=>underline)>
would call the function toitalic when processing H1 tag's content,
and underline when processing H2 tag's content.
protect(LIST)
Comma separated list of HTML tags that will not be processed by the
proc function. By default this list is: 'html','head','script'
and 'title'.
livefeedback(STRING)
The function that is used to render the feedback section in the application's banner.
annotate(STRING)
The fucntion that is called when the form user data, in the application's banner is submitted.
iform(STRING)
Used to describe the form that is going to be rendered in the application's banner.
iframe(STRING)
If defining the form that is used in the banner is not enough, you can
use iframe to define the name of a function that returns the entire
iframe content. Note that iframe always takes precedence over
iform in case you define both.
quit(STRING)
The function that is called when the appliccation's banner quit button is followed.
The space between ``##'' and EOF is just copied do application. Tipycally, it should include the implementation of the function described as arguments.
An example program file should look something like:
filename(reverse) formtitle(Reverse Browsed Content) feedback(reverseFeedback) proc(reverseFuncion) desc(reverseDesc)
##
sub reverseFunction {
...
For more examples refer see TODO.
J.Joao Almeida, jj@di.uminho.pt
Alberto Simões , albie@alfarrabio.di.uminho.pt
Nuno Carvalho, smash@cpan.org
perl(1).