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

sparky sparky at pld-linux.org
Tue Nov 3 18:19:18 CET 2009


Author: sparky
Date: Tue Nov  3 18:19:17 2009
New Revision: 10937

Added:
   toys/rsget.pl/Image/.template   (contents, props changed)
Log:
- new simple template


Added: toys/rsget.pl/Image/.template
==============================================================================
--- (empty file)
+++ toys/rsget.pl/Image/.template	Tue Nov  3 18:19:17 2009
@@ -0,0 +1,30 @@
+# $Id$
+# Image::[NAME] - Image getter plugin for rsget.pl
+#
+# 2009 (c) ??? <???@???.??>
+#		This program is free software,
+# you may distribute it under GPL v2 or newer.
+
+name: [NAME]
+short: I:[NAME]
+uri: qr{isite\.com/}
+slots: max
+status: OK [DATE]
+
+start:
+	GET( $-{_uri} );
+
+	! m{<title>(.*?)</title>};
+	my $fname = de_ml( $1 );
+	$fname =~ s{/}{_}g;
+	$fname .= ".jpeg";
+
+	! m{resolution: (\d+x\d+)};
+
+	INFO( name => $fname, quality => $1 );
+
+	! m{<img src='(.*?)'>};
+	my $file_uri = $1;
+	DOWNLOAD( $file_uri );
+
+# vim: filetype=perl:ts=4:sw=4


More information about the pld-cvs-commit mailing list