SVN: toys/rsget.pl/Get/.template

sparky sparky at pld-linux.org
Tue Oct 13 20:01:35 CEST 2009


Author: sparky
Date: Tue Oct 13 20:01:35 2009
New Revision: 10779

Added:
   toys/rsget.pl/Get/.template
Log:
- very simple getter template


Added: toys/rsget.pl/Get/.template
==============================================================================
--- (empty file)
+++ toys/rsget.pl/Get/.template	Tue Oct 13 20:01:35 2009
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+name: [NAME]
+short: [NAME]
+uri: qr{gsite\.com/}
+status: OK [DATE]
+
+start:
+	GET( $-{_uri} );
+
+	ERROR( "file not found" )
+		if /404/;
+
+	! m#(.+?) \| ($STDSIZE)#;
+	INFO( name => $1, asize => $2 );
+
+	MULTI() if /You are downloading/;
+
+	RESTART( $1 * 60, "free limit reached" )
+		if /try again in (\d+) minutes/;
+
+	! /href="(.*?)"/;
+	$-{file_uri} = $1;
+
+	! /var wait = (\d+);/;
+	WAIT( $1, "starting download" );
+
+	DOWNLOAD( $-{file_uri} );
+
+# vim:ts=4:sw=4


More information about the pld-cvs-commit mailing list