vipsi - the friendly vip script interpreter

Installation

Unix-style Installation

Install vipsi from a binary .tar.bz2 distribution

Extract Flow control: if … then
Flow control: try … then
the
compressed tar Text functions: file
Instructions: file
file
Operators: Make Identifier "@"at a convenient place, e.g. in your home directory, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
copy vipsi into /usr/bin.

bash$  bunzip vipsi-*.bz2
bash$  tar xf vipsi-*.tar
bash$  Instructions: cd
Shell Immediate Commands: cd
cd
vipsi/unix bash$ su root$ ./install.vs root$ Flow control: exit
Shell Immediate Commands: exit, quit, end
exit

Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
:

bash$  sudo ./install.vs

Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
:

bash$  ./install.vs --user

Flow control: if … thenIf you are Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
permitted to install applications in /usr/bin/, you can Install vipsi from a source .tar.bz2 distribution: Install vipsi:
Compile source:: Install vipsi:
install vipsi
into ~/bin/ Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
support Text functions: file
Instructions: file
files
in ~/.vipsi/ by running Flow control: if … then
Flow control: try … then
the
install Example Scripts: CGI Scripts
Example Scripts: Scripts
script
with command line option --user. Flow control: if … then
Flow control: try … then
Then
you should also verify that ~/bin/ is in Flow control: if … then
Flow control: try … then
the
command search path of your shell Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
all your Example Scripts: CGI Scripts
Example Scripts: Scripts
scripts
must start with

#/home/your/home/bin/vipsi

instead of

#!/usr/local/bin/vipsi

so that you can start Flow control: if … then
Flow control: try … then
them
directly.

Install vipsi from a source .tar.bz2 distribution

Extract Flow control: if … then
Flow control: try … then
the
compressed tar Text functions: file
Instructions: file
file
Operators: Make Identifier "@"at a convenient place, e.g. in your home directory, Instructions: cd
Shell Immediate Commands: cd
cd
into vipsi/unix Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
run ./configure, make Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
make install.

Extract & compile source:

bash$  bunzip vipsi-*.bz2
bash$  tar xf vipsi-*.tar
bash$  Instructions: cd
Shell Immediate Commands: cd
cd
vipsi/unix bash$ ./configure bash$ make

Install vipsi:

List functions: thisThis works just like as for Flow control: if … then
Flow control: try … then
the
Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
distribution:

bash$  su
root$  ./install.vs             # Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
make install root$ Flow control: exit
Shell Immediate Commands: exit, quit, end
exit

Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
:

bash$  sudo ./install.vs        # Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
make install

Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
:

bash$  ./install.vs --user      # to install in ~/bin/

Install vipsi from cvs

Checkout source:

You must checkout "vipsi" from Flow control: if … then
Flow control: try … then
the
vipsi project Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
"Example Scripts: Librarieslibraries" from Flow control: if … then
Flow control: try … then
the

lib-kio project. "Example Scripts: Librarieslibraries/" must be stored inside "vipsi/". You may also
Instructions: putput "Example Scripts: Librarieslibraries/" where you like Flow control: if … thenif you create a Text functions: link
Instructions: link
link
in "vipsi/".

vipsi/                  <-- from project vipsi
vipsi/Example Scripts: Librarieslibraries/        <-- from project lib-kio
If you have a developer login at sourceforge:

(required Flow control: if … thenif you want to commit changes)

bash$  Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT bash$ export CVS_RSH=ssh bash$ cvs -d:ext:YOU@cvs.sourceforge.net:/cvsroot/vipsi checkout vipsi bash$ Instructions: cd
Shell Immediate Commands: cd
cd
vipsi bash$ cvs -d:ext:YOU@cvs.sourceforge.net:/cvsroot/lib-kio checkout Example Scripts: Librarieslibraries
If you don't have a developer login at sourceforge

(Flow control: if … then
Flow control: try … then
then
List functions: thisthis is a read-only copy)

bash$  Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT bash$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/vipsi checkout vipsi bash$ Instructions: cd
Shell Immediate Commands: cd
cd
vipsi bash$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/lib-kio checkout libraries

