Skip to content

CliCompiler how to parse folder

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

parse-folder

DescribeCompilerCLI parse-folder "C:\parse\path\input\" "C:\result\path\output.json"
dsonly=true toponly=false onerror=ignore
input-password="qwertyi" output-password="qwertyo" log-password="qwertyl"
language-version=1.0 translator=JSON verbosity=low beautify=true logfile="C:\parse\path\log.txt"
censor auto theme=DBLUE

parse-folder PARSE_PATH RESULT_PATH [ dsonly=<verb> ][ toponly=<verb> ][ onerror=<verb> ] [ input-password=INPUT_PASSWORD ][ output-password=OUTPUT_PASSWORD ][ log-password=LOG_PASSWORD ] [ language-version=<verb> | lang-ver=<verb> ][ translator=(TARGET_LANGUAGE | TRANSLATOR_NAME) ] [ beautify=<verb> ][ verbosity=<verb> | log-verbosity=<verb> ] [ logfile=LOG_PATH | log-file=LOG_PATH ][ theme=<verb> ][ censor ][ auto ]

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.

  • 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.

  • input-password
    The Describe Transpiler Cli v1.0 now supports working with encrypted files. The input-password is used to provide a password that will be used to decrypt encrypted source files (with the file extention '.denc') before trying to parse them (Which will fail if the password is incorrect or if the file has been encrypted with a different tool that uses incompatible encryption algorithm/implementation).

  • output-password
    The Describe Transpiler Cli v1.0 now supports working with encrypted files. The output-password is used to provide a password that will be used to encrypt the output file (transpilation result).

  • log-password
    The Describe Transpiler Cli v1.0 now supports working with encrypted files. The log-password is used to provide a password that will be used to encrypt the log file as to prevent leaking secret information in the logs, in cases where working with encrypted data and utilizing log files.

  • language-version
    Can also be written as lang-ver. The language-version specifies what Describe version to be used as a default. However, if the file to be parsed contains a language-version directive, this flag will be overwritten. Expected values are - 0.6 or 06, 0.7 or 07, 0.8 or 08, 0.9 or 09, 1.0 or 10, 1.1 or 11. If not specified, the default is Describe v1.0.

  • translator
    Either the desired output language or the name of the translator to be used. The logic here is simple - each language has a default inbuilt translator for it, and that translator will be used if only the desired output language is specified. Expected values are: for languages - JSON, HTML, XML, SQL; for translator names - HTML_PLAIN, HTML_PAGE, XML_PLAIN, SQL_FILEFILL, JSON_BASIC, JSON_LISTIARY. If not specified, the default is HTML_PAGE.

  • beautify
    Whether the output should be beautified/formatted with new lines and indentation. The logic behind it is that if you are going to manually work with the transpiled output, you would probably want it in an appropriate format, but if not, the extra whitespace is undesirable as it only bulks up the data. This is supported on per-translator basis, although most translators support this. Expected values are: true and false. Default is false.

  • 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.

  • censor
    The censor flag provides a way to cover up some sensitive data. For example, I might have a personal list that is absolutely fine for my use. However, if I need to share it publicly, I might want to edit out some of my private or sensitive information. The censor flag is just a way to do that. The way this works is that users use the {sensitive}, {secret} and {hidden} decorators in their describe source code, and when they need to get a censored output, they use the censor flag. {sensitive} entries will have every character that is not a whitespace replaced with a question mark. {secret} and {hidden} will completely hide the data - {secret} will produce a random number of black squares and {hidden} will produce some random-length gibberish text. This is implemented per translator though, and not every translator might support this flag. Currently it is supported only in the inbuilt HTML translators.

  • auto
    The auto flag specifies that the tool is being invoked from a script or a tool. Essentially it removes stuff like changing console colors and prompts like Press any key to exit., as those can break or complicate automated scripts and tools.

  • theme
    The CLI Transpiler now supports different color themes, via this flag. Expected values are: DBLUE, LBLUE, GREEN, PASTEL, EARTH, CONTRAST, DEFAULT, VIOLET and CYAN.

Links

Back

Clone this wiki locally