DATAMANIP commands


PROGRAM NAME

kcomment - Change the Comment on a Data Object

DESCRIPTION

The Comment Data operator, kcomment, is used to change the comment field in a Khoros data object. The comment is replaced by the given string.

If an output data object is specified, the input data object is copied to the output data object and the comment on the output data object is changed. If there was no output data object specified, then the comment is changed on the input data object. Note that the underlying data format for the image actually determines whether the comment can be stored with the data object or not. For instance, Khoros VIFF and XVIMAGE formats support the storage of a comment while the XPM format does not. Thus changing the comment on an XPM image will have essentially no effect.

A comment string can be provided (-s). Depending on the selected option, this string will replace the comment (-re), be appended to the existing comment (-ap), or be prepended to the existing comment (-pr). Yet another option allows the comment can be edited directly (-ed). If editing is desired, this routine will bring up an editor session as determined by your KEDITOR environment variable. Within this session will be the previous comment. Once you have completed editing the comment, save and quit the editor, and the edited comment will be assigned.

REQUIRED ARGUMENTS

-i
type: infile
desc: Input Data Object

OPTIONAL ARGUMENTS

-s
type: string
desc: Comment String
default: {none}
-o
type: outfile
desc: Resulting Output Data Object
default: {none}

Mutually Exclusive Group; if desired, specify ONE of:

-ed
type: boolean
desc: Edit Existing Comment
default: true
OR
-re
type: flag
desc: Replace Comment with String
OR
-pr
type: flag
desc: Prepend String to Comment
OR
-app
type: flag
desc: Append Comment to String

EXAMPLES

kcomment -i image.viff -c "This is a new comment"
will change the comment on image.viff to "This is a new comment"

SEE ALSO

kprdata

RESTRICTIONS

This routine can not be used to set the comment on a data object if the underlying data storage format does not support storage for the comment. Restrictions on read-write objects require this operator to copy the data on the input-only case.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.