[sword-devel] A replacement for ftpparse

Aaron Rainbolt arraybolt3 at gmail.com
Fri Sep 29 05:00:49 EDT 2023


For those who have read the earlier discussion about the license audit, 
I wanted to do something to help with the presence of the non-free 
ftpparse code in SWORD. This is my initial attempt:

https://github.com/ArrayBolt3/FreeFTPParser

While this parser only can handle UNIX LIST output, I believe this 
should be sufficient at least to begin with since I haven't been able to 
even find documentation on the other formats, or even publicly available 
servers that use those other formats (though admittedly my search wasn't 
too deep). I'm pretty sure ftp.crosswire.org uses the UNIX format (it 
sure looks like it if I browse around using BSD ftp, which shipped with 
my Kubuntu installation). FreeFTPParser is API-compatible with the 
original ftpparse - the idea is that the new ftpparse.h and ftpparse.c 
can be dropped in place of the old ones and everything should just work.

This library needs A LOT of testing before it can be deployed in actual 
use, but it seems to not instantly fall over and segfault if you feed it 
corrupted data. Consider it alpha-quality. I'll be doing more testing in 
the coming days Lord willing (I might even try to build it into SWORD 
and see what happens :D).

Anyway, hopefully this should provide a way to get ftpparse out of 
SWORD. I licensed it as 0BSD since that allows pretty much anyone to do 
anything with it (so it should be usable anywhere ftpparse is currently 
in use), but if the SWORD devs would prefer, I'd be happy to make it 
GPLv2 instead.

Hope this is useful! Have a blessed day!

Aaron



More information about the sword-devel mailing list