work on pspp-output modify command
[pspp] / doc / pspp-output.texi
index f8b7931d735c20afb8979dd8850409867b4ad172..e6f6329a3049f5bb45c128c9ba9c3d346744760d 100644 (file)
@@ -46,6 +46,7 @@ developers may find useful for debugging.
 * The pspp-output detect Command::
 * The pspp-output dir Command::
 * The pspp-output convert Command::
+* The pspp-output modify Command::
 * The pspp-output get-table-look Command::
 * The pspp-output convert-table-look Command::
 * Input Selection Options::
@@ -123,6 +124,103 @@ output tables.  The file should be a TableLook @file{.stt} or
 @file{.tlo} file.
 @end table
 
+@node The pspp-output modify Command
+@section The @code{modify} Command
+
+@display
+@t{pspp-output} [@var{options}] @t{modify} @var{file} [@var{new-file}]
+@end display
+
+Reads SPV @var{file} and writes out a modified version.  Without
+@var{new-file}, the modified file replaces @var{file} in-place.  With
+@var{new-file}, @code{pspp-output} writes the modified version as
+@var{new-file}.  In the latter case, @code{pspp-output} by default
+infers the format of @var{new-file} the intended format for
+@var{destination} is inferred based on its extension, in the same way
+that the @command{pspp} program does for its output files.
+@xref{Invoking PSPP}, for details.
+
+The @code{modify} command includes all objects in @var{file} in its
+output, @strong{except} that it deletes objects in formats not yet
+understood by PSPP, such as charts.    @xref{Input Selection Options},
+for information on the options available to select a subset of objects
+to modify while copying them to the output.
+
+The following options specify modifications to be made:
+
+@table @option
+@item --set-visible=@var{bool}
+Makes the selected visible or invisible, according to @var{bool}.
+
+@item --set-label=@var{label}
+Set the selected objects' labels to @var{label}.  Labels appear in the
+outline in the PSPPIRE output viewer window and in the outline sidebar
+in PDF output.  The @var{label} may contain any of the following
+substitution variables:
+
+@table @code
+@item )DATE
+@itemx )ADATE
+@itemx )SDATE
+@itemx )EDATE
+The current date in format @code{DD-MMM-YYYY}, @code{MM/DD/YYYY},
+@code{YYYY/MM/DD}, or @code{DD.MM.YYYY}, respectively.
+
+@item )TIME
+@itemx )ETIME
+The current time in the format @code{hh:mm:ss}, using a 12-hour or
+24-hour clock, respectively.
+
+@item )INDEX
+The number of objects modified so far: 1 for the first object, 2 for
+the second, and so on.
+
+@item )LABEL
+The existing label text.
+@end table
+
+For example, to add an index at the beginning of each object's label,
+use @option{--set-label=')INDEX. )LABEL'}.
+
+@item --set-title=@var{title}
+Sets the titles of selected table objects to @var{title}, which
+supports the same substitution variables as @option{--set-label}.
+
+@item --transpose
+Transposes rows and columns of selected table objects.
+
+@item --table-look=@var{file}
+Reads a table style from @var{file} and applies it to selected table
+objects.  The file should be a TableLook @file{.stt} or @file{.tlo}
+file.
+
+@item --set-comment=@var{comment}
+Sets the comment on the selected table objects to @var{comment}.
+Comment text appears as a tooltip when the user hovers over the table
+in the PSPPIRE output viewer window or in exported HTML.
+@var{comment} supports the same substitution variables as
+@option{--set-label}, plus 
+
+
+@end table
+
+@table @option
+@item -O format=@var{format}
+Overrides the format inferred from the output file's extension.  Use
+@option{--help} to list the available formats.  @xref{Invoking PSPP},
+for details of the available output formats.
+
+@item -O @var{option}=@var{value}
+Sets an option for the output file format.  @xref{Invoking PSPP}, for
+details of the available output options.
+
+@item -F
+@itemx --force
+By default, if the source is corrupt or otherwise cannot be processed,
+the destination is not written.  With @option{-F} or @option{--force},
+the destination is written as best it can, even with errors.
+@end table
+
 @node The pspp-output get-table-look Command
 @section The @code{get-table-look} Command