Depreciate argument parsing code in favour of argbash
I love and use the other features of bash3boilerplate. But I found https://argbash.io/ and it has completely replaced my usage for argument parsing, it is a vastly superior implementation.
That's a lot of docs to read, do i understand that we'd need to ship dependencies with bash3boilerplate? while i think our implementation isn't the prettiest, i think not requiring dependencies is a nice thing of b3bp? https://argbash.readthedocs.io/en/stable/install.html#install
Nope, there's no need to ship anything with the resulting script.
Fundamentally, its a m4 preprocessor that generates bash code upon being processed.
For example, I just wrote these lines: https://github.com/CobraLab/iterativeN4_multispectral/blob/master/iterativeN4_multispectral.sh#L3-L29
And then I do:
argbash iterativeN4_multispectral.sh -o iterativeN4_multispectral.sh
And it generated all the code you see in these lines: https://github.com/CobraLab/iterativeN4_multispectral/blob/master/iterativeN4_multispectral.sh#L30-L289
If I update my command-line specification, I just rerun the command, and it rewrites the parser.
Okay so it's a bit like you would need a transpile step before you could run the bash script. We'd also need m4 to be installed everywhere. Is it ubiquitous?
I'm tempted to go along with this proposal so that we can remove the beast that our cli parsing has grown into, but at the same time, much of the appeal of b3bp was (and is to me still at least) that it can run on any thing that has bash3, no strings attached :thinking:
Okay so it's a bit like you would need a transpile step before you could run the bash script. We'd also need m4 to be installed everywhere. Is it ubiquitous?
m4 is part of the "build-essential" of Ubuntu, it's a pretty classic piece of software that you should find on any machine with development happening. I love b3bp for the other features, but argbash's parser is just so vastly superior that I wonder why we should be duplicating the effort.
Needing to do transpiling before you can run a script is a big step to introduce for the community at large tho would you agree?
Sent from mobile, pardon the brevity.
On 5 Nov 2019, at 15:28, Gabriel A. Devenyi [email protected] wrote:
Okay so it's a bit like you would need a transpile step before you could run the bash script. We'd also need m4 to be installed everywhere. Is it ubiquitous?
m4 is part of the "build-essential" of Ubuntu, it's a pretty classic piece of software that you should find on any machine with development happening. I love b3bp for the other features, but argbash's parser is just so vastly superior that I wonder why we should be duplicating the effort.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Well the transpiling is only needed once, for the person writing the script, after that argbash generates/embeds the parser in regular bash code. transpiling is only needed again if one modifies the definitions of the parser and needs to update the code.
I realize that but it’s already a big thing to introduce for a project that embraces the archaic nature of bash and “no compilers” etc
Sent from mobile, pardon the brevity.
On 6 Nov 2019, at 14:33, Gabriel A. Devenyi [email protected] wrote:
Well the transpiling is only needed once, for the person writing the script, after that argbash generates/embeds the parser in regular bash code. transpiling is only needed again if one modifies the definitions of the parser and needs to update the code.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.