vipsi - the friendly vip script interpreter

Example Scripts

Libraries

DIR: File system utilities

List functions: thisThis library contains some Text functions: file
Instructions: file
file
system tools, like traversing a whole directory tree. It's Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
much yet. (as of version 0.8.7)

Download link

List functions: thisThis Text functions: file
Instructions: file
file
is included in every distribution.

DIR.vl

Listing of DIR.vl

Instructions: var
How does VScript::Value() work?: Var*&
var
List functions: dir
Instructions: dir
Shell Immediate Commands: dir
DIR
.ExcludePatterns = { ".*" } /* recursively walk directory tree Pattern may be an absolute Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
relative path, optionally containing a pattern in Flow control: if … then
Flow control: try … then
the
last path component Instructions: procProc(Pattern) is is called for each matched Text functions: link
Instructions: link
link
, Text functions: file
Instructions: file
file
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
Flow control: whileWhile FollowSymlink is >= 1, symlinks to directories are followed Items in directories which Numeric functions: matchmatch patterns in List functions: dir
Instructions: dir
Shell Immediate Commands: dir
DIR
.ExcludePatterns are skipped */ Instructions: var
How does VScript::Value() work?: Var*&
var
List functions: dir
Instructions: dir
Shell Immediate Commands: dir
DIR
.DoRecursive = Instructions: procproc ( Pattern, Instructions: procProc, FollowSymlink ) { Flow control: if … thenif Numeric functions: isfileisfile Pattern Instructions: procProc(Pattern) Flow control: returnreturn Flow control: if … then
Flow control: try … then
then
// Text functions: file
Instructions: file
file
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Text functions: link
Instructions: link
link
to Text functions: file
Instructions: file
file
Flow control: if … thenif Numeric functions: isdirisdir Pattern && Text functions: rightstrrightstr(Pattern,1)!="/" Pattern #= "/" Flow control: if … then
Flow control: try … then
then
Flow control: if … thenif Numeric functions: islinkislink Pattern Flow control: if … thenif FollowSymlink<=0 Instructions: procProc(Pattern) Flow control: returnreturn Flow control: if … then
Flow control: try … then
then
// don't follow symlink Flow control: if … thenif !Numeric functions: isdirisdir Pattern Instructions: procProc(Pattern) Flow control: returnreturn Flow control: if … then
Flow control: try … then
then
// symlink broken Flow control: if … then
Flow control: try … then
then
Instructions: var
How does VScript::Value() work?: Var*&
var
Path = Pattern[to Numeric functions: rfindrfind(Pattern,"/")] Instructions: procProc(Path) Instructions: var
How does VScript::Value() work?: Var*&
var
d = List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
Pattern Instructions: var
How does VScript::Value() work?: Var*&
var
i = 0 Flow control: do … loopdo Flow control: whilewhile ++i <= Numeric functions: countcount d Instructions: var
How does VScript::Value() work?: Var*&
var
Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
= d[i].dir: fnamefname Instructions: var
How does VScript::Value() work?: Var*&
var
j = 0 Flow control: do … loopdo Flow control: whilewhile ++j <= Numeric functions: countcount ExcludePatterns Flow control: untiluntil Numeric functions: matchmatch(Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
,ExcludePatterns[j] ) Flow control: untiluntil Numeric functions: matchmatch(Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
,ExcludePatterns[j]#"/") Flow control: do … looploop Flow control: if … thenif j <= Numeric functions: countcount ExcludePatterns Flow control: nextnext Flow control: if … then
Flow control: try … then
then
DoRecursive(Path#Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
,Proc,FollowSymlink-1) Flow control: do … looploop }

Valid HTML   Valid CSS