pluma like "External Tools" in my gambas :) :)
Posted: Thursday 20th January 2022 4:47am
I've only been and done it.
I added External tools to my ScriptEd editor as it's really useful.
now i've finally managed to do the same with Gambas
https://gitlab.com/bsteers4/gambas/-/tr ... rnal-Tools
It works well
it creates a dir to store the scripts in $HOME/.local/share/gambas3/
Data can be passed to the scripts with tokens...
Tokens
"$GB_FILEPATH": "Full File path",
"$GB_FILENAME": "The file name",
"$GB_DIRECTORY": "The files Directory",
"$GB_SELECTED": "Selected text",
"$GB_ALLTEXT": "All Text"
results from the script can be inserted into document or replace the whole text if it's been processed.
Undo will still work if you error
Here it is in action translating my selected text to French
(Tokens are prefixed SE_ in clip, i changed it to GB_)
it needs a bit of error handling , it currently pops a warning if the active document is a form but that is all. I want it to work on most type of opened documents. (not sure how many other workspace views might not be text)
But dang this will be useful.
I added External tools to my ScriptEd editor as it's really useful.
now i've finally managed to do the same with Gambas
https://gitlab.com/bsteers4/gambas/-/tr ... rnal-Tools
It works well
it creates a dir to store the scripts in $HOME/.local/share/gambas3/
Data can be passed to the scripts with tokens...
Tokens
"$GB_FILEPATH": "Full File path",
"$GB_FILENAME": "The file name",
"$GB_DIRECTORY": "The files Directory",
"$GB_SELECTED": "Selected text",
"$GB_ALLTEXT": "All Text"
results from the script can be inserted into document or replace the whole text if it's been processed.
Undo will still work if you error
Here it is in action translating my selected text to French
(Tokens are prefixed SE_ in clip, i changed it to GB_)
it needs a bit of error handling , it currently pops a warning if the active document is a form but that is all. I want it to work on most type of opened documents. (not sure how many other workspace views might not be text)
But dang this will be useful.