SVN: toys/rsget.pl/Direct/FTP

sparky sparky at pld-linux.org
Sat Jun 26 17:04:46 CEST 2010


Author: sparky
Date: Sat Jun 26 17:04:45 2010
New Revision: 11589

Added:
   toys/rsget.pl/Direct/FTP   (contents, props changed)
Log:
- plugin for downloading files from ftp://, somewhat problematic as rsget.pl
  newer was developed with ftp protocol in mind


Added: toys/rsget.pl/Direct/FTP
==============================================================================
--- (empty file)
+++ toys/rsget.pl/Direct/FTP	Sat Jun 26 17:04:45 2010
@@ -0,0 +1,27 @@
+# $Id$
+# Direct::FTP - File getter plugin for rsget.pl
+#
+# 2010 (c) Przemysław Iskra <sparky at pld-linux.org>
+#		This program is free software,
+# you may distribute it under GPL v2 or newer.
+
+name: FTP
+short: Direct::FTP
+web: "http://rsget.pl/getters/Direct/FTP/"
+uri: qr{ftp://.*[^/]}
+slots: max
+status: OK 2010-06-26
+
+start:
+	GET( $-{_uri}, headonly => 1 );
+
+	my ( $len ) = /^Content-Length:\s*(\d+)\r?$/mi;
+	$len ||= -1;
+
+	my ( $name ) = $-{_uri} =~ m{.*/(.*)$};
+
+	INFO( name => $name, size => $len );
+
+	DOWNLOAD( $-{_uri} );
+
+# vim: filetype=perl:ts=4:sw=4


More information about the pld-cvs-commit mailing list