SVN: toys/rsget.pl/Link/.template
sparky
sparky at pld-linux.org
Tue Oct 13 20:03:46 CEST 2009
Author: sparky
Date: Tue Oct 13 20:03:46 2009
New Revision: 10780
Added:
toys/rsget.pl/Link/.template
Log:
- simple template
Added: toys/rsget.pl/Link/.template
==============================================================================
--- (empty file)
+++ toys/rsget.pl/Link/.template Tue Oct 13 20:03:46 2009
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+name: [NAME]
+short: L:[NAME]
+uri: qr{lsite\.com/}
+slots: max
+status: OK [DATE]
+
+pre:
+ use MIME::Base64;
+
+ sub decrypt
+ {
+ ...
+ return $decrypted;
+ }
+
+start:
+ GET( $-{_uri} );
+
+ my @list;
+ push @list, $1 while s/link: '(\d+-[0-9a-f]+)';//;
+
+ ERROR("no links") unless @list;
+
+ $-{list} = \@list;
+ $-{outlist} = [];
+
+stage_get_link:
+ GET( "getlink",
+ post => { link_id => shift @{$-{list}} },
+ keep_referer => 1 );
+
+ my $uri = decrypt( $_ );
+ push @{$-{outlist}}, $uri;
+
+ GOTO stage_get_link if @{$-{list}};
+
+ LINK( @{$-{outlist}} );
+
+# vim:ts=4:sw=4
More information about the pld-cvs-commit
mailing list