Filters page

From TED Notepad
This section is up to date for TED Notepad version 6.3.1.0.
Control page Control:dialog:Settings:Filters

The Filters page allows to manage, add, remove or edit Text Filters. See Text Filters for further details.

The New button allows to add new entry into the list of Text Filters, the Edit button allows to modify any entry within the list and the Delete button removes selected entry from the list. Use the Up and Down buttons to move individual entries within the list and thus within the Text Filters menu.

Note: The New and Edit buttons invoke the Settings:Filters:Filter definition dialog, which is described below. Note: See Text Filters as well for further details about filters.

Note: All changes to the list of Text Filters must be confirmed by confirming the Settings dialog. If the Settings dialog is cancelled, any recent changes to the list of Text Filters are discarded.

Settings:Filters:Filter dialog fields and options

The Name field is the name of the filter, as it appears in the Text Filters menu roster.

The Command field contains the command to be executed upon filter invocation. Variables in this command are replaced by actual values.

The Description field contains description of the command shown upon filter invocation. It should contain filter documentation and other relevant information, available arguments and expected variables, etc.

The Skip launch dialog option tells that the filter needs no user input upon invocation and should be launched directly.

Note: If the command contains any variables, they are populated with empty strings.

The Push input option tells to populate the input of the filter with text selected upon such invocation.

Note: This is default behaviour for most text-processing filters. However, filters which process filenames rather than selections or receive the selection as an argument often do not read the input.

Note: See Ignore return code option below as well.

The Capture output option tells to retrieve the output of the filter and use it to replace the selection or display it as a message.

Note: This is default behaviour for most text-processing filters. However, filters which process filenames rather than selections often do not produce any relevant output at all.

Note: See Ignore return code option below as well.

The Mix stdout/stderr option tells to mix standard output and error output of the filter together. By default, standard output is used to replace the selection and error output for displaying messages upon filter errors and failures. However, some filters may use standard and error output in a different fashion and the user may need to mix these two together into one stream.

Note: The mixing is done directly on the system level, by using the same pipe for both output ends, thus the mixed output resembles the original chronological order. However, some programming languages (e.g. Java) might buffer the outputs separatelly before flushing to the system pipes, thus potentially re-ordering the text. Such problem has to be dealt with within such languages.

The Display as message option tells to display the results as a message instead of replacing the current selection with it.

The UTF-8 option tells to encode the selection in UTF-8 before pushing it into the filter and also decode the results before replacing the selection or displaying them in a message.

Note: Both input and output has to be UTF-8, or neither. It is not possible to push UTF-8 and read ANSI for example.

The Ignore return code option tells to disregard the return code of the filter and accept whatever results it produces as success.

  • If no output is expected from the filter (Capture output), TED Notepad does not wait until the filter finishes. It allows the user to continue working with the document as soon as all input is pushed into the filter.
  • If no input is expected by the filter (Push input), TED Notepad does not wait until the filter finishes. It allows the user to continue working with the document as soon as output is closed by the filter.
  • If no output and no input is expected, TED Notepad allows the user to continue working with the document immediatelly, even while the filter continues running in the background.

The But wait until finished option allows to disregard the return code, push no input, read no output, yet still wait until the filter finishes, before TED Notepad allows the user to continue working with the document.

The Exit when done option tells to invoke the Exit right after the filter finishes and its results are processed, if any. Note: The Exit might ask for saving the document before exiting.

The Without saving option tells to invoke the Exit without saving! instead of common Exit after the filter finishes.