mkid and xtokid walk file trees, select source files by name, and extract tokens from source files. They accept the following options:
$ mkid -l swizzle:"-x foo" -l swizzle:--coke-bottle $ mkid --lang-option=swizzle:"-x foo" --lang-option=swizzle:--coke-bottle
Note the use of quotes when passing an option with arguments. Quoting is optional for options without arguments.
Use the ‘--help’ option to see the command-line option summary for each language.
To determine which tokens to extract from a file and store in the database, mkid calls a scanner; we say a scanner recognizes a particular language. Scanners for several languages are built-in to mkid; you can add your own scanners as well, as explained in Defining scanners.
The ID utilities determine which scanner to use for a particular file by consulting the language-map file. Scanners for several are already built-in to the ID utilities. You can see which languages have built-in scanners, and examine their language-specific options by invoking ‘mkid --help’ or ‘xtokid --help’.