On 27 Jul 2019, at 21:29, William A Rowe Jr <wr...@rowe-clan.net> wrote:

> I'd think that the APT Project (Apache Portable Tools?) would be a good 
> community to kick off, and it should be independent and self organizing. It 
> should follow its own versioning and release schema, since what is best 
> practice for an API might not map 1:1 for a toolchain.
> 
> Fastest track, kick off a labs demo. Then one or two paths as a community 
> unfolds around the code, either through the incubator (great for new and less 
> familiar contributors) or sponsored by the APR project. Either way, several 
> mentors and build a group of committees and it should be very successful.
> 
> I mentioned Windows up top, but I've had just as many headaches with small 
> variances in toolchains between Linux, AIX, HPUX, BSD(s) and Solaris. This is 
> a great proposal IMO.

Moving from the theory to making this real:

https://github.com/minfrin/apr-tools

The first tool is called “endec”[1], and exposes all the APR apr_encode.h and 
apr_escape.h functions.  Generated man page is here:

https://github.com/minfrin/apr-tools/blob/main/endec/README.md

The tool’s party trick is that it can chain transformations. Here we un-base64 
something, then we immediately entity escape the 
just-decoded-and-possibly-binary thing appropriately to safely appear on a web 
page or be passed as a payload into a curl request, all without messing around 
trying to get a shell to be safe around possibly binary data.

~$ endec --base64-decode --entity-escape "VGhpcyAmIHRoYXQK"
This &amp; that

My need was for automation that could be understood by ops people, where I 
don’t want to depend on some sledgehammer like python or perl for a one line 
command in a shell script.

[1] I googled for ages trying to find a name that didn’t clash. Any pithy 
alternatives welcome.

Regards,
Graham
—

Reply via email to