Posted by: vbr | Date: 2021-05-28 18:16 | IP: IP Logged
if I understand correctly, there is maybe some specification needed for the function(s) of "tool.exe" in the above example.
The mechanism of calling the plugins based on the "bat" file name and file extensions and passing the parameters is clear, but the expected internals of the actual tools.exe was sofar not clear to me (maybe I am missing something obvious).
There is some more info in the previous post:
when loading, pspad calls plugin with: "c:\temp\file.xxx" and "c:\temp\747213932.xxx"
plugin should open "c:\temp\file.xxx" decode or anything and save it as "c:\temp\747213932.xxx" and PSpad opens "c:\temp\747213932.xxx" and deletes temp file.
It's similar when saving. PSPad saves file as temp, plugin opens it, saves file as target and when finishes, PSPad deletes temp file.
Is it correct, that the actual file manipulation must then be done in that tool.exe - i.e. physically load/save the files?
The opening/saving mechanism, encoding setting etc. is completely bypassed if pluguin is present?
Thanks and regards,
Posted by: pspad | Date: 2021-05-28 18:30 | IP: IP Logged
File manipulation - open file, save it as temp for PSPad must be done in the plugin or in the BAT file.
Example for DBF file plugin:
you have DBF file and you want to edit it in PSPad as CSV/XML or any editable form
plugin must open DBF, transform it into CSV and save it into temp file given by PSPad.
PSPad opens temp file, what is CSV/XML already and can edit it
existing PDF plugin opens PDF and extract text from it for PSPad
existing PDB plugin allows you to edit (load/save) PDB files in PSPad
BAT as interface between any command line tool and PSPad allows you to transform parameters.
For example you must edit lot of wrong formated old source codes, you can use file plugin to call code beautifier in BAT when you load file and simply
copy %2 %3 when you save file
When you open your source, it will be automatically reformated by code beautifier
if %1 == -L some_beautifier --beautify --wraplines --input:%2 --output:%3
if %1 == -S copy %2 %3
Edited 2 time(s). Last edit at 2021-05-28 18:37 by pspad.
Posted by: vbr | Date: 2021-05-28 18:51 | IP: IP Logged
pspad:File manipulation - open file, save it as temp for PSPad must be done in the plugin or in the BAT file.
Thank you for this clarification,
I think, this was the main missing point for me, that these tools are expected to manipulate the files instead of the usual PSPad mechanism;
it is probably also relevant for the initial post, as that ParamTesting.exe probably doesn't have this functionality, as it only reports the parameters.
Can the file encoding, according to the PSPad setting, be somehow passed to the plugin to handle it in the same way?
Thanks and regards,
Edited 1 time(s). Last edit at 2021-05-28 18:52 by vbr.
Posted by: Professor Bernd | Date: 2021-06-02 19:52 | IP: IP Logged
pspad:I will add more information into readme file
Thanks for adding more information to the new readme file!