Standart Directives

Dump

Syntax:

Dump var1 [var2 ... varN]

The values of the variables var1 [var2 ... varN] printing. It is used for debugging.

EnqueueUrls

Syntax:

EnqueueUrls var1 [var2 ... varN] [ForceSetAlias] [Prior N] [Revisit N]

Adding to the database the URLs to the network documents, which require processing.The links should be stored variables: var1 [var2 ... varN].

Filter

Syntax:

Filter filter_name var1 [var2 ... varN] [WithParams key1=value1 [key2=value2 ... key3=value3] ]

The appliance of a filter filter_name to the variables var1 [var2 ... varN]. The filter can be configured after giving a list of parameters using a key-word WithParams.

Foreach

Syntax:

Foreach var1 [var2 ... varN] As tmpvar

It applies the chain, which follows the directive, to the variables var1 [var2 ... varN], copying their contents into <tmpvar>. The directives belong to the chain when the number of the spaces before them is more than those of Foreach.

GoSub

Syntax:

GoSub name

The call of the chain name. See Sub.

If

Syntax:

If var1 [var2 ... varN] [Not] cond

Execute the chain of the directives, if the contents of all the variables var1 [var2 ... varN] fits the regular expression cond. The key word Not denotes inverse condition.

Implode

Syntax:

Implode var1 [var2 ... varN] Into newvar [By glue]

Unites the contents of the variables var1 [var2...varN] into one string and saves it into the variable newvar. The uniting symbol can be pointed in the parameter glue.

LocationMatch

Syntax:

LocationMatch ereg [Once]

Applies the chain to the document if its name (the physical file name or URL, if it is a network file) matches the regular expression ereg. The directives refer to the chain till the following LocationMatch or Sub directive. The keyword Once means that the rule can’t be applied to a page more than once.

MakeArray

Syntax:

MakeArray name var1 [var2 ... varN]

It forms a variable name from var1 [var2 ... varN], which will contain an array with the elements, created from these variables.

MakeItem

Syntax:

MakeItem name [key1=]var1 [[key2=]var2 ... [keyN=]varN]

It forms a variable name from var1 [var2 ... varN], which will contain an object (associative array) with properties, created from the variables. In other words, an object can be made by means of grouping the variables var1 [var2 ... varN]. The names of the attributes can be given with the help of the parameters key1…keyN.

Set

Syntax:

Set var [value]

It gives the value to the variable var. If it doesn’t exist, this variable will be created.

StoreItem

Syntax:

StoreItem name1 [name2 ... nameN] [InGroup groupname] [AttachFiles file1 [file2 ... fileN]]

It saves the content of the variables name1 [name2 ... nameN] in the database. They must be formed beforehand with the help of MakeItem. Files can be attached to the elements.

Sub

Syntax:

Sub name

It define the chains name. It can be called from any other chain. The directives belong to the chain until LocationMatch or Sub appears.

Unset

Syntax:

Unset var1 [var2 ... varN]

It removes the variables var1 [var2 ... varN] from the container.


Introduction SmokeDoc Script Reference Standart Filters