ZIMPROMPT
ZimPrompt is a text-based utility that enables you to run zim programs from the command line. It provides a basic language interaction with a Zim-X database.
zimprompt -n database [-u user] [-p password] [-c command] [-o port] [-h host name] [-w work path]
Parameters
| -n database | is one of the database names provided in the zimdb.zim configuration file when Zim Server was started. This parameter is obligatory |
| -p password | is the password for this user as known by Zim:X. The users ZIM and super don’t have a password; just provide the parameter as -p “”. If omitted, it is assumed the null string (“”) |
| -u user | is a user name known by Zim:X. Usually, any Zim database contains, by default, the users ZIM and super. If omitted, this parameter is assumed “ZIM” |
| -c command | is the Zim:X command you want to execute when Zim starts. If omitted, it is assumed “zimprof” |
| -o port | is the server port number used to connect to Zim Server as specified in zimconfig.srv configuration file. It omitted, this port is “6002” |
| -h hostname | is the name of the machine where Zim Server is running. It can be a name or an IP address known to the network. If omitted, it is assumed “localhost” |
| -w work path | is an operating system absolute address where temporary files used by this Zim session will be placed. If omitted, it is assumed the null string (“”) |
Comments
When Zim:X starts, it connects to ZimServer using the database name specified, takes the appropriate parameters from the database configuration file, and then either executes immediately the Zim command specified in the parameters or prompts the user.
If one or more parameters are missing, then Zim:X will prompt the user to provide the correct information.
Note: The parameter “-w” is provided to allow administrators to determine exactly which directory of the operating system should be used as the work path for the current Zim session.
ZimPrompt is a text-based utility used to assist the user in quick work. It’s also a great tool to perform Zim actions in background without invoking a front-end interface.
ZimPrompt handles most Zim commands, but it does not possess the ability to deal with Forms, Windows and Menus. An error message is raised when attempting to execute a particular Zim command not implemented by ZimPrompt. This is specially applicable to ZOM commands where some of them use screen operations. ZOMEnable, ZOMExport and many others run under ZimPrompt without problems. However, ZOMImport uses the user interface and this situation can be corrected by using the following syntax:
ZOMImport; X X
Where “; X X” is literally written as above.
