The Epeios project
http://www.epeios.org/
Back Partner: 1PLs (3-month loan)

The 'reveal' user manual.

  1. Name
    1. Synopsis
      1. Description
        1. Return values
          1. Reporting bugs
            1. Author
              1. Standard conformance

                Name

                reveal - replaces tags in a file by text or file content.

                Synopsis

                reveal [-r|--reveal] [options] <tags description file> [<source file> [<destination file>]]
                reveal --help
                reveal --version

                Description

                reveal parses a file and replaces all tags in it with a text or the content of a file.

                The tags description file is a file which contains the tag names and their values. There are 2 formats possible for this file.
                In the first format, for each line, the first column contents the tag name, and then come, separated by one or more tabulation, the corresponding tag value. If the first character after the tabulation is a &, the tag would be replaced by the following text. If it is a %, the following text is the name of the file which content will replace the tag.
                In the second format, the first non-empty line contains the tag names, separated by one or more tabulations. The following lines contain the tag values. Each line must have as much tag values as tag names in the first line. For each line, the input file will be written to the output file with them tags replaced by the given value, following the same rule as before (& for a text, % for a file).
                If you put a # at the beginning of a line, or directly after a tabulation, this # and the rest of the line would be ignored.

                The source file is the file where the tags are replaced before written to the ouput file. If none given, the standard input is used.
                A tag is constituted by letters, digit and/or the _ character, and is case sensitive. Each tag in the source file must have an entry in the tag description file, unless it's a special tag.
                Here are this special tags :
                • _SKIP_ : from this tag, the input file isn't written to the output file, until encountering a _PRINT_ or an _END_ tag.
                • _PRINT_ : the input file is, from this point, written to the output file. This is usually used after a _SKIP_ tag or when using the -s or --skip option.
                • _END_ : the rest of the input file isn't handled at all.
                • _RAW_ : the rest of the input file is written as is, without replacing tags.
                • _DATE_ : current date.
                • _TIME_ : current tile.
                • _NAME_ : name of the program.
                • _AUTHOR_ : name of the author.
                • _EMAIL_ : e-mail of the author.
                • _LINK_ : link to the Epeios project.

                In the tag description file, you can't define a tag beginning with the _ character, except for the 4 first special tags listed before.

                The destination file is the file in which the input file is written, with its tag replaced. If none given, then the standard output is used.

                Options can take following values :
                • -d, --delimiter CHAR : CHAR becomes the tag delimiter in the source file. $ is the default one.
                • -s, --skip : input file is not written to the output file until it encounters a _RAW_, or a _PRINT_ tag.
                • -t, --text CHAR : CHAR becomes the text marker in the tags description file. & is the default.
                • -f, --file CHAR : CHAR becomes the file marker in the tags description file. % is the default one.
                • -c, --comment CHAR : CHAR becomes the comment marker in the tags description file. # is the default one.

                Return values

                reveal returns following values upon completion :
                • 0 : completed successfully.
                • other value : an error occurs.

                Reporting bugs

                Report bugs to Claude SIMON (csimon@webmails.com).

                Author

                reveal was developed by Claude SIMON (csimon@webmails.com).

                Standard conformance



                Copyright © 2023 www.epeios.org.
                All rights reserved.
                Back Last modified :18/06/2001 09:43:36