3 ms·
I've needed such functionality often enough that i wrote a small utility[0] that uses my LIL scripting language[1] (similar to Tcl) to process some text and hav
by badsectoracula 5y ago
I've needed such functionality often enough that i wrote a small utility[0] that uses my LIL scripting language[1] (similar to Tcl) to process some text and have its output. A couple of examples are in the shots [2][3] (note that as this is written in Lazarus it also works under Linux and Mac too, though the site only has a Windows executable).
Before that i used to write scripts or even full programs (in Free Pascal which has some simple string handling) to do similar processing and i did find it much more cumbersome to go through that route.
Of course this only works for editing/generated/transforming text pieces (and i pretty much always use it via clipboard), for processing files i still end up writing full scripts or programs (depending on the case, if i need to preprocess stuff i use another LIL-based tool, lip[4]).
[0] http://runtimeterror.com/tools/liteproc/ http://runtimeterror.com/tools/liteproc/
[1] http://runtimeterror.com/tech/lil/ http://runtimeterror.com/tech/lil/
[2] http://runtimeterror.com/tools/liteproc/shot.png http://runtimeterror.com/tools/liteproc/shot.png
[3] http://runtimeterror.com/tools/liteproc/shot2.png http://runtimeterror.com/tools/liteproc/shot2.png
[4] http://runtimeterror.com/tools/lip/ http://runtimeterror.com/tools/lip/
- throwanem 5y agoI used to have a Perl script, bound to a key chord, that would pop a dialog box prompting for a s/// regexp-replace expression and apply it to the clipboard contents. Never got around to making it properly interactive, because I stopped needing it when I switched to Emacs and had both its native capabilities and C-u M-| available.