prevnext   » SZS: Wiimms SZS Toolset » wkclt: Wiimms KCL Tool » wkclt cff

wkclt cff

CFF is an abbreviation of 'create flag file' and will create a flag file template for each entered source file. Wildcards and pipe characters are parsed. If the flag file already exists, only missing group names are added at the end of file.

Contents

1.   Syntax

wkclt CFF source...

2.   Options

Options
Option Param Description
--no-wildcards Disable wildcard parsing and use each filename exactly as specified.
--in-order Process the input files in order of the command line and don't delete duplicates.
-i --ignore Ignore non existing source files without warning.
-l --long Force usage of 'f(typ,variant)'. If set twice, force usage of 'a(typ,w,x,y,z)'.
-B --brief Suppress the comments with the alternative expression formats.
-d --dest path Define a destination path (directory/file). The destination - means: write to standard output.

The path may contain escape sequences: %Q is replaced by the fully qualified source name. %P and %F are replaced by the source path or by the filename. %N and %E are replaced by source filename without extension or by the source extension. Finally, %T is replaced by the default extension of the destination format.

A '?' direct behind '%' in %E and %T conversions avoid that the same extension is used twice in row.

-D --DEST path Like --dest, but create the directory path automatically.
-E --esc char Define an alternative escape character for destination files. The default is '%'. For Windows batch files it is a good choice to set '-E$'.
-o --overwrite Overwrite already existing files without warning and ignore option --number.
--number If a file already exist, append a number directly before the file extension to make the filename unique. If other numbered files already exist (ignoring case), use the maximum existing index+1. --num is a short cut.
-r --remove-dest Remove already existing files before creating it. If set, --overwrite is ignored. --rm-dest is a short cut.
-u --update Update only existing files and don't create new files. If set, --overwrite and --remove-dest are ignored.
-p --preserve Preserve file times (atime+mtime) while converting or copying files.
--no-echo Suppress output of @ECHO commands while scanning text files.
-N --no-check Do not make plausibility checks for KCL files.
-c --const list Define constant values, that are used by the internal encoders and by the numeric options as predefined global variables. This option allows a conditional encoding of text files. It can be used multiple times for multiple definitions.

The parameter is a comma separated list of terms and a term is 'name=expression'. The expression is calculated by the text parser.

--flag-file filename Define a flag file if scanning an OBJ file (KCL processing). The file name may contain %-escapes. Set it to an empty string to disable flag files at all.

The tool search the flag file in the following order until found: File defined by --flag-file; OBJ file name with replaced extension ('a.obj' becomes 'a.flag'); OBJ file name with appended extension ('a.obj' becomes 'a.obj.flag').

3.   Description

CFF is an abbreviation of »Create Flag File«. It is a flag file creation helper.

It reads a KCL or an OBJ file and creates a new flag file as template. If the flag file already exists, it is scanned and only new groups are appended at the end of the existing file.

Example:

###################################################################
##  All behind a '#' on the same line is a comment and ignored.  ##
##  See https://szs.wiimm.de/doc/kcl/flagfile for more details.  ##
###################################################################

# First, we define a flag function named f().
# This allows us to define type and variant as 2 values.
@function f # (type,variant)
    @return $1 | $2 << 5
@endfunction


# group_name                    =  flag  or  f(type,variant)
#------------------------------------------------------------
  REMAKE_MAIN-FINISHLINE        = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-GRASS1            = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-GRASS2            = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-SAND1             = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-SAND2             = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-STARTGATE         = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-STARTGATEBANNER   = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-STARTGATESTICK    = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-WATER1            = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-WATER2            = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-YELLOW1           = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-YELLOW2           = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-YELLOW3           = 0x0000  #  f(0x00,0x000) # edit this line!
  REMAKE_MAIN-YELLOW4           = 0x0000  #  f(0x00,0x000) # edit this line!