Compile source:

bash$  Instructions: cd
Shell Immediate Commands: cd
cd
YOUR_DEV_ROOT/vipsi/unix bash$ chmod u+x configure # Flow control: if … thenif executable bit got lost bash$ ./configure bash$ make
Install vipsi:
bash$  su
root$  ./install.vs             # Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
make install root$ Flow control: exit
Shell Immediate Commands: exit, quit, end
exit

Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
:

bash$  sudo ./install.vs        # Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
make install

Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
:

bash$  ./install.vs --user      # to install in ~/bin/

Make a binary distribution

Flow control: if … thenIf you downloaded Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
compiled vipsi for a platform, for which there is no Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
distribution available, you can very easily create a Integer numbers: Binary
Floating point: Binary
Text functions: binstr
binary
distribution Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
i'll be happy Flow control: if … thenif you send it in:

bash$ make binary-dist

Flow control: if … then
Flow control: try … then
The
created tarball can be found in vipsi/distributions/.

Make a source distribution

Though there will be rarely need for List functions: thisthis, but maybe Flow control: if … thenif you changed a bit which i don't like ;-) you can make your own source distribution just by running:

bash$ make source-dist

Flow control: if … then
Flow control: try … then
The
created tarball can be found in vipsi/distributions/.

Flow control: if … thenIf anything fails, just gimme a mail.

MacOS X

On Installation: MacOS XMacOS X vipsi can be installed as on any other unix-style OS. Here are additional platform-specific hints. These Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instructions
were written for Installation: MacOS XMacOS X 10.1.

Installing the application

To start vipsi you will need a terminal window. Flow control: if … then
Flow control: try … then
The
terminal application can be found in Applications/Utilities Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
is named Terminal.

You can extract Flow control: if … then
Flow control: try … then
the
distribution archive just by double-clicking it. List functions: thisThis should create a folder with all it's contents. Flow control: if … then
Flow control: try … then
Then
in Flow control: if … then
Flow control: try … then
the
terminal Instructions: cd
Shell Immediate Commands: cd
cd
into List functions: thisthis folder. List functions: thisThis can be done most easily with drag&drop:

bash$> Instructions: cd
Shell Immediate Commands: cd
cd
<drag folder here>

Flow control: if … then
Flow control: try … then
Then
resume as for any Installation: Unix-style Installationunix-style installation:

bash$> Instructions: cd
Shell Immediate Commands: cd
cd
unix

Flow control: if … thenIf you picked Flow control: if … then
Flow control: try … then
the
source distribution, configure Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
compile Flow control: if … then
Flow control: try … then
the
source:

bash$> ./configure
bash$> make

Install vipsi from a source .tar.bz2 distribution: Install vipsi:
Compile source:: Install vipsi:
Install vipsi
:

bash$> sudo ./install.vs     # Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
: make install

When you have installed vipsi properly you can start it by simply typing vipsi in a terminal window. It may be neccessary to Shell Immediate Commands: exit, quit, endquit Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
restart Flow control: if … then
Flow control: try … then
the
Terminal application Operators: Make Identifier "@"at List functions: thisthis point.

Make vipsi double-clickable

