Die Insel deiner Träume!
HOME  SITEMAP     / / libNPS


Everybody who is programming in NPS has written a lot of tcl-scripts. But those scripts are often not unified, some scripts are written better than other, are scattered around and so on.

The intention of libNPS is to create and maintain a collection of tcl-scripts in one library, which can be easily extended in a standard way. I hope that nps-programmers will add some more useful procedures and help to optimize the existing ones.

The libNPS now consists of procedures created by Guido Steenkamp, Hajo Passon, Mark Zimmermann, Harald Bopp and Dalibor Tokic (me ;-)).

Here is an overview of the 20 available tcl-procedures in libNPS with version 1.2:

  • addAttr2Subtree. Sets recursively a content- or object-attribute with an objectclass as filter-criterion.
  • addCA2Object. Sets a content-attribute with an objectclass as filter-criterion
  • addOA2Object. Sets a object-attribute with an objectclass as filter-criterion
  • buildRelativPath. Transforms a relativ path into a absolute one. An essential procedure till NPS 5.2.
  • catFile. Shows the content of a specific file.
  • copySubtree. Copys a publication recursively.
  • dumpObject. Dumps the released content and all other attributes of one object to the filesystem.
  • dumpSubtree. Dumps a subtree with the released content and all other attributes to the filesystem. Important for transfer of content between test-, preproductiv- and productiv-servers.
  • getTagValue. Reads the tagname in a XML-file.
  • makeTimeStamp. Procedure to transform a date into a number.
  • mcp. Copys all objects of a specific objectclass NOT recursively in a different publication and releases them optionally.
  • permissionObject. Sets the rights of a single object.
  • permissionSubtree. Sets recursively the object-rights.
  • releaseObject. Releases a object.
  • releaseSubtree. Releases a publication recursively.
  • restoreObject. Restores a dumped Object.
  • restoreSubtree. Restores a complete dump of a subtree.
  • slimObject. Deletes the contents of an object, with a specified number remaining.
  • slimSubtree. Deletes recursively contents, with a specified number remaining. For all object-classes or a specific.
  • sortBy. Sorts a object-list descending/ascending dependently of an attribute. The secondary-sorting-criterion is the attribute "name".

Unfortunately the libNPS has yet german comments and output. I hope to change that in the near future.

Anyway, read the instructions at the beginning of the source-code, if you want to add procedures or to improve the code.

There exists an empty dummy procedure, which will help you to add new procedures. This is also important to keep the functionality of the library alive.

Usage of the library:
1. source the library -> "source libNPS.tcl".
2. "libNPS" will show you an overview of all available procedures with a description of their functionality.
3. Type in the name of your desired procedure, like "dumpSubtree". Then again a description of the procedure will show up and a description of the correct usage of the procedure with all parameters.

So one more advantage of the library, is that you dont need to look into the file to see which parameter it needs. All you need is the tcl-client.

Last but not least:
If you have new procedures or a improved version of libNPS or anything you want me to know, mail to

Thanx for your support! :-)