Added plugin support for Dequoter
All checks were successful
Release Build / build (push) Successful in 6m59s

This commit is contained in:
Leon Mika 2026-09-07 01:09:21 +00:00
parent cb9c05a57b
commit ac437b7409
5 changed files with 528 additions and 1 deletions

View file

@ -10,6 +10,27 @@ where all your chances will be lost when you close it.
This project uses [Wails](https://wails.io) to build a desktop application with a Go backend and a Vite frontend.
## Plugins
Dequoter can be extended with new filters written in [UCL](https://ucl.lmika.dev).
On startup, if the directory `$HOME/.config/dequoter/plugins` exists, every file ending in `.ucl`
found in it (including subdirectories) is evaluated. Filters are defined with the `d:filter` builtin:
```
d:filter "String: To Upper Case" { |in|
strs:to-upper $in
}
```
`d:filter` takes a label, which is what appears in the command palette (Cmd+P), and a proc. The proc is
called with the text to process as its only argument. The result of the proc becomes the filter output:
strings are used as-is, other values are converted to their string form, and a proc that returns nothing
is reported as an error. Errors raised with `error` are shown in the status bar.
A plugin filter with the same label as a built-in filter replaces it in the palette. If two plugin files
define the same label, the one loaded later wins (files are loaded in lexical path order). Files that
fail to load are skipped and reported in the status bar; the remaining files are still loaded.
## Download
[Download Release](/dequoter-darwin-arm64.zip)