PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Demo package guide

Use four small actions to transform text, write a file, wait, and find matching files.

Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested. See Packages.

Jump to actions

Prerequisites

Actions

Find files (glob)

List files in a folder that match a pattern, like *.txt.

Inputs

IDFieldType; default; requirementUse
rootrootStringdefault ""optionalThe folder to search, for example samples⁠. Empty: the Run's working folder. A short path starts there.
patternpatternStringdefault **/*optionalA pattern like **/*.txt⁠. * matches in one folder level, ** in all subfolders. The default **/* finds all files.

Outputs

IDTypeResult / editor field
filesListThe matching file paths, sorted, from root⁠. Field: files⁠.

Example

Create samples/a.txt, samples/sub/b.txt and samples/skip.md. Set root=samples and pattern=**/*.txt. Put files in $textFiles$.

Expected result

$textFiles$ is ["a.txt","sub/b.txt"]. The paths start at root and are sorted A to Z. No match gives [].

Back to actions

Sleep (sleep)

Wait a number of milliseconds. Stopping the Run ends the wait.

Inputs

IDFieldType; default; requirementUse
msmsNumberdefault 0optionalWhole milliseconds, for example 250⁠. 0⁠: no wait. -1⁠: wait until the Run stops. Values below -1 fail.

Outputs

None.

Example

Set ms=250. Put the next step after Sleep.

Expected result

The next step starts after about 250 ms.

Back to actions

Uppercase (upper)

Change text to capital letters, for example before you compare it.

Inputs

IDFieldType; default; requirementUse
texttextStringdefault ""requiredText, can hold variables. See Prerequisites.

Outputs

IDTypeResult / editor field
resultStringThe text in capitals. Field: result⁠.

Example

Create String $name$ with value world. Set text=hi $name$. Put result in $greeting$.

Expected result

$greeting$ is HI WORLD. Digits and punctuation stay the same. An empty String variable gives an empty String. An empty text field fails.

Back to actions

Write file (writeFile)

Write text to a file. An existing file is replaced, so test with a file you can lose.

Inputs

IDFieldType; default; requirementUse
pathpathStringdefault ""requiredThe file to write, for example samples/hello.txt⁠. A short path starts in the Run's working folder. The folder must exist.
texttextStringdefault ""optionalText, can hold variables. See Prerequisites.

Outputs

None.

Example

Create the samples folder first. Set path=samples/hello.txt and text=hello.

Expected result

samples/hello.txt contains exactly hello, in UTF-8, with no added newline. A missing folder or no write permission fails.

Back to actions