Previous: , Up: Gcal Utilities   [Contents][Index]


B.3 Invoking gcal2txt

The Gcal2txt program creates a verbatim text file from a Gcal resource file. Its arguments are as follows:

gcal2txt [--help | --version] | [resource-file|-]

If no resource-file argument is given or/but a single ‘-’ character, the program reads and processes all input received from the standard input channel. All results are always shown on the standard output channel. An exit status of 0 means all processing is successfully done, any other value means an error has occurred.

The sense and purpose of Gcal2txt is to retrieve all additional texts, which are put into the output by means of the Txt2gcal program.

The program accepts the following options:

--help

Print a usage message listing all available options, then exit successfully.

--version

Print the version number, then exit successfully.

Here comes an example how to use Gcal2txt. For that purpose, let us use the resource file tdemo-1.rc of the previous section (see Invoking txt2gcal), which was created by means of the Txt2gcal program from a text file and which looks like this:

$ txt2gcal tdemo-1.txt 0*d1#999 > tdemo-1.rc
$ cat tdemo-1.rc
-| 0*d1#999 \        Hi friends,~\
-| ~\
-| I'm the demo text containing funny characters and character~\
-| sequences like \~\~ \\~ % %% \$a $1 %%%\ ~\
-| %\ \%s %\%foo \%bar \\%Baz \\\~ \\~\ and so on...~\
-| I'm be anxious how I'll be transformed by `txt2gcal'.~\

Now let us see, how this resource file will be processed by Gcal2txt:

$ gcal2txt tdemo-1.rc
-|         Hi friends,
-|
-| I'm the demo text containing funny characters and character
-| sequences like ~~ \~ % %% $a $1 %%%\
-| %\ %s %%foo %bar \%Baz \\~ \~\ and so on...
-| I'm be anxious how I'll be transformed by `txt2gcal'.

Previous: , Up: Gcal Utilities   [Contents][Index]