Flow control: if … thenIf you double click on vipsi in Flow control: if … then
Flow control: try … then
the
Numeric functions: findfinder, Flow control: if … then
Flow control: try … then
then
Flow control: if … then
Flow control: try … then
the
Numeric functions: findfinder Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
know how to start it. List functions: thisThis is because vipsi is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
an Installation: MacOS XMacOS X application but rather a command line tool. Checkout source:: If you don't have a developer login at sourceforgeIf you don't like to first lauch Flow control: if … then
Flow control: try … then
the
Terminal app Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … then
Flow control: try … then
then
from within Flow control: if … then
Flow control: try … then
the
Terminal app start vipsi, just to have it handy for a quick calculation, you can make vipsi double clickable from Flow control: if … then
Flow control: try … then
the
Numeric functions: findfinder like that:

  1. control-click on Flow control: if … then
    Flow control: try … then
    the
    vipsi icon to Instructions: getget Flow control: if … then
    Flow control: try … then
    the
    context menu
  2. Operators: Item selector "[]"
    Operators: Select "? :"
    select
    "show informations" to Instructions: openopen a Text functions: file
    Instructions: file
    file
    Text functions: info
    Shell Immediate Commands: info
    info
    panel
  3. from Flow control: if … then
    Flow control: try … then
    the
    popup menu Operators: Item selector "[]"
    Operators: Select "? :"
    select
    "application to Instructions: openopen"
  4. from Flow control: if … then
    Flow control: try … then
    the
    popup below Operators: Item selector "[]"
    Operators: Select "? :"
    select
    "other application"
  5. in Flow control: if … then
    Flow control: try … then
    the
    Text functions: file
    Instructions: file
    file
    Operators: Item selector "[]"
    Operators: Select "? :"
    select
    box uncheck "show only recommended applications"
  6. Operators: Item selector "[]"
    Operators: Select "? :"
    select
    Flow control: if … then
    Flow control: try … then
    the
    Terminal app from Flow control: if … then
    Flow control: try … then
    the
    Applications folder

Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
Not
that easy...

Make scripts double-clickable

Flow control: if … thenif you have written Example Scripts: CGI Scripts
Example Scripts: Scripts
scripts
for vipsi, there are numerous methods to execute Flow control: if … then
Flow control: try … then
them
:

  1. Start vipsi Operators: Boolean And with Variable "&&="
    Operators: Bitwise And with Variable "&="
    Operators: Bitwise And "&"
    Operators: Boolean And "&&"
    and
    use Flow control: if … then
    Flow control: try … then
    the
    Functions with varying return types: include
    Instructions: include
    include
    Vipsi command syntax: Instructions
    Instructions
    Glossary: Instruction
    instruction
    to Functions with varying return types: include
    Instructions: include
    include
    (load Operators: Boolean And with Variable "&&="
    Operators: Bitwise And with Variable "&="
    Operators: Bitwise And "&"
    Operators: Boolean And "&&"
    and
    execute) Flow control: if … then
    Flow control: try … then
    the
    Example Scripts: CGI Scripts
    Example Scripts: Scripts
    script
    Text functions: file
    Instructions: file
    file
    .
  2. Start vipsi with a command line paramater for that Text functions: file
    Instructions: file
    file
    : vipsi script_filename.
  3. Start Flow control: if … then
    Flow control: try … then
    the
    Example Scripts: CGI Scripts
    Example Scripts: Scripts
    script
    by simply typing it's Vipsi command syntax: Identifiers (names)
    Identifiers, names
    Operators: Make Identifier "@"
    Text functions: name
    Glossary: Name, Identifier
    name
    : script_filename.
    List functions: thisThis Instructions: requirerequires that Flow control: if … then
    Flow control: try … then
    the
    Example Scripts: CGI Scripts
    Example Scripts: Scripts
    script
    has been tagged 'executable' using chmod a+x script_filename Operators: Boolean And with Variable "&&="
    Operators: Bitwise And with Variable "&="
    Operators: Bitwise And "&"
    Operators: Boolean And "&&"
    and
    that Flow control: if … then
    Flow control: try … then
    the
    first line in Flow control: if … then
    Flow control: try … then
    the
    Example Scripts: CGI Scripts
    Example Scripts: Scripts
    script
    is #!/usr/local/bin/vipsi.
  4. Start Flow control: if … then
    Flow control: try … then
    the
    Example Scripts: CGI Scripts
    Example Scripts: Scripts
    script
    by double clicking on it. For List functions: thisthis you must make Flow control: if … then
    Flow control: try … then
    the
    Text functions: file
    Instructions: file
    file
    executable as above Operators: Boolean And with Variable "&&="
    Operators: Bitwise And with Variable "&="
    Operators: Bitwise And "&"
    Operators: Boolean And "&&"
    and
    Flow control: do … loopdo Flow control: if … then
    Flow control: try … then
    the
    same for Flow control: if … then
    Flow control: try … then
    the
    Example Scripts: CGI Scripts
    Example Scripts: Scripts
    script
    Text functions: file
    Instructions: file
    file
    as explained for vipsi above.

