From 182562fe5e01b0e24a6efdf3700a5d17c4585b7b Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 4 May 2014 08:50:02 +0300 Subject: [PATCH 1/1] Add off script --- Makefile.PL | 9 ++++++--- off | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) create mode 100755 off diff --git a/Makefile.PL b/Makefile.PL index 782f910..7f39996 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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 ', + 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 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, L + +=head1 AUTHOR + +Marius Gavrilescu, Emarius@ieval.roE + +=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 -- 2.39.2