Okay, here's the small & ugly splitfile client in perl.
You have to retrieve the Meta-Splitfile, e.g. KSK at movie.avi
with option -v 4 to get a dump of all the parts. This output
is then piped to the perl script which will retrieve one part
after another in sequential order, storing each part on disk.
Some assembly required! :-)
----->
if ( $_ =~ /^SplitFile.Block.(.+)=freenet:(.+)$/ ) {
if ( ! -e "file.$1" ) {
print("$ENV{FCPGET} '$2' file.$1\n");
}
}
<-----
Sample usage (bashism):
clients/fcpget -v 4 KSK at movie.avi | FCPGET='clients/fcpget -h 99' \
perl -n get.pl | sh -
To assemble the files:
if ( $_ =~ /^SplitFile.Block.(.+)=freenet:(.+)$/ ) {
print("cat file.$1 >>movie.avi\n");
}
Maybe I'll add a way to retrieve the files in random order
tomorrow...
--
Volker Stolz * vs at foldr.org * PGP + S/MIME
_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl