]> iEval git - www-offliberty.git/commitdiff
Add off script
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 4 May 2014 05:50:02 +0000 (08:50 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 4 May 2014 06:06:25 +0000 (09:06 +0300)
Makefile.PL
off [new file with mode: 0755]

index 782f9101addeeed2d53ef7ac5a887c9624482c2e..7f399966758b27cf2a26c9519089795216a4bb01 100644 (file)
@@ -1,17 +1,20 @@
 use ExtUtils::MakeMaker;
+use 5.014000;
 
 WriteMakefile(
        NAME             => 'WWW::Offliberty',
        VERSION_FROM     => 'lib/WWW/Offliberty.pm',
        ABSTRACT_FROM    => 'lib/WWW/Offliberty.pm',
        AUTHOR           => 'Marius Gavrilescu <marius@ieval.ro>',
+       EXE_FILES        => ['off'],
        MIN_PERL_VERSION => '5.14.0',
        LICENSE          => 'perl',
        SIGN             => 1,
        PREREQ_PM        => {
-               HTML::TreeBuilder => 0,
-               LWP::UserAgent => 0,
-       },
+               qw/Getopt::Long      0
+                  HTML::TreeBuilder 0
+                  LWP::UserAgent    0/
+                },
        META_ADD         => {
                dynamic_config => 0,
                resources      => {
diff --git a/off b/off
new file mode 100755 (executable)
index 0000000..c0f018e
--- /dev/null
+++ b/off
@@ -0,0 +1,47 @@
+#!/usr/bin/perl -w
+use v5.14;
+
+use Getopt::Long qw/GetOptions/;
+use WWW::Offliberty qw/off/;
+
+my %params;
+$, = "\n";
+GetOptions ('param=s' => \%params);
+say off shift, %params;
+
+__END__
+
+=encoding utf-8
+
+=head1 NAME
+
+off - Offliberate this
+
+=head1 SYNOPSIS
+
+  off 'http://vimeo.com/whatever'
+  off --param video_file=1 'http://youtube.com/watch?v=something'
+  off --param param1=value1 --param param2=value2 link_to_offliberate
+
+=head1 DESCRIPTION
+
+off is a command-line interface to the offliberty.com download service. It prints a list of download URLs for a given resource (e.g. a youtube video). You can also send parameters using the C<--param> argument.
+
+=head1 SEE ALSO
+
+L<WWW::Offliberty>, L<http://offliberty.com>
+
+=head1 AUTHOR
+
+Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2013 by Marius Gavrilescu
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.18.1 or,
+at your option, any later version of Perl 5 you may have available.
+
+
+=cut
This page took 0.034098 seconds and 4 git commands to generate.