Skip to content

CliCompiler how to

Viktor Chernev edited this page Feb 10, 2024 · 4 revisions

The Describe Compiler CLI is a text-based app that provides a command line interface for the API compiler, so that users can compile Describe source files on the command line. The app is licensed under the AGPL v3 public license.

help

DescribeCompilerCLI help
DescribeCompilerCLI -h

help | -h

The help command is used to display usage / help message

parse-file

DescribeCompilerCLI parse-file "C:\parse\path\input.ds" "C:\result\path\output.json"
translator=JSON verbosity=low logfile="C:\parse\path\log.txt"

parse-file PARSE_PATH RESULT_PATH [translator = ( TARGET_LANGUAGE | TRANSLATOR_NAME )] [verbosity= ( l | low | m | medium |h | high)| log-verbosity= ( l | low | m | medium | h | high)][logfile=LOG_PATH]

The parse-file command is used to parse a single file. First we specify the command, followed by the source file to be parsed and the output file path. Anything after that is optional.

  • translator
    Either the desired output language or the name of the translator to be used.

  • verbosity
    The log verbosity of the app. Same as log-verbosity. l or low for low verbosity, m or medium for medium verbosity or h or high for high verbosity. Low is default.

  • logfile
    Specifies path of directory or file to output logs to. If not specified, logs will be outputted only to the console, which is the default.

parse-folder

DescribeCompilerCLI parse-folder "C:\parse\path\input\" "C:\result\path\output.json"
translator=JSON dsonly=true toponly=false onerror=ignore
verbosity=low logfile="C:\parse\path\log.txt"

parse-folder PARSE_PATH RESULT_PATH [translator = ( TARGET_LANGUAGE | TRANSLATOR_NAME )][dsonly= ( true | false ) ][toponly= ( true | false ) ][onerror= ( stop | ignore )][verbosity= ( l | low | m | medium |h | high)| log-verbosity= ( l | low | m | medium | h | high)][logfile=LOG_PATH]

The parse-folder command is used to parse a directory full of Describe source files (.ds files). First we specify the command, followed by the source directory to be parsed and the output file path. Anything after that is optional.

  • translator
    Either the desired output language or the name of the translator to be used.

  • dsonly
    Whether to omit files that are not Describe source files (.DS). true or false. Default is true.

  • toponly
    Whether to parse files in child directories or not. true or false. Default is false.

  • onerror
    What to do when there is an error in source code. stop or ignore. Default is stop.

  • verbosity
    The log verbosity of the app. Same as log-verbosity. l or low for low verbosity, m or medium for medium verbosity or h or high for high verbosity. Low is default.

  • logfile
    Specifies path of directory or file to output logs to. If not specified, logs will be outputted only to the console, which is the default.

Links

Describe Compilation
Use the API version
Use the AWS version