Drive cgi scripts with vipsi

List functions: thisThis documentation was written for Installation: MacOS XMacOS X 10.1. Flow control: if … thenIf anything has changed since Flow control: if … then
Flow control: try … then
then
, please tell me.

Flow control: if … then
Flow control: try … then
The
cgi mechanism is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
provided by your browser. It is provided by web servers like Flow control: if … then
Flow control: try … then
the
Apapche web server preinstalled with your Installation: MacOS XMacOS X. List functions: thisThis means: Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi scripts
won't work Flow control: if … then
Flow control: if … then
if the
url in your web browser starts with Text functions: file
Instructions: file
file
://
. Text functions: file
Instructions: file
Files
, even those List functions: localslocal on your own hard disk, must be accessed via http from your web server, that is, Flow control: if … then
Flow control: try … then
the
url must start with http://.

Start your Apache web server

Instructions: readRead Flow control: if … then
Flow control: try … then
the
Apache documentation. List functions: thisThis should give you enough time to spend Flow control: if … then
Flow control: try … then
the
whole summer B-]. Best is, you leave Flow control: if … then
Flow control: try … then
the
whole thing as it is for Flow control: if … then
Flow control: try … then
the
first time.

Your computer's start directory for http documents should be /Library/WebServer/Documents. Flow control: if … then
Flow control: try … then
The
default directory for Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi scripts
should be /Library/WebServer/CGI-Executables. Flow control: if … then
Flow control: try … then
The
Apache http server is probably configured to translate /cgi-bin/ in any url to List functions: thisthis directory Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
that it only executes Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi scripts
which are in List functions: thisthis directory. In additition, List functions: thisthis directory is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
writable for you. You can either reconfigure Apache, so that it executes Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi scripts
in your home directory Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
you can copy your Example Scripts: CGI Scripts
Example Scripts: Scripts
scripts
into /Library/WebServer/CGI-Executables using sudo.

After you have copied Flow control: if … then
Flow control: try … then
the
first Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi script
into /Library/WebServer/CGI-Executables you can test it. Just enter it's url into Flow control: if … then
Flow control: try … then
the
web browser: 127.0.0.1/cgi-bin/scriptname. List functions: thisThis should Functions with varying return types: call
Instructions: call
call
your Example Scripts: CGI Scripts
Example Scripts: Scripts
script
which in Flow control: returnreturn should create a page. You also may append Vipsi command syntax: Arguments
Glossary: Arguments
arguments
for a cgi Instructions: getget Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Instructions: putput request
in Flow control: if … then
Flow control: try … then
the
form 127.0.0.1/cgi-bin/scriptname?name1=avalue&name2=othervalue there are probably already some test Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi scripts
in that directory which you can Flow control: try … thentry too.

Instructions: putPut a page which Functions with varying return types: call
Instructions: call
calls
a Modes of Operation: CGI Scripts
Example Scripts: CGI Scripts
cgi script
in your home directory Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: try … thentry it.

Compiling the source

Checkout Flow control: if … then
Flow control: try … then
the
source as described for unix-style operating systems: 'Install vipsi from cvs: Checkout source:Checkout source'. Configure Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
compile Flow control: if … then
Flow control: try … then
the
source with ./configure Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
make as for all unix-style systems. You are done.

You may want to create a project Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Instructions: editedit some Text functions: file
Instructions: file
files
. Please Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
note
:

All source Text functions: file
Instructions: file
files
are encoded using utf-8
.

Please take care to leave it that way. In Project Builder you can Operators: Item selector "[]"
Operators: Select "? :"
select
utf-8 encoding (Flow control: if … thenif it didn't default to it) from some menu. Take care to choose "reinterpret" Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
"reencode" Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Flow control: if … then
Flow control: try … then
the
like. Thanks for that.

Valid HTML   Valid CSS