Projects
Multimedia
clive
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
clive.changes
Changed
@@ -1,4 +1,24 @@ ------------------------------------------------------------------- +Sun Jul 7 2012 - dnh@opensuse.org + +- update to 2.3.3 + +------------------------------------------------------------------- +Thu Aug 11 2011 - dnh@opensuse.org + +- update to 2.3.1.1 + +------------------------------------------------------------------- +Sat May 14 2011 - dnh@opensuse.org + +- update to 2.3.0.3 + +------------------------------------------------------------------- +Sun Mar 6 2011 - dnh@opensuse.org + +- update to 2.2.23 + +------------------------------------------------------------------- Thu Jan 20 06:20:19 UTC 2011 - pascal.bleser@opensuse.org - update to 2.2.22:
View file
clive.spec
Changed
@@ -1,51 +1,26 @@ # vim: set sw=4 ts=4 et nu: Name: clive -Version: 2.2.22 -Release: 0.pm.1 +Version: 2.3.3 +Release: 1.pm.1 Summary: Non-Interactive Video Extraction Utility # http://prdownloads.sourceforge.net/clive/clive-%{version}.tar.gz -Source: clive-%{version}.tar.bz2 -# pbleser: don't use explain, as it requires a newer perl(version) -Patch1: clive-backport.patch +Source: clive-%{version}.tar.gz Source99: clive-rpmlintrc URL: http://clive.sourceforge.net/ Group: Productivity/Networking/Other License: ISC/OpenBSD BuildRoot: %{_tmppath}/build-%{name}-%{version} BuildRequires: perl -BuildRequires: perl(IO::Pager) -BuildRequires: perl(BerkeleyDB) -BuildRequires: perl(Expect) -BuildRequires: perl(Config::Tiny) -BuildRequires: perl(WWW::Curl) -BuildRequires: perl(Term::ProgressBar) -BuildRequires: perl(Clipboard) BuildRequires: perl(Getopt::ArgvFile) -BuildRequires: perl(Class::Singleton) -BuildRequires: perl(version) >= 0.77 +BuildRequires: perl(Test::Pod) >= 1.00 +BuildRequires: perl-version >= 0.77 +BuildRequires: perl(JSON::XS) >= 2.3 +Requires: ffmpeg quvi Requires: perl = %{perl_version} -Requires: ffmpeg -Requires: perl(IO::Pager) -Requires: perl(BerkeleyDB) -Requires: perl(Expect) -Requires: perl(Config::Tiny) -Requires: perl(WWW::Curl) -Requires: perl(Term::ProgressBar) -Requires: perl(Clipboard) +Requires: perl-version >= 0.77 +Requires: perl(JSON::XS) >= 2.3 Requires: perl(Getopt::ArgvFile) -Requires: perl(Class::Singleton) -%if 0%{?suse_version} >= 1120 -BuildRequires: perl(HTML::Parser) -Requires: perl(HTML::Parser) -BuildRequires: perl(URI) -Requires: perl(URI) -%else -BuildRequires: perl-HTML-Parser -Requires: perl-HTML-Parser -BuildRequires: perl-URI -Requires: perl-URI -%endif BuildArch: noarch %description @@ -58,28 +33,24 @@ %prep %setup -q -%if 0%{?suse_version} < 1130 -%patch1 -%endif %__sed -i '/^auto_install/d' Makefile.PL %build +export PERL5LIB="%{perl_vendorarch}:%perl_vendorlib:$(perl -V:vendorlib_stem)" %__perl Makefile.PL PREFIX="%{_prefix}" %__make %{?jobs:-j%{jobs}} %install %perl_make_install %perl_process_packlist - %__rm -rf "%{buildroot}%{perl_vendorarch}/auto/clive" - -%__rm -f "%{buildroot}/var/adm/perl-modules/%{name}" +%__rm -f "%{buildroot}%{perl_vendorarch}/auto/.packlist" %check %if 0%{?opensuse_bs:1} export NO_INTERNET=1 %endif -%__make test +%__make PERL5LIB="%{perl_vendorarch}:$PERL5LIB" test %clean %{?buildroot:%__rm -rf "%{buildroot}"} @@ -89,6 +60,9 @@ %doc ChangeLog COPYING README %doc examples %{_bindir}/clive -%{perl_vendorlib}/clive %doc %{_mandir}/man1/clive.1%{ext_man} +%if 0%{?suse_version} < 1140 +/var/adm/perl-modules/clive +%endif +%changelog
View file
clive-backport.patch
Deleted
@@ -1,19 +0,0 @@ ---- lib/clive/Config.pm.orig 2011-01-20 07:23:47.000000000 +0100 -+++ lib/clive/Config.pm 2011-01-20 07:27:33.000000000 +0100 -@@ -40,7 +40,7 @@ - use clive::Compat; - use clive::Error qw(CLIVE_OK CLIVE_OPTARG); - --use version 0.77 (); our $VERSION = version->declare ("2.2.22"); -+use version 0.74 (); our $VERSION = version->new("2.2.22"); - - sub init { - my $self = shift; ---- t/eval-compile.t.orig 2011-01-20 07:24:08.000000000 +0100 -+++ t/eval-compile.t 2011-01-20 07:24:17.000000000 +0100 -@@ -6,4 +6,4 @@ - my $output = qx(perl -c -I./blib/lib blib/script/clive 2>&1); - - ok( $output =~ /syntax OK$/ ) -- or diag explain $output; -+ or die $output;
View file
clive-2.2.22.tar.bz2/ChangeLog.pre-gitlog
Deleted
@@ -1,963 +0,0 @@ - -2.2.18 Tue Nov 30 2010 legatvs -Changes: - - Change google test URL - - Accept dailymotion swf URLs (related b#3115846) - - -2.2.17 Sat Nov 06 2010 legatvs -Changes: - - toUnits: fix hi-speed issue, thanks to Thomas Klausner for the report - - Makefile.PL: Use VERSION_FROM - - Use 'version' module - - -Version 2.2.16 -September 28, 2010 - -Changes: - * Add support for webm_480p, webm_720p youtube - * Thanks to Mark Weaver for the patch, <http://is.gd/fmwv5> - * Misc. minor tweaks in manual (e.g. URLs, etc.) - * Migrate issue tracking from Googlecode to Sourceforge, <http://is.gd/fmylF> - - -Version 2.2.15 -September 10, 2010 - -Changes: - * New Youtube test URL - * --format, "flv" is now called "default" - * Add Youtube 1080p support (#62) - * Update Youtube format IDs to match those used with quvi - -Bugfixes: - * Vimeo support (http/404), thanks to Jonas Smedegaard for the fix (#61) - - <http://bugs.debian.org/595486> - - -Version 2.2.14 -September 2, 2010 - -Bugfixes: - * Output File path encoding (#60) - - -Version 2.2.13 -August 12, 2010 - -Changes: - * Add --license option - - -Version 2.2.12 -July 25, 2010 - -Changes: - * Mark cctv support as broken - -Bugfixes: - * youtube http/404, ported from quvi, fix by Daniel Schaal (quvi #7) - * break.com support, thanks to Werner Elsler for the fix (#57) - - -Version 2.2.11 --------------- -April 3, 2010 - -Bugfixes: - * Youtube, update patterns to reflect website changes - - -Version 2.2.10 --------------- -March 24, 2010 - -Changes: - * Add buzzhumor.com support - * Mark ehrensenf.de support as broken - -Bugfixes: - * Update --hosts format strings - * dailymotion.com - # Change format IDs to reflect website changes (yet again): - * h264-hd -> hd - * h264-hq -> hq - * removed h264 and spark-mini (no longer even listed) - # Parse title from elsewhere - * Title was previously parsed from the title HTML tag - * Which usually contained more than we cared for - # Spew out an error if the video looks like a partner video - * break.com - # Support, thanks to Werner Elsler for the fix - # Title parsing, ported from libquvi - - -Version 2.2.9 -(February 13, 2010) - - User-visible changes: - * Fix dailymotion formats - - vp6-hd -> h264-hd - - vp6-hq -> h264-hq - - vp6 -> h264 - * Fix vimeo support - # closes issue #49 - * Partial fix: cctv: dump multi-segment video links - # single-segment videos are still copied normally - # closes issue #45 (for now) - - Developer-visible changes: - * Rename CHANGES -> ChangeLog - * Add NEWS file - * Remove dead test link: - # tlinks/sload.url - # t/10sevenload.t - - -Version 2.2.8 -(December 18, 2009) - - User-visible changes: - * Remove the remains of the redtube support - * Do not replace dashes with underscores in IDs (closes issue #44) - * Sevenload: - # Fix http/401 error - # Cleanup title parsing (use config data instead) - * Croak with an error if BerkeleyDB module is not found - # And either -d or -g options are used - - -Version 2.2.7 -(September 29, 2009) - - User-visible changes: - * Fix: dailymotion id parsing - * Youtube: - # Accept -f fmt34 - # fmt34 is now treated as yet another (new?) format - # Rewrite youtube section of the FORMATS in the manual - * Fix: --format=best not working with youtube (closes issue #39) - # Thanks to Peter Baranyi for the fix - - Developer-visible changes: - * Disable: t/11redtube.t (broken, see known issues) - * "make test": ADULT_OK env.var. now enables redtube test - - Known issues: - * redtube: broken (verify -> http/404) - - -Version 2.2.6 -(September 14, 2009) - - User-visible changes: - * Fix: liveleak: "error: Unsupported protocol (http/1)" (closes #36) - * Fix: vimeo: title parsing (Thanks to Peter Baranyi for the fix, closes #37) - - Fixes title issues with accented chars - * Fix: break: http/403 (Thanks to Werner Elsler for the fix, closes #38) - - Developer-visible changes: - * t/11redtube.t: fix dead link - - -Version 2.2.5 -(August 14, 2009) - - User-visible changes: - * Add: --print-fname option - * Fix: dailymotion ID parsing - * Fix: --hosts: dailymotion: spak-mini -> spark-mini - * Zeropad ETA - - Developer-visible changes: - * Correct copyright years and notices in source code - * tlinks/youtube-utf8.url: fix dead link - - -Version 2.2.4 -(August 2, 2009) - - User-visible changes: - * Add: - # --stream-pass option (port from cclive) - # funnyhub support - * Port from cclive - # myubo support - * Port from cclive - # clipfish support - * Thanks to Patrick Hoffmann <patrick@sobran.de> for data mining - * Fix: - # Misc. typos in manual - # Redtube support (videoid/title parsing issues) - # Dailymotion: spak-mini -> spark-mini - * Change: - # replace dashes ("-") with underscores ("_") in video ids - - Developer-visible changes: - * Add: - # Host/Clipfish.pm - # Host/Funnyhub.pm - # Host/Myubo.pm - # t/16clipfish.t - # t/17funnyhub.t - # t/18funnyhub.t - # tlinks/clipfish.url - # tlinks/funnyhub.url - # tlinks/myubo.url - * Change: - # t/02youtube.t: test link (dead link) - # tlinks/ytube.url: ditto - # tlinks/multi.url: youtube: ditto - * Remove: - # tlinks/multi.lst - - -Version 2.2.3 -(July 25, 2009) - - User-visible changes: - * Add: - 1. Support spiegel.de (closes issue #32) thanks to anon for data - 2. Support golem.de (closes issue #33) thanks to anon for data - 3. ~/.clive/config path support - 4. --cookie-jar option - 5. Support for ehrensenf.de (closes issue #34) thanks to bjoern for data - * Improve: unicode support (related to issue #29) - 1. cctv: no longer requires -C and -R options (obsoletes -R) - 2. --cclass: now works as expected with unicode as well - * Improve: backwards compatibility with clive 2.0, 2.1 - 1. Allow --format=(mp4|hd|hq|3gp) (closes Debian bug #535957) - 2. Restore ~/.config/clive/config path support (closes Debian bug #535483) - 3. Add --upgrade-config (2.0/2.1 config to 2.2+ format) - * Change: - 1. --hosts prints now supported formats - 2. Pair --exec with --exec-run, the latter now triggers the former - 2.1. Closes Debian bug #520520 - 3. Relocate files - 3.1. ~/.clivelast -> ~/.cache/clive/last - 3.2. ~/.clivecache -> ~/.cache/clive/cache - 4. If HOME environment variable undefined, assume current workdir - 5. --version: print locale etc. - * Fix: - 1. --version: copyright years - 2. File suffix for CCTV (.x-shockwave-flash -> .flv) - 3. Remove "see examples" from pod markup (closes issue #30) - 4. Prevent ".$suffix" output filenames - 4.1. Use $id if !$title && %i was not defined in --filename-format - 4.2. Related to issue #29 - 5. --no-proxy: really disable all proxy use (closes issue #25) - 5.1. http_proxy setting was still used - 6. Can't call method "filename" on unblessed reference at Exec.pm line 5x - 6.1. e.g. clive URL --exec="ls;" - 6.2. Closes Debian bug #535459 - 7. Dailymotion support (closes issue #35) - 8. Redtube support (error: no match: `(?-xism:videoid=(.*?)')') - * Rename: - 1. --recall, --recall-file -> --last, --last-file - 2. CLIVE_HOME -> CLIVE_CACHE - * Remove: - 1. -R, --raw (obsoleted by improved unicode support) - 2. --home-dir option - 2.1. Missleading name - 2.2. Obsoleted by --cache-file and --last-file - * Manual page: - 1. Add note about numeric suffix (closes issue #28) - 2. Fix a number of typos, use better grammar - 3. Overhaul - - Developer-visible changes: - * Add: - * clive/Compat.pm - * clive/Host/Spiegel.pm - * clive/Host/Golem.pm - * clive/Host/Ehrensenf.pm - * t/06golem.t - * t/14spiegel.t - * t/15ehrensenf.t - * tlinks/golem.url - * tlinks/spiegel.url - * tlinks/ehrensenf.url - * New prerequisite: Config::Tiny - 1. Required by --upgrade-config - * Makefile.PL: - 1. Extract VERSION from lib/clive/Config.pm - 2. Add "use warnings/strct" - 3. chmod +x - - -Version 2.2.2 -(July 9, 2009) - - User-visible changes: - * Change: Google: --format=mp4/best - 1. Default to flv if mp4 is not available - 2. Fix --format=best support - - Developer-visible changes: - * Add: t/$host.t: NO_INTERNET variable support (closes issue #24) - * Change: t/02youtube.t test link - 1. Old dropped dead - * Remove: t/06lastfm.t - 1. t/02youtube.t: includes the same test - - -Version 2.2.1 -(June 21, 2009) - - User-visible changes: - * Add: support for Vimeo (closes issue #19) - * Add: return codes for each error case (closes issue #22) - * Fix: return code is always 0 (closes issue #20) - * Change: --hosts output now matches cclive output - - Developer-visible changes: - * Change: Cctv, Dailymotion, Liveleak -> use clive::Utils::matchRegExps - * Add: t/12error.t - - -Version 2.2.0 -(June 14, 2009) - -FOREWORD --------- - -This release is a major overhaul aimed to fix the previous design flaws -and clean up the codebase. Note that 2.2.0 breaks compatibility with -the earlier versions of clive. - -Most users will not notice much differences after upgrading to 2.2.0 -but those users who have used clive for anything more than "clive URL" -should read the changes carefully. The summary of changes section -includes more detailed changes that is recommended reading for all -users and maintainers. - -2.2.0 changes the license from ISC to GPLv3. The license was last -changed in 2.1.0 to ISC but has now been reverted back to GPLv3 after -some further consideration. - -Config::Tiny has been replaced with Getopt::ArgvFile. The latter had -some advantages over Config::Tiny that lead to the switch. For example, -instead of trying to memorize the (often confusing) config variable -names, users can now use command line options in the config file. - -This also means that everytime a new feature is added to the program, -we are no longer required to modify the code responsible for parsing -the config file. Using Getopt::ArgvFile also required adding only one -line of code to the project whereas Config::Tiny required several. - -cache no longer reads by default. This means that --cache-read option -must be invoked for clive to read previously stored video records -from the cache. The change was made after seeing how most users found -the reading from cache too confusing and frequently reported expired -link errors such as HTTP 403 as bugs even though the behaviour was -documented in the manual page. DAERTM? - ---emit-csv now outputs very few details about the videos. Only those -fields that are known to be any use are printed out. - -2.2.0 also removes a number of less used features that have lingered -in the project since the 1.x. Most of these features were never -requested and have only been burdening the program codebase since -their introduction. - -Part time hackers and/or developers will notice that clive now follows -a new OO design -- as well as Perl5 allows it. While there are still -some considerations regarding the design and limitations that could not -quite be ported from C++ used in cclive, WYSIWYG. - -Package/port maintainers will want to read the README file. The previously -used GNU Makefile is no longer used and clive installation now depends on -ExtUtils::MakeMaker instead. - -SUMMARY of CHANGES ------------------- - - User-visible changes: - - * License change - 1. ISC -> GPLv3 - 2. Last changed in 2.1.0 (-> ISC) - - * Slight improvements to program startup time - - * Config file format changes (Config::Tiny -> Getopt::ArgvFile) - 1. Command line options can now be used in config file - 2. Breaks compatibility with previous versions - 3. Cleaner and new format allows using cmdline options in configs - 4. Format was last changed in 2.0.0 - Example: - ----------------------------------------------- - # Config::Tiny: clive 2.0 - 2.1 - cat >> ~/.config/clive/config - http - proxy = "http://foo:1234" - output - savedir = "/home/user/videos" - - # Getopt::ArgvFile: clive 2.2 - cat >> ~/.cliverc - --proxy="http://foo:1234" - --savedir="/home/user/videos" - ----------------------------------------------- - - * Fix: Redtube video title parsing - - * Cache changes - 1. Cache is now passive (read:no, write:yes) - 2. Add: --cache- option prefix - 3. New option: --cache-read, --no-cache - 5. Rename: misc. options (e.g. --show -> --cache-dump) - 6. Record field changes - o Breaks compatibility with previous versions - 7. New field delimiter '#' - 8. New field order - - * File path changes - 1. ~/.config/clive/config -> ~/.cliverc - 2. ~/.config/clive/recall -> ~/.clivelast - 3. ~/.config/clive/cache -> ~/.clivecache - - * --format changes - 1. Add: --format=best support (closes issue #15 ) - 2. Rename: mp4 -> fmt18 (Youtube) - 3. Rename: Dailymotion ID spark -> flv - - * Bugfixes - 1. cURL error handling - 2. Google mp4 support - 3. Do not strip link params (closes debian bug #530659) - 4. --format=fmt6 (no longer supported by Youtube?) - 5. Dailymotion ID parsing - - * New options: - 1. --home-dir - 2. --recall-file - 3. --cache-file - 4. --no-cclass - 5. --raw - 6. --stop-after (closes issue #18) - - * --emit-csv: changes to CSV fields (cleanup, print only the necessary fields) - 1. clive 2.0 - 2.1: - page_link, video_link, filename, file_length_mb, - file_length_bytes, video_id, time_stamp, page_title, - initial_length, remaining_bytes - 2. clive 2.2: - base_filename, file_length, video_link - - * Remove options: - 1. --savebatch - 2. --renew (now obsolete) - 3. --youtube-user (broken since 2.1) - 4. --youtube-pass (...) - 5. --no-login (...) - 6. --clivepass (...) - 7. --emit-xml - 8. --background - 9. --progress - 10. --output - 11. --append - 12. --paste - 13. --format=fmt6 - - * Other changes: - 1. Long options: aliases (e.g. --output_file | --output-file | --outputfile) - 2. --filename-format: new specifiers, rename some of the old ones - 3. --format: exit with an error if id is not recognized by clive - 4. Rename: -r -> -l (--recall) - 5. Many short options have been removed (or reused) - - Developer-visible changes: - - * OO Perl5 style - - * Change: use a custom perltidyrc (closes issue #17) - - Thanks to Tong Sun <suntong001@gmail.com> - - * Prerequisite changes - 1. Written for Perl 5.10.0 - o 5.8 probably OK although unverified - 2. New prerequisites - o Class::Singleton - o Getopt::ArgvFile - 3. Removed prerequisites - o Config::Tiny - o IO::Pager - o Expect - o Clipboard - 4. Optional modules (no changes from 2.1.14) - o BerkeleyDB - o Term::ReadKey - - * Change: use decode_utf8 returned html only if html is valid utf8 - - * Installation changes - 1. Makefile.PL (ExtUtils::MakeMaker) see README - - * Remove files: - 1. Makefile (obsoleted by Makefile.PL) - 2. clive.pod (merged into bin/clive) - 3. clive.1 (generated from bin/clive) - - * Remove: binmode STDOUT, ":utf8" - - * Remove: extra decode_utf8 - - -Version 2.1.14 -(May 25, 2009) - - User-visible changes: - * Add: support for youtube-nocookie.com (closes issue #12) - * Add: fmt35 format ID for Youtube closes issue #10 (and #13) - * Fix: liveleak id parsing - * Rename: --format IDs for Youtube - ** mp4_hd -> fmt22 - ** 3gpp -> fmt17 - ** xflv -> fmt6 - * Rename: --output-video -> --output-file - * Rename: output:file -> output:filename_format (config file) - * Remove: --overwrite option (use --output-file instead) - - Developer-visible changes: - * Add: tests/ytube-nocookies.url - * Update: INSTALL - - Other: - * 2.2.0 is under development, read more here: - http://code.google.com/p/clive/wiki/WhatsNew_2_2_0 - - -Version 2.1.13 -(May 16, 2009) - - Developer-visible changes: - * Change: use perltidy defaults for style - * Change: BerkeleyDB and File::Path modules are now optional - ** Cache features depend on these modules - * Moved opted_mods initilization to init_opted_mods (-> loop) - - -Version 2.1.12 -(May 9, 2009) - - User-visible changes: - * Change: --connect-timeout, --connect-timeout-socks default -> 30s - * Fix: timeout after file transfer starts - * Fix: title parsing with custom character class (closes issue #8) - * Add: redtube support; thanks to anonprn2@gmail.com (closes issue #11) - * Fix: typo in --emit-xml --help string - - -Version 2.1.11 -(April 29, 2009) - - User-visible changes: - * Change: --youtube-pass: prompt for password if left undefined - * Change: --filename-format: default -> "%t.%s" - * Fix: "Use of uninitialized value $opts{"ytpass"} ..." - * Add new options: - ** --connect-timeout - ** --connect-timeout-socks - * Cleanup: manual page - - Developer-visible changes: - * Rename: auth_youtube subroutine -> loginto_youtube - - Known-issues: - * Youtube login does not work (throw an error, patches welcome!) - - -Version 2.1.10 -(April 4, 2009) - -NOTE: This release changes the clive status messages. This will likely -break compatibility with utilities that depend on these messages. -The changes were made to enable using abby (0.2.0+) as a front-end -for clive. - - User-visible changes: - * Add abby (front-end) compatibility - - Change output similar to cclive - - http://code.google.com/p/abby/ - * Add Youtube HD support (--format=mp4_hd) - - Thanks to bf for the patch (via FreeBSD ports) - * Add tv.cctv.com support issue #6 - - Thanks to suntong001 for data mining - * Add new options - - --limit-rate (config: http:limit_rate) - - --hosts (print supported hosts to stdout) - - --stderr (redirect all output to stderr instead of stdout) - * Improve file suffix parsing from content-type - - Rewrite the content-type handling block in query_video_length - - Use whatever is found after slash in the content-type string - - Use "flv" for exceptions (e.g. octet-*, x-flv, etc.) - * Replace dashes in video IDs with underscores before using them in fnames - * Change --version output - * Fix reading from stdin (closes Debian #522422) - - Assume reading from stdin only if queue and argv arrays are empty - * Fix exit with status code - - Exit 0 on success, and >0 if an error occurs - - Developer-visible changes: - * Update examples/config with limit_rate - * Rename: configrc -> examples/config - * Replace the monstrous if-elsif-$host code block with a loop - - -Version 2.1.9 -(March 27, 2009) - - User-visible changes: - * Fix GoogleVideo "id not found" handling - - Symptom: exit after "process page..." message - - Cause: no check for undefined id value - * Fix GoogleVideo support - - Symptom: see above fix - - Cause: HTML changes to the video pages - * Fix URI::Escape import for GoogleVideo redirects - - Symptom: crash with "Undefined subroutine &URI::Escape::uri_unescape" - - Cause: recent script start optimizations; a missing 'require' - * Fix Break support - - Symptom: "expected different content-type" - - Cause: website content-type changes - - Developer-visible changes: - * Cleanup code (style-wise) - - perltidy -gnu -l=72 - - -Version 2.1.8 -(March 24, 2009) - - User-visible changes: - * Keep URL queue order - - Remove duplicate URL checking - * Remove --modver, change --version output - * Update manual page (clive.1, clive.pod) - - Rewrite EXAMPLES section - - Cleanup other sections - * Config file: add support for output:format (--format) - * Port dailymotion support from cclive - - Developer-visible changes: - * Makefile changes: - - Replace Perl module checking with for-loops (incl. optional) - * Optimize script start time - - Replace "use $module" with "require $module" where possible - * Update LICENSE, configrc - - Cosmetic changes - - Add output:format to configrc - * Add tests/dmotion.url - - -Version 2.1.7 -(March 15, 2009) - - User-visible changes: - * Add --output-video option - * Add option groups to --help output - * Add --stream-exec and --stream options - - Ported from cclive - * Config file: add support for - - commands:exec (--exec) - - commands:stream (--stream-exec) - - See configrc for an example - * Fix --exec; should no longer spew out "not found" shell errors - * Change default filename format to "%t_%d_%i.%s" - * Change to use "file is already fully retrieved" error message - * Port resizing progressbar from cclive - - Developer-visible changes: - * Add tests/lastfm.url and tests/multi.lst - * Remove XML::Simple dependency - - Use regex instead - * Implement SIGWINCH handling - - Resize progressbar to match terminal width - - Progressbar width defaults to 80 (chars) - - OS must support SIGWINCH - - Requires Term::ReadKey module - - clive works without the module but will ignore any SIGWINCH events - * Touch cclive.1, cclive.pod, INSTALL and Makefile files - * Clean up regex - - Other changes: - * Buried clive-list, grew weary of fighting spam with bare fists - - email the author directly or use the issue tracker, thanks - - -Version 2.1.6 -(February 19, 2009) - - User-visible changes: - * Renamed the following options - - --noproxy => --no-proxy - - --noextract => --no-extract - - --nologin => --no-login - * Butchered --help output - - much less verbose now - - relocated manual page data to clive.pod - * Removed --manual option - * Obsoleted "play" and "rencode" config keys in "commands" section - * Added --exec option which resembles cclive's --exec command - * Removed --play, --noplay, --rencode and --norencode options - - use --exec instead - * Changed --paste short option from '-x' to '-p' - * Removed wmv format (breakcom) - - persistant HTTP/404 (not found) error - - Developer-visible changes: - * Makefile changes - - additional INSTALL variables - - added WITH_CHECK - - can be used to disable module checks - - removed "man" from "all" - - removed "clean" (useless) - - -Version 2.1.5 -(February 6, 2009) - - User-visible changes: - * Fixed sevenload support - - -Version 2.1.4 -(February 1, 2009) - - User-visible changes: - * Fixed Youtube login which sometimes reported failed attempts as OK - - Youtube defaults web interface language based on users ip - - clive looks for English words in the post-login page to confirm login - * Tweaked --version output - - Developer-visible changes: - * Removed metacafe remnants - * Fixed bug in time2str subroutine which caused incorrect calculations - * Updated INSTALL - * removed genman script (obsoleted by "make man") - * Added a rudimentary (GNU) Makefile - * Cleaned up translate_embed subroutine - - Other changes: - * Removed the clive-announce and clive-users mailing lists - - New release announcements will be posted via Freshmeat alone from now on - - Subscribe to the project at http://freshmeat.net/projects/clive - * Created the clive-list@googlegroups.com mailing-list - - For support questions, patches and bug reports - - Issue tracker will remain for tracking bugs - - Send an email to clive-list-subscribe@googlegroups.com to subscribe - - -Version 2.1.3 -(January 9, 2009) - - User-visible changes: - * Documented missing "%t" (--filename-format) in manual page - * Tweaked "localfile_length == remotefile_length" message - * Renamed CLIVE_CONFIGDIR environment variable to CLIVE_HOME - - Developer-visible changes: - * Cleaned up manual page - * Added LICENSE file - * Cleaned up FreeBSD details (INSTALL) - - -Version 2.1.2 -(December 29, 2008) - - User-visible changes: - * Removed "See --manual" from --version output - * Added support for evisortv - - http://code.google.com/p/clive/issues/detail?id=4 - * Fixed: reused incorrectly last http error code for remaining urls in queue - * Fixed: progressbar reported 100% even if error had occurred (e.g. http/403) - - Developer-visible changes: - * Cleaned up subroutines - - -Version 2.1.1 -(December 19, 2008) - - User-visible changes: - * Fixed "Requested range was not delivered by the server (http/33)" w/ -c - - this would occur with a batch of URLs while using the --continue option, - e.g. if the first file was continued, the following page fetches exited - with the above error - * Added --savebatch option - * Added --overwrite option - * Replaced the buggy progressbar with a "lazy man's progressbar" - * Fixed "print() on closed filehandle STDOUT" with --grep+delete - * Fixed progressbar display with --continue - - Developer-visible changes: - * Updated INSTALL - * Started to bundle src tarball with clive.1 manual page - * Added genman script which wraps pod2man with common options - * Fixed a potential div by zero bug in calc_progress - - -Version 2.1.0 -(December 10, 2008) - - NOTE: Changed license GPL3 => ISC/OpenBSD. - - User-visible changes: - * Added --modversion option - * Replaced Term::Progressbar with a built-in thermometer progressbar - * Removed --progress=bar:nominor support due to above changes - * Added liveleakcom support - - http://code.google.com/p/clive/issues/detail?id=3 - - Developer-visible changes: - * Made IO::Pager module optional - * Removed COPYING - * Cleaned up --progress option description - * Changed to require WWW::Curl 4.05+ - * Removed Term::Progress module dependency - * Fixed a potential bug in calc_progress (improper $rate init) - * Updated INSTALL - * Made Expect module optional - - -Version 2.0.0 -(December 2, 2008) - - User-visible changes: - * Fixed gvideo/mp4 support (http/404 even if the extraction link existed) - * Changed "found redirect" message - * Changed --play, --rencode status messages to use file basename - - Developer-visible changes: - * decode_utf8($page): removes extra steps, works better with HTML::TokeParser - * Added missing Expect module version to INSTALL - - -Version 2.0beta4 -(November 22, 2008) - - Notes: - This aims to be the last beta before the release of 2.0 in December 2008. - Please report any remaining bugs to the issue tracker at: - http://code.google.com/p/clive/issues/list - - User-visible changes: - * Removed metacafe support until fixed (see known issues) - * Changed Youtube login to report if there were "too many login failures" - * Fixed Youtube login support: reported failures incorrectly as OK - * Added support clivepass(1) utility (http://code.google.com/p/clive-utils) - * Added support for metacafe and sevenload embed URL translation - - Developer-visible changes: - * Added TODO file - * New prerequisite module: Expect - * Updated FreeBSD + Ubuntu details (INSTALL) - * Cleaned up some code - * Rewrote embed URL translation - - Known issues: - * Metacafe support broken (http/404) - - -version 2.0beta3 -(November 1, 2008) - - User-visible changes: - * Fixed pasting from clipboard containing multiple URLs - * Fixed page fetch progress glitch that occured with 1+ batches - * Added --agent option - * Added --proxy option - * Added --savedir option - * Added --cclass option - * Added --filename-format option - * Added --show-format option - * Added --youtube-user and --youtube-pass options - * Added --emit-xml option - * Added --progress=none|bar|dot - * Replaced --noprogress with --progress=none - * Added avg. transfer rate notification - * Fixed filename printing for existing output files (e.g. output.flv.1) - * Added --play option - * Fixed metacafe support (error: failed to extract videoCDNURL) - * Added --rencode option - - Developer-visible changes: - * Ported --emit-csv option from 1.x with minor changes - - Backwards compatible with 1.x - - Prints additional video details - - $length, $video_id, $time_stamp, $page_title, $cont_from, $remaining - * Changed to prefer 'dot' bar if the output is not a TTY - * Replaced progress bar with Term::ProgressBar (new module prerequisite) - * Cleaned up queue processing subroutine - - -Version 2.0beta2 -(October 15, 2008) - - User-visible changes: - * clive now ignores input lines that start with the '#' character - * Added support for CLIVE_CONFIGDIR environment variable - * Ported lastfm video support from 1.x - * --version now displays XML::Simple - * Changed "= Play:" to "=> Playing ..." - * Playing occurs now subsequently after going over the URL batch - - Developer-visible changes: - * Removed a google video redirect (commented out, see code) - * Added the AUTHORS file - * XML::Simple was missing as a prerequisite in INSTALL - * Made minor syntactic tweaks to the source code - * Fixed missing --quiet check with the "=> Play" message - - -Version 2.0beta1 -(September 23, 2008) - -A complete overhaul and rewrite of 1.x. - - User-visible changes: - * Users are expected to use the --continue/-c option to resume transfers - * Configuration file format (=> INI), path was changed (=> ~/.config/clive) - * All extractions now assume flv as the default download format - * Users are expected to understand when/how use the --format/-f option - * Reading input from multiple sources is possible (e.g. % clive -x URL URL) - * Added: --grep: used to grep and recall cached URL entries - * Added: --background and --output=logfile, --append=logfile options - * Many old cmdline and config options were removed due to new design - * Improved GoogleVideo support: handles redirects to other hosts - * Pager is used where needed (e.g. --show/-s) - * Changed default output file naming format to "%n-(%i)-%d.%s" - * Removed: guba (deadweight), myvideo (borked), dmotion (bitches @ anon users) - - Developer-visible changes: - * Python => Perl - - See the INSTALL file for prerequisites - * No installation: all-in-one script (excl. the 3rd party modules) - * Cache is now an integral part of clive, see CACHE in the manual page - * Embedded the --manual page (Pod) - * Improved Youtube login: removed is_adult HTTP get (done manually now) - * Grab the file suffix from the Content-Type header - * Improved GoogleVideo support: mp4 detection no more relies on English words - * Improved Metacafe support: removed unnecessary "familyfilter" HTTP get - - Other: - * Project: moved - - 2.x+ at http://googlecode.com/p/clive/ - - 1.x remains at http://gna.org/projects/clive - * Tarballs: moved - - 2.x+ at http://googlecode.com/p/clive/ - - 1.x remain at http://dl.gna.org/clive - * Website: moved - - http://clive.sf.net/ - - http://home.gna.org/clive redirects to the above - * SCM: SVN => Git - - 2.x+ at git://repo.or.cz/clive.git - - 1.x remains at svn://svn.gna.org/svn/clive - * Issue tracking: Moved - - 2.x+ at http://googlecode.com/p/clive/issues/ - - 1.x bug tracker remains at http://gna.org/projects/clive - * Created http://googlegroups.com/group/clive-announce/ - -NOTE: See http://dl.gna.org/clive/CHANGES for 1.x.
View file
clive-2.2.22.tar.bz2/examples/config
Deleted
@@ -1,23 +0,0 @@ -# clive reads ~/.cliverc by default. You can use --home-dir and -# CLIVE_HOME environment variable to change that. - -# You can add any of the supported command line options to clive -# configuration file. For example: - -#--format=mp4 -#-f mp4 -#--proxy=foo:1234 -#--cache-read -#--no-cache -#--save-dir=/home/user/videos - -# Note that the "dashed" command line options have aliases, so -# you can use any of the aliases as well, for example: - -# --no-cache -# --no_cache -# --nocache - -# If you are unsure about the command line options, see the output of -# "clive --help" output or refer to the clive manual page for a complete -# list of the supported command line options.
View file
clive-2.2.22.tar.bz2/lib
Deleted
-(directory)
View file
clive-2.2.22.tar.bz2/lib/clive
Deleted
-(directory)
View file
clive-2.2.22.tar.bz2/lib/clive/App.pm
Deleted
@@ -1,256 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::App; - -use warnings; -use strict; - -use base 'Class::Singleton'; - -use clive::Log; -use clive::Error qw( - CLIVE_OK - CLIVE_NOTHINGTODO - CLIVE_NOSUPPORT - CLIVE_READ -); -use clive::Config; -use clive::Curl; -use clive::Cache; -use clive::Exec; - -sub new { - my $class = shift; - return bless( {}, $class ); -} - -sub main { - my $self = shift; - - clive::Config->instance->init; - clive::Curl->instance->init; - clive::Log->instance->init; - clive::Cache->instance->init; - clive::Exec->instance->init; - - _parseInput(); - - exit( clive::Log->instance->returnCode ); -} - -sub _parseInput { - my $self = shift; - - $self->{queue} = ; - - my $config = clive::Config->instance->config; - - # Read from recall file. - if ( $config->{recall} and -e $config->{recall_file} ) { - if ( open( my $fh, "<", $config->{recall_file} ) ) { - _parseLine( $self, $_ ) while (<$fh>); - close($fh); - } - else { - clive::Log->instance->errn( CLIVE_READ, - "$config->{recall_file}: $!" ); - } - } - - # From cache (grep). - if ( $config->{cache_grep} ) { - my $cache = clive::Cache->instance; - foreach ( @{ $cache->grepQueue } ) { - push( @{ $self->{queue} }, $_ ); - } - } - - # Use argv. - _parseLine( $self, $_ ) foreach (@ARGV); - - # Default to STDIN. - if ( scalar( @{ $self->{queue} } ) == 0 - && scalar( @ARGV == 0 ) ) - { - _parseLine( $self, $_ ) while (<STDIN>); - } - - my $cache = clive::Cache->instance; - my $curl = clive::Curl->instance; - my $log = clive::Log->instance; - - require clive::HostFactory; - require clive::Video; - - foreach ( @{ $self->{queue} } ) { - my $host = clive::HostFactory->new($_); - if ($host) { - my $props = clive::Video->new; - $props->page_link($_); - - my $rc = 0; - - # Read from cache. - if ( $cache->enabled() && $config->{cache_read} ) { - $rc = $cache->read( \$props ); - if ( $rc == 1 && $props->video_format() ne $config->{format} ) - { - - # Cache: video format != requested format -> re-fetch. - $rc = 0; - } - } - - # Cache failed or record did not exist. Fetch the video page. - if ( $rc == 0 ) { - my $content; - - $rc = $curl->fetchToMem( $props->page_link, \$content ); - - if ( $rc == 0 ) { - - $props->page_title( \$content ); - $rc = $host->parsePage( \$content, \$props ); - - if ( $rc == 0 ) { - $rc = $curl->queryFileLength( \$props ); - if ( $rc == 0 ) { - $props->video_format( $config->{format} ); - $cache->write( \$props ); - } - } - } - } - - # Cache record found. - else { - $log->out("cache $_ ...done\n"); - $rc = 0; - } - - # If everything went OK so far, proceed to extract etc. - if ( $rc == 0 ) { - - push( @{ $self->{passed_queue} }, $_ ); - - $props->formatOutputFilename; - - if ( $props->nothing_todo ) { - $log->err( CLIVE_NOTHINGTODO, - "file already retrieved; nothing todo" ); - clive::Exec->instance->queue( \$props ); - next; - } - - if ( $config->{no_extract} ) { - $props->printVideo; - } - elsif ( $config->{emit_csv} ) { - $props->emitCSV; - } - elsif ( $config->{stream_pass} ) { - clive::Exec->instance->passStream( \$props ); - } - else { - if ( $config->{print_fname} ) { - $props->printVideo; - } - if ( $curl->fetchToFile( \$props ) == 0 ) { - clive::Exec->instance->queue( \$props ); - } - } - } - elsif ( $rc == 0xff ) { - - # Purpose: dump (cctv) video segment links to terminal. - # a.k.a. "One link leads to many video segment links." - # a.k.a. "Something we never had even thought of." - # We skip quite a few steps with this chunk of joy. - } - } - else { - $log->err( CLIVE_NOSUPPORT, "no support: $_" ); - } - } - - clive::Exec->instance->runExec; - - # Update recall file. - if ( $log->returnCode == CLIVE_OK ) { - if ( open( my $fh, ">", $config->{recall_file} ) ) { - print( $fh "$_\n" ) foreach ( @{ $self->{passed_queue} } ); - close($fh); - } - else { - $log->errn( CLIVE_READ, "$config->{recall_file}: $!" ); - } - } -} - -sub _parseLine { - my ( $self, $ln ) = @_; - - return if $ln =~ /^$/; - return if $ln =~ /^#/; - - chomp $ln; - - $ln = "http://$ln" - if $ln !~ m{^a-z+://}i; - - # Youtube. - $ln =~ s!youtu.be/!youtube.com/watch?v=!i; # youtu.be - $ln =~ s/-nocookie//; # -nocookie - $ln =~ s!/v/!/watch?v=!i; # Embedded - - # Translate host specific embedded link to video page link. - $ln =~ s!googleplayer.swf!videoplay!i; # googlevideo - $ln =~ s!/pl/!/videos/!i; # sevenload - $ln =~ s!/e/!/view?i=!i; # liveleak - - if ($ln =~ /\/swf\//) { # dailymotion - $ln =~ s!/video/!/!; - $ln =~ s!/swf/!/video/!; - } - - # Lastfm demystifier. - if ( $ln =~ /last\.fm/ ) { - $ln =~ /\+1\-(.+)/; - if ( !$1 ) { - clive::Log->instance->err( CLIVE_NOSUPPORT, "no support: $ln" ); - return; - } - $ln = "http://youtube.com/watch?v=$1"; - } - - push( @{ $self->{queue} }, $ln ); -} - -sub _printHosts { - require clive::HostFactory; - clive::HostFactory->dumpHosts(); - exit(CLIVE_OK); -} - -1; - -# There must be some kinda way out of here.
View file
clive-2.2.22.tar.bz2/lib/clive/Cache.pm
Deleted
@@ -1,231 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Cache; - -use warnings; -use strict; - -use base 'Class::Singleton'; - -use clive::Video; -use clive::Error qw(CLIVE_OK CLIVE_GREP); - -use constant DEFAULT_DUMP_FORMAT => qq/%n: %t %f, %mMB/; - -sub init { - my $self = shift; - - my $config = clive::Config->instance->config; - - $self->{enabled} = 0; - - eval("require BerkeleyDB"); - $self->{enabled} = 1 - if ( !$@ && !$config->{no_cache} ); - - if ( $self->{enabled} ) { - require Digest::SHA; - - my %cache; - my $handle = tie( - %cache, "BerkeleyDB::Hash", - -Filename => $config->{cache_file}, - -Flags => BerkeleyDB->DB_CREATE - ) or die "error: cannot open $config->{cache_file}: $!\n"; - - $self->{handle} = $handle; - $self->{cache} = \%cache; - - if ( $config->{cache_dump} ) { - _dumpCache($self); - } - elsif ( $config->{cache_grep} ) { - _grepCache($self); - } - elsif ( $config->{cache_clear} ) { - _clearCache($self); - } - } - else { - if ( $config->{cache_dump} || $config->{cache_grep} ) { - die "error: requires BerkeleyDB module\n"; - } - } -} - -sub enabled { - my $self = shift; - return $self->{enabled}; -} - -sub read { - my $self = shift; - return (1) if !$self->{enabled}; - return _mapRecord( $self, @_ ); -} - -sub write { - my $self = shift; - return if !$self->{enabled}; - my $props = shift; - my $hash = Digest::SHA::sha1_hex( $$props->page_link ); - $self->{cache}{$hash} = $$props->toCacheRecord; - $self->{handle}->db_sync(); -} - -sub grepQueue { - my $self = shift; - $self->{grep_queue}; -} - -sub _mapRecord { - my ( $self, $props, $hash ) = @_; - $hash = Digest::SHA::sha1_hex( $$props->page_link ) - if ( !$hash ); - - # Key order matters. Keep in sync with clive::Video::toCacheRecord order. - if ( $self->{cache}{$hash} ) { - my @values = split( /#/, $self->{cache}{$hash} ); - my @keys = qw( - page_title page_link video_id video_link - video_host video_format file_length file_suffix - content_type time_stamp - ); - my $i = 0; - my %record = map { $_ => $values $i++ } @keys; - $$props->fromCacheRecord( \%record ); - return (1); - } - return (0); -} - -sub _dumpCache { - my $self = shift; - - my $config = clive::Config->instance->config; - my $dumpfmt = $config->{cache_dump_format} || DEFAULT_DUMP_FORMAT; - my $props = clive::Video->new - ; # Reuse this rather than re-create it for each record. - - my $i = 1; - print _formatDump( $self, $dumpfmt, $_, \$props, $i++ ) . "\n" - foreach ( keys %{ $self->{cache} } ); - - exit(CLIVE_OK); -} - -sub _grepCache { - my $self = shift; - - my $config = clive::Config->instance->config; - my $dumpfmt = $config->{cache_dump_format} || DEFAULT_DUMP_FORMAT; - my $props = clive::Video->new - ; # Reuse this rather than re-create it for each record. - - my $g - = $config->{cache_ignore_case} - ? qr|$config->{cache_grep}|i - : qr|$config->{cache_grep}|; - - $self->{grep_queue} = ; - my $i = 1; - foreach ( keys %{ $self->{cache} } ) { - my $dumpstr = _formatDump( $self, $dumpfmt, $_, \$props, $i++ ); - my @e = split( /#/, $self->{cache}{$_} ); - if ( grep /$g/, @e ) { - push( @{ $self->{grep_queue} }, $props->page_link ); - print "$dumpstr\n" - if ( $config->{cache_remove_record} ); - } - } - - if ( $config->{cache_remove_record} ) { - if ( scalar( @{ $self->{grep_queue} } ) > 0 ) { - print("Confirm delete (y/N):"); - $_ = lc <STDIN>; - chomp; - if ( lc $_ eq "y" ) { - foreach ( @{ $self->{grep_queue} } ) { - my $hash = Digest::SHA::sha1_hex($_); - delete $self->{cache}{$hash}; - } - } - exit(CLIVE_OK); - } - } - if ( scalar( @{ $self->{grep_queue} } ) == 0 ) { - clive::Log->instance->err( CLIVE_GREP, - "nothing matched $g in cache" ); - exit(CLIVE_GREP); - } -} - -sub _formatDump { - my ( $self, $dumpfmt, $hash, $props, $index ) = @_; - - if ( _mapRecord( $self, $props, $hash ) ) { - my $title = $$props->page_title; - my $id = $$props->video_id; - my $host = $$props->video_host; - my $len = $$props->file_length; - my $mb = sprintf( "%.1f", clive::Util::toMB($len) ); - my $tstamp = $$props->time_stamp; - my ( $date, $time ) = ( split( / /, $tstamp ) ); - my $format = $$props->video_format; - $index = sprintf( "%04d", $index ); - - my $fmt = $dumpfmt; - $fmt =~ s/%t/$title/g; - $fmt =~ s/%i/$id/g; - $fmt =~ s/%h/$host/g; - $fmt =~ s/%l/$len/g; - $fmt =~ s/%m/$mb/g; - $fmt =~ s/%d/$date/g; - $fmt =~ s/%T/$time/g; - $fmt =~ s/%s/$tstamp/g; - $fmt =~ s/%f/$format/g; - $fmt =~ s/%n/$index/g; - - return $fmt; - } - return ""; -} - -sub _clearCache { - my $self = shift; - my $count = 0; - $self->{handle}->truncate($count); - print "$count records truncated.\n"; - exit(CLIVE_OK); -} - -sub DESTROY { - my $self = shift; - $self->{handle} = undef; - if ( $self->{cache} ) { - untie( %{ $self->{cache} } ); - } -} - -1; - -# Said a joker to the thief.
View file
clive-2.2.22.tar.bz2/lib/clive/Compat.pm
Deleted
@@ -1,111 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Compat; - -use warnings; -use strict; - -use clive::Error qw(CLIVE_OK CLIVE_READ); -use clive::Util; - -# Upgrades clive 2.0/2.1 config to 2.2+ format. -sub upgradeConfig { - require File::Spec; - my $path - = File::Spec->catfile( $ENV{HOME}, ".config", "clive", "config" ); - - require Config::Tiny; - print("Verify $path.\n"); - my $c = Config::Tiny->read($path); - - if ( !$c ) { - log->errn( "$path: " . Config::Tiny->errstr ); - exit(CLIVE_READ); - } - - my %opts = ( - connect_timeout => $c->{http}->{connect_timeout}, - connect_timeout_socks => $c->{http}->{connect_timeout_socks}, - agent => $c->{http}->{agent}, - proxy => $c->{http}->{proxy}, - limit_rate => $c->{http}->{limit_rate}, - format => $c->{output}->{format}, - save_dir => $c->{output}->{savedir}, - cclass => $c->{output}->{cclass}, - filename_format => $c->{output}->{filename_format}, - format => $c->{output}->{format}, - cache_dump_format => $c->{output}->{show}, - exec => $c->{commands}->{exec}, - stream_exec => $c->{commands}->{stream}, - - # Obsolete in 2.2: - #progress => $c->{_}->{progress}, - #ytuser => $c->{youtube}->{user}, - #ytpass => $c->{youtube}->{pass }, - #clivepass => $c->{commands}->{clivepass}, - ); - - my $data; - while ( ( my $i ) = each(%opts) ) { - $data .= qq/--$i="$opts{$i}"\n/ - if ( $opts{$i} ); - } - - if ( !$data ) { - my $a = clive::Util::prompt( - "error: Nothing to upgrade -- View file? (Y/n):"); - system("less $path") - if ( $a ne "n" ); - exit(CLIVE_OK); - } - - open my $fh, ">", "$path.new" - or print( STDERR "error: $path.new: $!" ) - and exit(CLIVE_READ); - - print $fh $data; - close $fh; - - my $a = clive::Util::prompt("View differences? (Y/n):"); - system("diff -u $path $path.new | less") - if ( $a ne "n" ); - - $a = clive::Util::prompt("Overwrite with new config? (y/N):"); - exit(CLIVE_OK) - unless ( $a eq "y" ); - - print("Backup -> $path.old\n"); - $c->write("$path.old"); - - print("Upgrade.\n"); - require File::Copy; - File::Copy::move( "$path.new", "$path" ) - or print( STDERR "error: move: $!" ) - and exit(CLIVE_READ); - print("Done.\n"); - - exit(CLIVE_OK); -} - -1; - -# A wildcat did growl.
View file
clive-2.2.22.tar.bz2/lib/clive/Config.pm
Deleted
@@ -1,200 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Config; - -use warnings; -use strict; - -use base 'Class::Singleton'; - -use Getopt::ArgvFile( - home => 1, - startupFilename => qw(.cliverc .clive/config .config/clive/config), -); - -use Getopt::Long qw(:config bundling); -use File::Spec::Functions; -use File::Path qw(mkpath); -use Cwd qw(getcwd); - -use clive::HostFactory; -use clive::Compat; -use clive::Error qw(CLIVE_OK CLIVE_OPTARG); - -use version 0.77 (); our $VERSION = version->declare ("2.2.22"); - -sub init { - my $self = shift; - - my %config; - - GetOptions( - \%config, - 'debug', 'exec=s', 'cclass=s', 'stream=i', - 'continue|c', 'recall|l', 'format|f=s', 'agent=s', - 'quiet|q', 'proxy=s', 'stderr', - 'hosts' => \&clive::HostFactory::dumpHosts, - 'version|v' => \&_printVersion, - 'license' => \&_printLicense, - 'help|h', => \&_printHelp, - - 'cache_read|cache-read|cacheread|r', - 'cache_dump|cache-dump|cachedump|d', - 'cache_grep|cache-grep|cachegrep|g=s', - 'cache_remove_record|cache-remove-record|cacheremoverecord|D', - 'cache_ignore_case|cache_ignore-case|cacheignorecase|i', - 'cache_dump_format|cache-dump-format|cachedumpformat=s', - 'cache_clear|cache-clear|cacheclear', - 'no_cache|no-cache|nocache', - 'no_extract|no-extract|noextract|n', - 'no_proxy|no-proxy|noproxy', - 'filename_format|filename-format|filenameformat=s', - 'emit_csv|emit-csv|emitcsv', - 'stream_exec|stream-exec|streamexec=s', - 'stream_pass|stream-pass|streampass|s', - 'output_file|output-file|outputfile|O=s', - 'limit_rate|limit-rate|limitrate=i', - 'connect_timeout|connect-timeout|connecttimeout=i', - 'connect_timeout_socks|connect-timeout-socks|connecttimeoutsocks=i', - 'save_dir|save-dir|savedir=s', - 'recall_file|recall-file|recallfile=s', - 'cache_file|cache-file|cachefile=s', - 'no_cclass|no-cclass|nocclass|C', - 'stop_after|stop-after|stopafter=s', - 'exec_run|exec-run|execrun|e', - 'upgrade_config|upgrade-config|upgradeconfig' => - \&clive::Compat::upgradeConfig, - 'cookie_jar|cookie-jar|cookiejar=s', - 'print_fname|print-fname|printfname', - ) or exit(CLIVE_OPTARG); - - my $homedir = $ENV{HOME} || getcwd(); - - my $cachedir = $ENV{CLIVE_CACHE} - || catfile( $homedir, ".cache", "clive" ); - - eval { mkpath($cachedir) }; - die "$cachedir: $@" - if ($@); - - $config{recall_file} ||= catfile( $cachedir, "last" ); - $config{cache_file} ||= catfile( $cachedir, "cache" ); - - $config{format} ||= 'default'; - - # Check format. - - # Youtube: For backward compatibility only. - my @youtube_orig = qw (fmt17 fmt18 fmt22 fmt34 fmt35 fmt37 fmt43 fmt45); - - my @youtube_old = - qw (mobile sd_270p sd_360p hq_480p hd_720p hd_1080p); - - my @youtube_arcane = qw (mp4 hd hq 3gp); - - # These are the most current ones, also listed with --hosts. Refer - # to clive/Host/Youtube.pm for details. - - my @youtube_latest = - qw (flv_240p flv_360p flv_480p mp4_360p mp4_720p mp4_1080p - mp4_3072p webm_480p webm_720p 3gp_144p); - - # Other: - - my @spiegel = # vp6_388=default - qw(vp6_64 vp6_576 vp6_928 h264_1400 small iphone podcast); - - my @golem = qw(high ipod); # medium=default - - my @formats = ( - qw(default best), - @youtube_orig, @youtube_old, @youtube_arcane, @youtube_latest, - @spiegel, @golem - ); - - #unless (@formats ~~ $config{format}) { # Perl 5.10.0+ - unless ( grep( /^$config{format}$/, @formats ) ) { - clive::Log->instance->err( CLIVE_OPTARG, - "unsupported format `$config{format}'" ); - exit(CLIVE_OPTARG); - } - - my $log = clive::Log->instance; - my $str = "%s depends on --stream-exec which is undefined"; - - # Check streaming options. - - if ( $config{stream} && !$config{stream_exec} ) { - $log->err( CLIVE_OPTARG, sprintf( $str, "--stream" ) ); - exit(CLIVE_OPTARG); - } - - if ( $config{stream_pass} && !$config{stream_exec} ) { - $log->err( CLIVE_OPTARG, sprintf( $str, "--stream-pass" ) ); - exit(CLIVE_OPTARG); - } - - # Check --stop-after. - if ( $config{stop_after} ) { - if ( $config{stop_after} !~ /M$/ - && $config{stop_after} !~ /%$/ ) - { - clive::Log->instance->err( CLIVE_OPTARG, - "--stop-after must be terminated by either '%' or 'M'" ); - exit(CLIVE_OPTARG); - } - } - - $self->{config} = \%config; -} - -sub config { - my $self = shift; - return $self->{config}; -} - -sub _printLicense { - print - "Copyright (C) 2007,2008,2009,2010 Toni Gundogdu. License: GNU GPL version 3+ -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -"; - exit CLIVE_OK; -} - -sub _printVersion { - printf "clive version %s with WWW::Curl version $WWW::Curl::VERSION\n" - . "os=%s, perl=%s, locale=%s\n", - $VERSION, $^O, ( sprintf "%vd", $^V ), $ENV{LANG} || "?"; - exit CLIVE_OK; -} - -sub _printHelp { - - # Edit bin/clive for --help contents. - require Pod::Usage; - Pod::Usage::pod2usage( -exitstatus => CLIVE_OK, -verbose => 1 ); -} - -1; - -# There's too much confusion.
View file
clive-2.2.22.tar.bz2/lib/clive/Curl.pm
Deleted
@@ -1,289 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Curl; - -use warnings; -use strict; - -use base 'Class::Singleton'; - -use WWW::Curl::Easy 4.05; -use Cwd; -use Encode qw(from_to decode_utf8 FB_CROAK); - -use clive::Error qw(CLIVE_NET CLIVE_STOP); - -my $bp; - -sub init { - my ($self, $config) = (shift, clive::Config->instance->config); - - my $c = WWW::Curl::Easy->new; - $c->setopt( CURLOPT_USERAGENT, $config->{agent} || "Mozilla/5.0" ); - $c->setopt( CURLOPT_FOLLOWLOCATION, 1 ); - $c->setopt( CURLOPT_AUTOREFERER, 1 ); - $c->setopt( CURLOPT_HEADER, 1 ); - $c->setopt( CURLOPT_NOBODY, 0 ); - # Ideally we'd set this for dailymotion only, as quvi does, but - # the current (2.2) code would require too many changes to do this. - $c->setopt( CURLOPT_COOKIE, "family_filter=off" ); - - $c->setopt( CURLOPT_VERBOSE, 1 ) - if $config->{debug}; - - $c->setopt( CURLOPT_PROXY, $config->{proxy} ) - if $config->{proxy}; - - $c->setopt( CURLOPT_PROXY, "" ) - if $config->{no_proxy}; - - $c->setopt( CURLOPT_COOKIEJAR, $config->{cookie_jar} ) - if $config->{cookie_jar}; - - $self->{handle} = $c; -} - -sub setTimeout { - my ( $self, $no_socks_timeout ) = @_; - - my $config = clive::Config->instance->config; - - $self->{handle} - ->setopt( CURLOPT_CONNECTTIMEOUT, $config->{connecttimeout} || 30 ); - - $self->{handle} - ->setopt( CURLOPT_TIMEOUT, $config->{connecttimeoutsocks} || 30 ) - unless $no_socks_timeout; -} - -sub resetTimeout { - - # Resetting SOCKS timeout is sufficient. - my $self = shift; - $self->{handle}->setopt( CURLOPT_TIMEOUT, 0 ); -} - -sub fetchToMem { - my ( $self, $url, $content, $what ) = @_; - - my $log = clive::Log->instance; - - my $_what = $what || $url; - $log->out("fetch $_what ..."); - - $self->{handle}->setopt( CURLOPT_URL, $url ); - $self->{handle}->setopt( CURLOPT_ENCODING, "" ); - - $$content = ""; - open( my $fh, ">", $content ); - - $self->{handle}->setopt( CURLOPT_WRITEDATA, $fh ); - - setTimeout($self); - my $rc = $self->{handle}->perform; - resetTimeout($self); - - close($fh); - - if ( $rc == 0 ) { - my $httpcode = $self->{handle}->getinfo(CURLINFO_RESPONSE_CODE); - if ( $httpcode == 200 ) { - $log->out("done.\n"); - $rc = 0; - } - else { - $log->errn( CLIVE_NET, - $self->{handle}->strerror($httpcode) . " (http/$httpcode)" ); - $rc = 1; - } - } - else { - $log->errn( CLIVE_NET, - $self->{handle}->strerror($rc) . " (http/$rc)" ); - $rc = 1; - } - - from_to( $$content, $1, "utf8" ) - if ( $$content =~ /charset=(.*?)"/ ); - - from_to( $$content, $1, "utf8" ) - if ( $$content =~ /encoding="(.*?)"/ ); - - $$content = decode_utf8( $$content, Encode::FB_CROAK ); - - return ($rc); -} - -sub queryFileLength { - my ( $self, $props ) = @_; - - my $log = clive::Log->instance; - $log->out("verify video link ..."); - - my $buffer = ""; - open( my $fh, ">", \$buffer ); - - $self->{handle}->setopt( CURLOPT_URL, $$props->video_link ); - $self->{handle}->setopt( CURLOPT_WRITEDATA, $fh ); - - # GET -> HEAD. - $self->{handle}->setopt( CURLOPT_NOBODY, 1 ); - - setTimeout($self); - my $rc = $self->{handle}->perform; - resetTimeout($self); - close($fh); - - # HEAD -> GET. - $self->{handle}->setopt( CURLOPT_HTTPGET, 1 ); - - if ( $rc == 0 ) { - my $httpcode = $self->{handle}->getinfo(CURLINFO_RESPONSE_CODE); - if ( $httpcode == 200 || $httpcode == 206 ) { - $$props->file_length( - $self->{handle}->getinfo(CURLINFO_CONTENT_LENGTH_DOWNLOAD) ); - - my $content_type - = $self->{handle}->getinfo(CURLINFO_CONTENT_TYPE); - $$props->content_type($content_type); - - # Figure out file suffix. - if ( $content_type =~ /\/(.*)/ ) { - my $suffix = $1; # Default to whatever was matched. - if ( $1 =~ /octet/ - || $1 =~ /plain/ - || $1 =~ /swf/ - || $1 =~ /flash/ ) - { - - # Otherwise use "flv" for the above exceptions. - $suffix = "flv"; - } - $suffix =~ tr{x-}//d; # e.g. x-flv -> flv. - $$props->file_suffix($suffix); - $log->out("done.\n"); - return (0); - } - else { - $log->errn( CLIVE_NET, - "$content_type: unexpected content-type" ); - } - } - else { - $log->errn( CLIVE_NET, - $self->{handle}->strerror($httpcode) . " (http/$httpcode)" ); - } - } - else { - $log->errn( CLIVE_NET, - $self->{handle}->strerror($rc) . " (http/$rc)" ); - } - return (1); -} - -sub fetchToFile { - my ( $self, $props ) = @_; - - my $log = clive::Log->instance; - my $config = clive::Config->instance->config; - my $initial = $$props->initial_length; - my $mode = ">"; - - if ( $config->{continue} && $initial > 0 ) { - my $remaining = $$props->file_length - $initial; - $log->out( - sprintf( - "from: %d (%.1fM) remaining: %d (%.1fM)\n", - $initial, clive::Util::toMB($initial), - $remaining, clive::Util::toMB($remaining) - ) - ); - $mode = ">>"; - } - - my $fpath = $$props->filename; - - open( my $fh, $mode, $fpath ) - or die("$fpath: $!"); - - $self->{handle}->setopt( CURLOPT_URL, $$props->video_link ); - $self->{handle}->setopt( CURLOPT_ENCODING, "identity" ); - $self->{handle}->setopt( CURLOPT_WRITEDATA, $fh ); - $self->{handle}->setopt( CURLOPT_HEADER, 0 ); - $self->{handle}->setopt( CURLOPT_RESUME_FROM, $$props->initial_length ); - - $self->{handle}->setopt( CURLOPT_PROGRESSFUNCTION, \&progress_callback ); - $self->{handle}->setopt( CURLOPT_NOPROGRESS, 0 ); - - require clive::Progress::Bar; - $bp = clive::Progress::Bar->new($props); - - if ( $config->{limit_rate} ) { - $self->{handle}->setopt( CURLOPT_MAX_RECV_SPEED_LARGE, - $config->{limit_rate} * 1024 ); - } - - setTimeout( $self, 1 ); # 1=Do not enable SOCKS timeout. - my $rc = $self->{handle}->perform; - resetTimeout($self); - - close($fh); - - $self->{handle}->setopt( CURLOPT_MAX_RECV_SPEED_LARGE, 0 ); - $self->{handle}->setopt( CURLOPT_HEADER, 1 ); - $self->{handle}->setopt( CURLOPT_NOPROGRESS, 1 ); - $self->{handle}->setopt( CURLOPT_RESUME_FROM, 0 ); - - if ( $rc == 0 ) { - my $httpcode = $self->{handle}->getinfo(CURLINFO_RESPONSE_CODE); - if ( $httpcode == 200 || $httpcode == 206 ) { - $bp->finish(); - } - else { - $log->errn( CLIVE_NET, - $self->{handle}->strerror($httpcode) . " (http/$httpcode)" ); - return (1); - } - } - else { - $log->errn( - $rc == 42 ? CLIVE_STOP : CLIVE_NET, - $self->{handle}->strerror($rc) . " (rc/$rc)" - ); - return (1); - } - - clive::Exec->instance->resetStream; - $log->out("\n"); - - return (0); -} - -sub progress_callback { - my ( $percent, $stop_transfer, $props ) = $bp->update(@_); - clive::Exec->instance->runStream( $percent, $props ); - return ($stop_transfer); -} - -1; - -# I can't get no relief.
View file
clive-2.2.22.tar.bz2/lib/clive/Error.pm
Deleted
@@ -1,60 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009,2010 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Error; - -require Exporter; - -our @ISA = qw(Exporter); - -use constant { - CLIVE_OK => 0, - CLIVE_NOTHINGTODO => 1, # file already retrieved - CLIVE_NOSUPPORT => 2, # host not supported - CLIVE_READ => 3, # file open/read error - CLIVE_GREP => 4, # grep: nothing matched in cache - CLIVE_OPTARG => 5, # invalid option argument - CLIVE_SYSTEM => 6, # system call failed (e.g. fork) - CLIVE_REGEXP => 7, # regexp pattern matching failed - CLIVE_FORMAT => 8, # requested format unavailable - CLIVE_NET => 9, # network error - CLIVE_STOP => 10, # --stop-after - CLIVE_MARKEDBROKEN => 11, # support marked broken -}; - -our @EXPORT_OK = qw( - CLIVE_OK - CLIVE_NOTHINGTODO - CLIVE_NOSUPPORT - CLIVE_READ - CLIVE_GREP - CLIVE_OPTARG - CLIVE_SYSTEM - CLIVE_REGEXP - CLIVE_FORMAT - CLIVE_NET - CLIVE_STOP - CLIVE_MARKEDBROKEN -); - -1; - -# Outside in the cold distance.
View file
clive-2.2.22.tar.bz2/lib/clive/Exec.pm
Deleted
@@ -1,154 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Exec; - -use warnings; -use strict; - -use base 'Class::Singleton'; - -use clive::Error qw(CLIVE_OK CLIVE_OPTARG CLIVE_SYSTEM); - -sub init { - my $self = shift; - $self->{exec_queue} = ; - $self->{stream_flag} = 0; - $self->{stream_pid} = -1; - - my $config = clive::Config->instance->config; - if ( $config->{exec} ) { - if ( $config->{exec} !~ /;+$/ ) { - clive::Log->instance->err( CLIVE_OPTARG, - "--exec expression must be " - . "terminated by either ';' or '+'" ); - exit(CLIVE_OPTARG); - } - } - - if ( !$config->{exec} && $config->{exec_run} ) { - clive::Log->instance->err( CLIVE_OPTARG, - "--exec-run depends on --exec" ); - exit(CLIVE_OPTARG); - } -} - -sub queue { - my $self = shift; - if (@_) { - my $config = clive::Config->instance->config; - if ( $config->{exec} && $config->{exec_run} ) { - my $props = shift; - push( @{ $self->{exec_queue} }, $$props->filename ); - } - } - return $self->{exec_queue}; -} - -sub runExec { - my $config = clive::Config->instance->config; - return if !$config->{exec_run}; - - my $self = shift; - if ( $config->{exec} =~ /;$/ ) { # Semi - foreach ( @{ $self->{exec_queue} } ) { - my $cmd = $config->{exec}; - $cmd =~ s/%i/"$_"/g; - $cmd =~ tr{;}//d; - system("$cmd"); - } - } - else { # Plus - my $cmd = sprintf( "%s ", $config->{exec} ); - $cmd =~ s/%i//g; - $cmd =~ tr{+}//d; - $cmd .= sprintf( '"%s" ', $_ ) foreach ( @{ $self->{exec_queue} } ); - system("$cmd"); - } -} - -sub resetStream { - my $self = shift; - - waitpid( $self->{stream_pid}, 0 ) - if $self->{stream_flag}; - - $self->{stream_flag} = 0; - $self->{stream_pid} = -1; -} - -sub runStream { - my ( $self, $percent, $props ) = @_; - my $config = clive::Config->instance->config; - if ( $config->{stream} - && $config->{stream_exec} - && !$self->{stream_flag} ) - { - _forkStreamer( $self, \$config, $props ) - if ( $percent >= $config->{stream} ); - } -} - -sub passStream { - my ( $self, $props ) = @_; - - my $config = clive::Config->instance->config; - my $cmd = $config->{stream_exec}; - my $lnk = $$props->video_link; - - $cmd =~ s/%i/"$lnk"/g; - - my $log = clive::Log->instance; - $log->out("stream ..."); - - my $n = system($cmd); - - if ( $n == 0 ) { - $log->out("done.\n"); - } - elsif ( $n == -1 ) { - $log->errn( CLIVE_SYSTEM, "failed to execute: `$!'" ); - } - else { - $log->errn( CLIVE_SYSTEM, "child exited with: " . ( $n >> 8 ) ); - } -} - -sub _forkStreamer { - my ( $self, $config, $props ) = @_; - - $self->{stream_flag} = 1; - my $child = fork; - if ( $child < 0 ) { - clive::Log->instance->errn( CLIVE_SYSTEM, "fork: $!" ); - } - elsif ( $child == 0 ) { - my $cmd = $$config->{stream_exec}; - my $fname = $$props->filename; - $cmd =~ s/%i/"$fname"/g; - system("$cmd"); - exit(CLIVE_OK); - } -} - -1; - -# Businessmen they, they drink my wine.
View file
clive-2.2.22.tar.bz2/lib/clive/Host
Deleted
-(directory)
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Break.pm
Deleted
@@ -1,62 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Break; - -# Rewritten from the original code contribution by Jan Hulsbergen -# <afoo@gmail.com> which was written in Python for clive 1.0. - -use warnings; -use strict; - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("break"); - - my %re = ( - id => qr|sGlobalContentID='(.*?)'|, - fname => qr|sGlobalFileName='(.*?)'|, - fhash => qr|flashVars.icon = \"(.*?)\"|, - title => qr|id="vid_title" content="(.*?)"| - ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - - my $xurl = "$tmp->{fname}.flv?$tmp->{fhash}"; - - $$props->video_id( $tmp->{id} ); - $$props->page_title( undef, $tmp->{title} ); - $$props->video_link($xurl); - - return (0); - } - return (1); -} - -1; - -# Ploughmen dig my earth.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Buzzhumor.pm
Deleted
@@ -1,51 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2010 Toni Gundogdu. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Buzzhumor; - -use warnings; -use strict; - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("buzzhumor"); - - my %re = ( - id => qr|/videos/(\d+)/|, - lnk => qr|&file=(.*?)"| - ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - - $$props->video_id( $tmp->{id} ); - $$props->video_link( $tmp->{lnk} ); - - return (0); - } - - return (1); -} - -1;
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Clipfish.pm
Deleted
@@ -1,76 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Clipfish; - -use warnings; -use strict; - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("clipfish"); - - my %re = ( id => qr|/video/(.*?)/| ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, \$$props->page_link ) == 0 ) - { - my $url - = "http://www.clipfish.de/video_n.php?p=0|DE&vid=" . $tmp->{id}; - - if ( _fetchConfig( $self, $url ) == 0 ) { - - $$props->video_id( $tmp->{id} ); - $$props->video_link( $self->{video_link} ); - - return (0); - } - } - return (1); -} - -sub _fetchConfig { - my ( $self, $url ) = @_; - - my $curl = clive::Curl->instance; - - my $content; - if ( $curl->fetchToMem( $url, \$content, "config" ) == 0 ) { - - my %re = ( xurl => qr|\&url=(.*?)\&| ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, \$content ) == 0 ) { - - $self->{video_link} = $tmp->{xurl}; - - return (0); - } - } - return (1); -} - -1;
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Dailymotion.pm
Deleted
@@ -1,134 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009,2010,2011 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Dailymotion; - -use warnings; -use strict; - -use clive::Error qw(CLIVE_REGEXP CLIVE_NOSUPPORT); - -sub new { return bless ({}, shift); } - -sub parsePage { - - my ($self, $content, $props) = @_; - - $$props->video_host("dailymotion"); - - if ($$content =~ /SWFObject\("http:/) { - - clive::Log->instance->err(CLIVE_NOSUPPORT, - "Looks like a partner video. Refusing to continue."); - - return 1; - } - - # Match video ID, title. - - my %re = ( - id => qr|video/(.*?)_|, - title => qr|title="(.*?)"|, - ); - - my ($tmp, $lnk); - - return 1 if clive::Util::matchRegExps (\%re, \$tmp, $content) != 0; - - # Some videos have only one link available. - - if ($$content =~ /"video", "(.*?)"/) - { $lnk = $1; } - - else { - my $r; - ($r,$lnk) = parseVideoURL ($self, $content); - return $r unless $r == 0; - } - - if (not defined $lnk) { - clive::Log->instance->err (CLIVE_REGEXP, "no match: video URL"); - return 1; - } - - # Cleanup video link. - - $lnk =~ s/%5C//g; - - require URI::Escape; - $lnk = URI::Escape::uri_unescape ($lnk); - - # Set video properties. - - $$props->video_id ($tmp->{id}); - $$props->page_title (undef, $tmp->{title}); - $$props->video_link ($lnk); - - return 0; -} - -sub parseVideoURL { - - my ($self, $content) = @_; - my $lnk; - - # Match available formats. - - my $re = qr|%22(\w\w)URL%22%3A%22(.*?)%22|; - my %lst = $$content =~ /$re/gm; - - if (keys %lst == 0) { - clive::Log->instance->err(CLIVE_REGEXP, "no match: `$re'"); - return (1, $lnk); - } - - # User requested format. - - my $format = clive::Config->instance->config->{format}; - $format = "sd" if $format eq "default"; # sd=default - - # Match requested format to a video link. - - foreach (qw/sd hq hd/) { - - if (not exists $lst{$_}) { - print STDERR "warning: `$_' not found in hash, ignored.\n"; - next; - } - - if ($format eq "best") - { $lnk = $lst{$_}; } - - elsif ($format eq $_) { - $lnk = $lst{$_}; - last; - } - - } - - # parsePage will take care of checking $lnk value. - - return (0, $lnk); -} - -1; - -# Nobody of it is worth.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Funnyhub.pm
Deleted
@@ -1,50 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Funnyhub; - -use warnings; -use strict; - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("funnyhub"); - - my %re = ( - id => qr|/videofiles/(.*?)_|, - url => qr|"flv", "(.*?)"|, - ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - $$props->video_id( $tmp->{id} ); - $$props->video_link( $tmp->{url} ); - return (0); - } - return (1); -} - -1;
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Gaskrank.pm
Deleted
@@ -1,52 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Gaskrank; - -use warnings; -use strict; - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("gaskrank"); - - my %re = ( - id => qr|.+/(.*?).flv|, - xurl => qr|file=(.*?)"|, - ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - $$props->video_id( $tmp->{id} ); - $$props->video_link( $tmp->{xurl} ); - return (0); - } - return (1); -} - -1; - -# No reason to get excited.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Golem.pm
Deleted
@@ -1,117 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Golem; - -use warnings; -use strict; - -# --format=(high|medium|ipod) -# high = hd -# medium = default (what we call "default" in clive) -# ipod = ipod - -# Note that we do not use "medium" at all. The host -# defaults to "medium" if "?q=" is not appended. -# Users do not need to bother themselves with this. - -# We use config:title instead of video page title -# if it can be parsed from the config. Saves us -# the trouble from cleaning up the <title>. - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("golem"); - - my %re = ( id => qr|"id", "(.*?)"| ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - my $url = "http://video.golem.de/xml/$tmp->{id}"; - if ( _fetchConfig( $self, $url, $tmp->{id} ) == 0 ) { - - $$props->page_title( undef, $self->{page_title} ) - if ( $self->{page_title} ); - - $$props->video_id( $tmp->{id} ); - $$props->video_link( $self->{video_link} ); - - return (0); - } - } - return (1); -} - -sub _fetchConfig { - my ( $self, $url, $id ) = @_; - - my $curl = clive::Curl->instance; - - my $content; - if ( $curl->fetchToMem( $url, \$content, "config" ) == 0 ) { - - my $xurl = "http://video.golem.de/download/$id"; - my $config = clive::Config->instance->config; - - my $title = $1 - if ( $content =~ /<title>(.*?)<\/title>/ ); - - my $fmt; - if ( $config->{format} eq "best" ) { - - my %re = ( path => qr|<filename>(.*?)</filename>| ); - my @fnames = $content =~ /$re{path}/g; - - foreach my $i (qw/hd sd ipod/) { - if ( my @b = grep( /$i/, @fnames ) ) { - $fmt = $b0; - last; - } - } - - $fmt =~ s/hd/high/; - $fmt =~ s/sd//; # medium - } - else { - $fmt = $config->{format}; - $fmt =~ s/default//; # medium (default) - } - - $xurl .= "?q=$fmt" - if $fmt; - - $self->{page_title} = $title; - $self->{video_link} = $xurl; - - return (0) - if $xurl; - } - return (1); -} - -1; - -# And the wind began to howl.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Google.pm
Deleted
@@ -1,73 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Google; - -use warnings; -use strict; - -use clive::Error qw(CLIVE_FORMAT); - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("google"); - - my %re = ( - id => qr|docid:'(.*?)'|, - xurl => qr|videoUrl\\x3d(.*?)\\x26|, - ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - - my $mp4 = "http://$1=ck1" - if ( $$content =~ /http:\/\/(.*?)\=ck1/ ); - - my $config = clive::Config->instance->config; - - my $xurl; - if ( ( $config->{format} eq "mp4" || $config->{format} eq "best" ) - && $mp4 ) - - { - $xurl = $mp4; - } - else { - require URI::Escape; - $xurl = URI::Escape::uri_unescape( $tmp->{xurl} ); - } - - $$props->video_id( $tmp->{id} ); - $$props->video_link($xurl); - - return (0); - } - return (1); -} - -1; - -# The thief he kindly spoke.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Liveleak.pm
Deleted
@@ -1,85 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Liveleak; - -use warnings; -use strict; - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("liveleak"); - - my %re = ( - id => qr|token=(.*?)'&|, - config => qr|'config','(.*?)'|, - ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - if ( _parseConfig( $self, $tmp->{config} ) == 0 ) { - $$props->video_id( $tmp->{id} ); - $$props->video_link( $self->{video_link} ); - return (0); - } - } - return (1); -} - -sub _parseConfig { - my ( $self, $url ) = @_; - - require URI::Escape; - $url = URI::Escape::uri_unescape($url); - - my $curl = clive::Curl->instance; - my $log = clive::Log->instance; - - my $content; - if ( $curl->fetchToMem( $url, \$content, "config" ) == 0 ) { - my %re = ( file => qr|<file>(.*?)</file>| ); - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, \$content ) == 0 ) { - if ( $curl->fetchToMem( $tmp->{file}, \$content, "playlist" ) - == 0 ) - { - %re = ( location => qr|<location>(.*?)</location>| ); - $tmp = undef; - if (clive::Util::matchRegExps( \%re, \$tmp, \$content ) == 0 ) - { - $self->{video_link} = $tmp->{location}; - $self->{video_link} =~ tr/ //d; - return (0); - } - } - } - } - return (1); -} - -1; - -# There are many here among us.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Sevenload.pm
Deleted
@@ -1,94 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### - -# Rewritten from the original code contribution by Kai Wasserbach -# <debian@carbon-project.org> which was written in Python for clive 1.0. - -package clive::Host::Sevenload; - -use warnings; -use strict; - -use clive::Error qw(CLIVE_REGEXP); - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("sevenload"); - - my %re = ( config => qr|configPath=(.*?)"| ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, $content ) == 0 ) { - return _parseConfig( $self, $tmp->{config}, $props ); - } - return (1); -} - -sub _parseConfig { - my ( $self, $url, $props ) = @_; - - require URI::Escape; - $url = URI::Escape::uri_unescape($url); - - my $curl = clive::Curl->instance; - my $log = clive::Log->instance; - - my $content; - if ( $curl->fetchToMem( $url, \$content, "config" ) == 0 ) { - - my $re = qr|item id="(\w+)">\s+<title>(.*?)</|i; - - if ( $content =~ $re ) { - my ( $id, $title ) = ( $1, $2 ); - $$props->video_id($id); - $$props->page_title( undef, $title ); - } - else { - clive::Log->instance->err( CLIVE_REGEXP, "no match: `$re'" ); - return (1); - } - - $re = qr|location seeking="yes">(.*?)</|i; - - if ( $content =~ /$re/ ) { - my $lnk = $1; - $lnk =~ s/&/&/g; - $$props->video_link($lnk); - } - else { - clive::Log->instance->err( CLIVE_REGEXP, "no match: `$re'" ); - return (1); - } - - return (0); - } - return (1); -} - -1; - -# But ah, you and I we've been through that.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Spiegel.pm
Deleted
@@ -1,133 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Spiegel; - -use warnings; -use strict; - -# The fetched config xml contains paths to -# 3gp, small, etc. but we are yet to find -# a working link to test them properly. - -# h264 and the vp_(*) videos seem to work OK. - -use clive::Curl; -use clive::Log; - -sub new { - return bless( {}, shift ); -} - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("spiegel"); - - my %re = ( id => qr|/video/video-(.*?)\.| ); - - my $id = $1 - if ( $$props->page_link =~ /$re{id}/ ); - - my $log = clive::Log->instance; - - if ( !$id ) { - $log->errn("not matched: `$re{id}'"); - return (1); - } - - # playlist: get title (html page does not disclose title) - if ( _fetchPlaylist( $self, $id ) == 0 ) { - - # config: get list of available videos - if ( _fetchConfig( $self, $id ) == 0 ) { - $$props->video_id($id); - $$props->page_title( undef, $self->{title} ); - $$props->video_link( $self->{video_link} ); - return (0); - } - } - return (1); -} - -sub _fetchPlaylist { - my ( $self, $id ) = @_; - - my $url = "http://www1.spiegel.de/active/playlist/fcgi/playlist.fcgi/" - . "asset=flashvideo/mode=id/id=$id"; - - my $curl = clive::Curl->instance; - - my $content; - if ( $curl->fetchToMem( $url, \$content, "playlist" ) == 0 ) { - my %re = ( headline => qr|<headline>(.*?)</headline>| ); - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, \$content ) == 0 ) { - $self->{title} = $tmp->{headline}; - return (0); - } - } - return (1); -} - -sub _fetchConfig { - my ( $self, $id ) = @_; - - my $url = "http://video.spiegel.de/flash/$id.xml"; - my $curl = clive::Curl->instance; - - my $content; - if ( $curl->fetchToMem( $url, \$content, "config" ) == 0 ) { - my %re = ( - path => qr|<filename>(.*?)</filename>|, - rate => qr|_(\d+)\.| - ); - - my @fnames = $content =~ /$re{path}/g; - my $path = $fnames0; # default format - - my $config = clive::Config->instance->config; - - if ( $config->{format} eq "best" ) { - my %rates; # Ignores iphone, 3gp etc. - foreach (@fnames) { - $rates{$1} = $_ - if ( $_ =~ /$re{rate}/ ); - } - my $best = ( sort { $b <=> $a } keys %rates )0; - $path = $rates{$best}; - } - else { - if ( my @m = grep( /$config->{format}/i, @fnames ) ) { - $path = $m0; - } - } - if ($path) { - $self->{video_link} = "http://video.spiegel.de/flash/$path"; - return (0); - } - } - return (1); -} - -1; - -# Two riders were approaching.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Vimeo.pm
Deleted
@@ -1,89 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Vimeo; - -use warnings; -use strict; - -use clive::Error qw(CLIVE_REGEXP); - -sub new { return bless ({}, shift); } - -sub parsePage { - my ( $self, $content, $props ) = @_; - - $$props->video_host("vimeo"); - - my $id = $1 if $$props->page_link =~ /vimeo\.com\/(\d+)/; - - unless ($1) { - clive::Log->instance->err (CLIVE_REGEXP, "no match: video id"); - return (1); - } - - my $config_url = "http://vimeo.com/moogaloop/load/clip:$1"; - my $rc = _parseConfig ($self, $config_url, $1); - - unless ($rc) { - $$props->video_id ($id); - $$props->video_link ($self->{video_link}); - } - - return ($rc); -} - -sub _parseConfig { - my ( $self, $url, $id ) = @_; - - my $curl = clive::Curl->instance; - - my $content; - if ( $curl->fetchToMem( $url, \$content, "config" ) == 0 ) { - my %re = ( - sig => qr|<request_signature>(.*?)</request_signature>|, - sig_exp => - qr|request_signature_expires>(.*?)</request_signature_expires>| - ); - - my $tmp; - if ( clive::Util::matchRegExps( \%re, \$tmp, \$content ) == 0 ) { - my $xurl = "http://vimeo.com/moogaloop/play/clip:$id" - . "/$tmp->{sig}/$tmp->{sig_exp}/?q="; - my $config = clive::Config->instance->config; - my $q = "sd"; - if ( $config->{format} eq "hd" - || $config->{format} eq "best" ) - { - if ( $content =~ /<hd_button>(.*?)<\/hd_button>/ ) { - $q = "hd" if ( $1 eq "1" ); - } - } - $xurl .= $q; - $self->{video_link} = $xurl; - return (0); - } - } - return (1); -} - -1; - -# So let us not talk falsely now.
View file
clive-2.2.22.tar.bz2/lib/clive/Host/Youtube.pm
Deleted
@@ -1,131 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009,2010 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Host::Youtube; - -use warnings; -use strict; - -sub new { return bless ({}, shift); } - -sub parsePage { - my ($self, $content, $props) = @_; - - $$props->video_host ("youtube"); - - my %re = ( - id => qr|&video_id=(.*?)&|, - fmt_url_map => qr|fmt_url_map=(.*?)&|, - ); - - my $tmp; - if (clive::Util::matchRegExps (\%re, \$tmp, $content) == 0) { - - my $best; - my %h; - - require URI::Escape; - - foreach (split /,/, URI::Escape::uri_unescape ($tmp->{fmt_url_map})) { - my ($id, $url) = split /\|/, $_; - $best = $url unless $best; - $h{$id} = $url; - } - - my $url; - - my $config = clive::Config->instance->config; - - if ($config->{format} eq 'best') { - $url = $best; - } - else { - $url = toURL ($self, $config->{format}, \%h); - $url = toURL ($self, 'default', \%h) unless $url; - } - - $$props->video_id ($tmp->{id}); - $$props->video_link ($url); - - return 0; - } - - return 1; -} - -sub toURL { - my ($self, $fmt, $h) = @_; - - $fmt = 'flv_240p' if $fmt eq 'default'; - $fmt = toFmt ($self, $fmt); - - foreach (keys %{$h}) - { return $$h{$_} if $_ eq $fmt; } - - return undef; -} - -sub toFmt { - my ($self, $id) = @_; - -# http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs -# $container_$maxwidth = '$fmt_id' - - my %h = ( - # flv - flv_240p => '5', - flv_360p => '34', - flv_480p => '35', - # mp4 - mp4_360p => '18', - mp4_720p => '22', - mp4_1080p => '37', - mp4_3072p => '38', - # webm - webm_480p => '43', - webm_720p => '45', - # 3gp - '3gp_144p'=> '17', - -# For backward-compatibility only. - mobile => '17', - sd_270p => "18", - sd_360p => "34", - hq_480p => "35", - hd_720p => "22", - hd_1080p => "37", - webm_480p => "43", - webm_720p => "45", - '3gp' => "17", - mp4 => "18", - hq => "35", - hd => "22", - ); - - foreach (keys %h) - { return $h{$_} if $id eq $_; } - - return $id; -} - -1; - -# And this is not our fate.
View file
clive-2.2.22.tar.bz2/lib/clive/HostFactory.pm
Deleted
@@ -1,76 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::HostFactory; - -use warnings; -use strict; - -use clive::Error qw(CLIVE_OK); - -my @_hosts = ( - "Youtube", qr|youtube.com|i, -# Sat Dec 11 2010: webm_*, 3gp_144p support found in Youtube.pm, website -# no longer seems to list them, however. Listing here only those formats -# that seem to still work. -"default|flv_240p|flv_360p|flv_480p|mp4_360p|mp4_720p|mp4_1080p|mp4_3072p", - "Youtube", qr|last.fm|i, "see youtube formats" , - "Google", qr|video.google.|i, "default|mp4" , - "Sevenload", qr|sevenload.com|i, "default" , - "Break", qr|break.com|i, "default" , - "Liveleak", qr|liveleak.com|i, "default" , - "Gaskrank", qr|gaskrank.tv|i, "default" , - "Dailymotion", qr|dailymotion.com|i, "default|hq|hd" , - "Vimeo", qr|vimeo.com|i, "default|hd" , - "Spiegel", qr|spiegel.de|i, "default|vp6_928|vp6_576|vp6_64|h264_1400" - , - "Golem", qr|golem.de|i, "default|ipod|high" , - "Clipfish", qr|clipfish.de|i, "default" , - "Funnyhub", qr|funnyhub.com|i, "default" , - "Buzzhumor", qr|buzzhumor.com|i, "default" , -); - -sub new { - my ( $class, $url ) = @_; - foreach (@_hosts) { - my ( $host, $re ) = @{$_}; - if ( $url =~ /$re/ ) { - my $req = "clive/Host/$host.pm"; - $class = "clive::Host::$host"; - require $req; - return $class->new(@_); - } - } -} - -sub dumpHosts { - my $self = shift; - foreach (@_hosts) { - my ( $host, $re, $fmts ) = @{$_}; - printf( "%s\t%s\n", $1, $fmts ) - if ( $re =~ /xsm:(.*?)\)/ && $re !~ /last\.fm/ ); - } - exit(CLIVE_OK); -} - -1; - -# The hour's getting late.
View file
clive-2.2.22.tar.bz2/lib/clive/Log.pm
Deleted
@@ -1,89 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Log; - -use warnings; -use strict; - -use base 'Class::Singleton'; - -use clive::Error qw(CLIVE_OK); - -sub init { - my $self = shift; - - $self->{return_code} = CLIVE_OK; - - my $config = clive::Config->instance->config; - $self->{quiet} = $config->{quiet}; - - # Go unbuffered. - select STDERR; - $| = 1; - select STDOUT; - $| = 1; -} - -sub out { - my $self = shift; - return if $self->{quiet}; - - my $ref - = clive::Config->instance->config->{stderr} - ? \*STDERR - : \*STDOUT; - - my $fmt = shift; - my $str = @_ ? sprintf( $fmt, @_ ) : $fmt; - - print $ref $str; -} - -sub err { - my $self = shift; - $self->{return_code} = shift; - - return if $self->{quiet}; - - my $fmt = shift; - my $msg = "error: " . ( @_ ? sprintf( $fmt, @_ ) : $fmt ); - - print( STDERR "$msg\n" ); -} - -sub errn { - my $self = shift; - - print( STDERR "\n" ) - if ( !$self->{quiet} ); - - err ( $self, @_ ); -} - -sub returnCode { - my $self = shift; - return $self->{return_code}; -} - -1; - -# All along the watchtower.
View file
clive-2.2.22.tar.bz2/lib/clive/Progress
Deleted
-(directory)
View file
clive-2.2.22.tar.bz2/lib/clive/Progress/Bar.pm
Deleted
@@ -1,180 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Progress::Bar; - -# Based on wget code. - -use warnings; -use strict; - -use File::Basename qw(basename); - -use clive::Util; - -use constant DEFAULT_TERM_WIDTH => 80; -use constant REFRESH_INTERVAL => 0.2; - -my $recv_sigwinch; - -sub new { - my ( $class, $props ) = @_; - - my $initial = $$props->initial_length; - my $total = $$props->file_length; - - $total = $initial - if ( $initial > $total ); - - $recv_sigwinch = 0; - $SIG{WINCH} = \&handle_sigwinch; - - my $self = { - props => $$props, - initial => $initial, - total => $total, - term_width => clive::Util::termWidth(), - width => DEFAULT_TERM_WIDTH - 1, - last_update => 0, - done => 0, - time_started => time, - }; - - return bless( $self, $class ); -} - -sub update { - my ( $self, $clientp, $total, $now, $ultotal, $ulnow ) = @_; - - my $force_update = 0; - if ($recv_sigwinch) { - my $old_width = $self->{term_width}; - $self->{term_width} = clive::Util::termWidth(); - if ( $self->{term_width} != $old_width ) { - $self->{width} = $self->{term_width} - 1; - $force_update = 1; - } - $recv_sigwinch = 0; - } - - my $tnow = time; - my $elapsed = $tnow - $self->{time_started}; - - if ( !$self->{done} ) { - if ( ( $elapsed - $self->{last_update} ) < REFRESH_INTERVAL - && !$force_update ) - { - return ( 0, 0 ); - } - } - else { - $now = $self->{total}; - } - - $self->{last_update} = $elapsed; - my $size = $self->{initial} + $now; - - my $fname_len = 32; - if ( $self->{width} > DEFAULT_TERM_WIDTH ) { - $fname_len += $self->{width} - DEFAULT_TERM_WIDTH; - } - - my $buf = substr( basename( $self->{props}->filename ), 0, $fname_len ); - - my $percent = 0; - my $stop_transfer = 0; - - if ( $self->{total} > 0 ) { - my $_size = !$self->{done} ? $size : $now; - $percent = 100.0 * $size / $self->{total}; - if ( $percent < 100 ) { - $buf .= sprintf( " %2d%% ", $percent ); - } - else { - $buf .= sprintf(" 100%%"); - } - $buf .= sprintf( - " %4.1fM / %4.1fM", - clive::Util::toMB($_size), - clive::Util::toMB( $self->{total} ) - ); - - my $stop_after = clive::Config->instance->config->{stop_after}; - if ($stop_after) { - if ( $stop_after =~ /(.*?)M$/ ) { - $stop_transfer = 1 - if ( clive::Util::toMB($_size) >= $1 ); - } - elsif ( $stop_after =~ /(.*?)%$/ ) { - $stop_transfer = 1 - if ( $percent >= $1 ); - } - } - } - - my $rate = $elapsed ? ( $now / $elapsed ) : 0; - my $tmp = ""; - if ( $rate > 0 ) { - my $eta; - if ( !$self->{done} ) { - my $left = ( $total - $now ) / $rate; - $eta = clive::Util::timeToStr($left); - } - else { - $eta = clive::Util::timeToStr($elapsed); - } - my ( $unit, $_rate ) = clive::Util::toUnits($rate); - $tmp = sprintf( " %4.1f%s %6s", $_rate, $unit, $eta ); - } - else { - $tmp = " --.-K/s --:--"; - } - - # pad to max. width leaving enough space for rate+eta - my $pad = $self->{width} - length($tmp) - length($buf); - $buf .= sprintf( "%${pad}s", " " ); - $buf .= $tmp; # append rate+eta - - clive::Log->instance->out("\r$buf"); - $self->{count} = $now; - - return ( $percent, $stop_transfer, \$self->{props} ); -} - -sub finish { - my $self = shift; - if ( $self->{total} > 0 - && $self->{count} + $self->{initial} > $self->{total} ) - { - $self->{total} = $self->{initial} + $self->{count}; - } - - $self->{done} = 1; - update( $self, -1, -1, -1, -1, -1 ); -} - -sub handle_sigwinch { - $recv_sigwinch = 1; -} - -1; - -# Princess kept the view.
View file
clive-2.2.22.tar.bz2/lib/clive/Util.pm
Deleted
@@ -1,140 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Util; - -use warnings; -use strict; - -eval("use Term::ReadKey"); -my $TermReadKey = int( !$@ ); - -use clive::Error qw(CLIVE_REGEXP); - -use constant DEFAULT_TERM_WIDTH => 80; -use constant MBDIV => 0x100000; - -sub termWidth { - return DEFAULT_TERM_WIDTH - unless $TermReadKey; - my ($width) = Term::ReadKey::GetTerminalSize(); - return $width; -} - -sub toMB { - my $bytes = shift; - return $bytes / MBDIV; -} - -sub fileExists { - my ($path) = @_; - return -s $path || 0; -} - -sub timeToStr { - my $secs = shift; - - my $str; - if ( $secs < 100 ) { - $str = sprintf( "%02ds", $secs ); - } - elsif ( $secs < 100 * 60 ) { - $str = sprintf( "%02dm%02ds", $secs / 60, $secs % 60 ); - } - elsif ( $secs < 48 * 3600 ) { - $str = sprintf( "%02dh%02dm", $secs / 3600, ( $secs / 60 ) % 60 ); - } - elsif ( $secs < 100 * 86400 ) { - $str = sprintf( "%dd%02dh", $secs / 86400, ( $secs / 3600 ) % 60 ); - } - else { - $str = sprintf( "%dd", $secs / 86400 ); - } - return $str; -} - -sub toUnits { - my $rate = shift; - my $units = "K/s"; - if ($rate >= 1024*1024*1024) { - $rate /= 1024*1024*1024; - $units = "G/s"; - } - elsif ($rate >= 1024*1024) { - $rate /= 1024*1024; - $units = "M/s"; - } - else - { $rate /= 1024; } - ($units, $rate); -} - -sub matchRegExps { - my ( $regexps, $results, $content ) = @_; - while ( my ( $key, $re ) = each( %{$regexps} ) ) { - $$results->{$key} = $1 if $$content =~ /$re/; - if ( !$$results->{$key} ) { - clive::Log->instance->err( CLIVE_REGEXP, "no match: `$re'" ); - return (1); - } - } - return (0); -} - -sub toDomain { - my $uri = shift; - - my ( $scheme, $authority, $path, $query, $fragment ) - = $uri - =~ m{(?:(^:/?#+):)?(?://(^/?#*))?(^?#*)(?:\?(^#*))?(?:#(.*))?}o; - - return split( /\./, $authority ); -} - -sub prompt { - print shift; - chomp( my $ln = <STDIN> ); - return $ln; -} - -sub fromEntities { - my %conv_table = ( - """ => "\"", - """ => "\"", - "&" => "&", - "&" => "&", - "'" => "'", - "'" => "'", - "<" => "<", - "<" => "<", - ">" => ">", - ">" => ">", - ); - my $str = shift; - while ( my ( $from, $to ) = each(%conv_table) ) { - $str =~ s/$from/$to/g; - } - return $str; -} - -1; - -# While all the women came and went.
View file
clive-2.2.22.tar.bz2/lib/clive/Video.pm
Deleted
@@ -1,269 +0,0 @@ -# -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# -# Copyright 2009 Toni Gundogdu. -# -# This file is part of clive. -# -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### -package clive::Video; - -use warnings; -use strict; - -use Carp; -use POSIX; -use File::Basename qw(basename); -use File::Spec::Functions; -use Cwd qw(getcwd); -use Encode qw(decode_utf8); - -use clive::Util; - -our $AUTOLOAD; - -sub new { - my $class = shift; - my %fields = ( - page_link => undef, - video_id => undef, - file_length => undef, - content_type => undef, - file_suffix => undef, - video_link => undef, - video_host => undef, - video_format => undef, - base_filename => undef, - filename => undef, - initial_length => undef, - time_stamp => undef, - nothing_todo => undef, - ); - my $self = { - _permitted => \%fields, - %fields, - }; - return bless( $self, $class ); -} - -sub page_title { - my $self = shift; - if (@_) { - my ( $content, $title ) = @_; - if ( !$title ) { - require HTML::TokeParser; - my $p = HTML::TokeParser->new($content); - $p->get_tag("title"); - $self->{page_title} = $p->get_trimmed_text; - _cleanupTitle($self); - } - else { - $self->{page_title} = clive::Util::fromEntities($title); - } - } - return $self->{page_title}; -} - -sub printVideo { - my $self = shift; - my $str = sprintf( - "file: %s %.1fM %s\n", - $self->{base_filename}, - clive::Util::toMB( $self->{file_length} ), - $self->{content_type} - ); - clive::Log->instance->out($str); -} - -sub emitCSV { - my $self = shift; - - require URI::Escape; - - my @fields = qw(base_filename file_length video_link); - - my $str = "csv:"; - $str .= sprintf( qq/"%s",/, $self->$_ ) foreach (@fields); - $str =~ s/,$//; - - clive::Log->instance->out("$str\n"); -} - -sub formatOutputFilename { - my ( $self, $suffix, $index ) = @_; - - my $config = clive::Config->instance->config; - my $fname; - - if ( !$config->{output_file} ) { - - # Apply character-class. - my $title = $self->{page_title}; - my $cclass = $config->{cclass} || qr|\w|; - - $title = join( '', $self->{page_title} =~ /$cclass/g ) - if ( !$config->{no_cclass} ); - - # Format output filename. - $fname = $config->{filename_format} || "%t.%s"; - - my $id = $self->{video_id}; - - # $id =~ s/-/_/g; - - $title = $id - if ( !$title && $fname !~ /%i/ ); - - $fname =~ s/%t/$title/; - if ( $self->{file_suffix} ) { - $fname =~ s/%s/$self->{file_suffix}/; - } - elsif ($suffix) { - my $tmp = "$index.$suffix"; - $fname =~ s/%s/$tmp/; - } - $fname =~ s/%i/$id/; - $fname =~ s/%h/$self->{video_host}/; - - my $config = clive::Config->instance->config; - my $path = Encode::decode_utf8( $config->{save_dir} or getcwd ); - - $fname = catfile( $path, $fname ); - my $tmp = $fname; - - for ( my $i = 1; $i < 9999; ++$i ) { - $self->{initial_length} = clive::Util::fileExists($fname); - - if ( $self->{initial_length} == 0 ) { - last; - } - elsif ( $self->{initial_length} == $self->{file_length} ) { - $self->{nothing_todo} = 1; - last; - } - else { - if ( $config->{continue} ) { - last; - } - } - $fname = "$tmp.$i"; - } - } - else { - $self->{initial_length} - = clive::Util->fileExists( $config->{output_file} ); - if ( $self->{initial_length} == $self->{file_length} ) { - $self->{nothing_todo} = 1; - } - else { - $fname = $config->{output_file}; - } - } - - if ( !$config->{continue} ) { - $self->{initial_length} = 0; - } - - $self->{base_filename} = basename($fname); - $self->{filename} = $fname; -} - -sub fromCacheRecord { - my ( $self, $record ) = @_; - - # No need to keep order in sync with clive::Video::toCacheRecord - # or clive::Cache::_mapRecord -- just make sure each item gets - # set here. - $self->{page_title} = decode_utf8( $$record{page_title} ); - $self->{page_link} = $$record{page_link}; - $self->{video_id} = $$record{video_id}; - $self->{video_link} = $$record{video_link}; - $self->{video_host} = $$record{video_host}; - $self->{video_format} = $$record{video_format}; - $self->{file_length} = $$record{file_length}; - $self->{file_suffix} = $$record{file_suffix}; - $self->{content_type} = $$record{content_type}; - $self->{time_stamp} = $$record{time_stamp}; - - _cleanupTitle($self); -} - -sub toCacheRecord { - my $self = shift; - - # Should really remove all '#' from the strings - # before storing them. Living on the edge. - $self->{page_title} =~ tr{#}//d; - - my $title = $self->{page_title}; - -=for comment - # See: http://code.google.com/p/clive/issues/detail?id=42 - if ( sprintf( "%vd", $^V ) =~ /(\d+).(\d+).(\d+)/ ) { - $title = decode_utf8($title) - if ( $1 >= 5 && $2 >= 10 ); - } -=cut - - # Keep the order in sync with clive::Cache::_mapRecord. - my $record - = $title . "#" - . $self->{page_link} . "#" - . $self->{video_id} . "#" - . $self->{video_link} . "#" - . $self->{video_host} . "#" - . $self->{video_format} . "#" - . $self->{file_length} . "#" - . $self->{file_suffix} . "#" - . $self->{content_type} . "#" - . POSIX::strftime( "%F %T", localtime ) # time_stamp - ; - return $record; -} - -sub _cleanupTitle { - my $self = shift; - my $title = $self->{page_title}; - - $title =~ s/youtube|liveleak.com|dailymotion|on vimeo//gi; - $title =~ s/|clipfish|funny hub//gi; - $title =~ s/video(s?)//gi; - $title =~ s/^-\s+//; - $title =~ s/\s+$//; - - $self->{page_title} = $title; -} - -sub AUTOLOAD { - my $self = shift; - my $type = ref($self) - or croak("$self is not an object"); - my $name = $AUTOLOAD; - $name =~ s/.*://; - unless ( exists( $self->{_permitted}->{$name} ) ) { - croak("cannot access `$name' field in class $type"); - } - if (@_) { - return $self->{$name} = shift; - } - else { - return $self->{$name}; - } -} - -1; - -# Barefoot servants too.
View file
clive-2.2.22.tar.bz2/man1
Deleted
-(directory)
View file
clive-2.2.22.tar.bz2/man1/clive.1.pod
Deleted
@@ -1,550 +0,0 @@ - -=head1 NAME - -clive - command line video extraction utility - -=head1 SYNOPSIS - -clive options... URL... - -=head1 DESCRIPTION - -clive is a command line video extraction utility for Youtube and other similar -video-sharing websites. It was written to work around the Adobe Flash plugin -requirement as the technology is poorly supported on Unix-like systems. - -clive is not an universal video extraction utility. In fact, it supports only -a number of video websites. Each website typically exposes access to the video -content in a very different way, meaning that clive has to be customized for -each website in order to download any videos from them. - -=head1 OPTION SYNTAX - -You may freely mix different option styles and specify options after -the command line arguments, e.g.: - % clive -c URL --format=best - -You may also put several options together that do not require arguments: - % clive -cnrf best URL - -Note that the "dashed" options have aliases. For example: - % clive --no-extract --no_extract --noextract - % clive --cache-read --cache_read --cacheread - -=head1 OPTIONS - -=over 4 - -=item B<-h, --help> - -Print help and exit. - -=item B<-v, --version> - -Print version and exit. - -=item B<--hosts> - -Print supported hosts with available formats and exit. - -=item B<--upgrade-config> - -Upgrade clive 2.0/2.1 config to current 2.2+ format and exit. - -=item B<-l, --last> - -Re-feed the previously fed video page links from the last run time. - -=item B<--last-file>=I<path> - -Use I<path> instead of the default path. See also L</FILES>. - -=back - -B<Output options> - -=over 4 - -=item B<--emit-csv> - -Print (or emit) video details in CSV format to standard output. -Implies --no-extract. - -=item B<--print-fname> - -Print filename on a separate line before download starts. - -=item B<--debug> - -Print cURL debug (or verbose) messages to standard error. - -=item B<-q, --quiet> - -Turn off all output to standard output and error. - -=item B<--stderr> - -Direct all output to standard error. - -=back - -B<HTTP Options> - -=over 4 - -=item B<--agent>=I<string> - -Identify clive as I<string> to HTTP servers. Defaults to "Mozilla/5.0". - -=item B<--connect-timeout>=I<seconds> - -Maximum time in I<seconds> allowed for connection to take. Defaults to 30. - -=item B<--connect-timeout-socks>=I<seconds> - -Same as above but tries to workaround the SOCKS proxy bug in cURL. -Defaults to 30. - -=item B<--proxy>=I<address> - -Use I<address> for HTTP proxy. Example: "http://foo:1234". - -=item B<--no-proxy> - -Disable all use of HTTP proxy, even if http_proxy environment variable is set. - -=item B<--cookie-jar>=I<file> - -Enable cookies, which are otherwise rejected by default, and have libcurl -to write them to I<file>. Specify "-" to instead to have the cookies written -to stdout. - -=back - -B<Cache Options> - -=over 4 - -=item B<--cache-file>=I<path> - -Use I<path> instead of the default path. See L</FILES>. - -=item B<-r, --cache-read> - -Read video details from cache record if it exists. Allows clive to -skip video page fetching and parsing again. See L</CACHE> section for more -on this. - -=item B<-d, --cache-dump> - -Dump cache records to standard output. - -=item B<--cache-dump-format>=I<format-string> - -Used to format the output of the above. Defaults to "%n: %t %f, %mMB". - -Example: - % clive --cache-dump --cache-dump-format="%d: %t" - -Supported format specifiers: - %t .. video page title - %i .. video id - %h .. video host - %l .. video file length (bytes) - %m .. video file length (MB) - %d .. date (last update) - %T .. time (last update) - %s .. time stamp (same as "%d %T") - %f .. video file format - %n .. index - -=item B<--cache-grep>=I<pattern> - -Grep stored cache records for I<pattern>. See also L</EXAMPLES - ADVANCED USE>. - -=item B<-i, --cache-ignore-case> - -Ignore case-differences while matching records. - -=item B<-D, --cache-remove-record> - -Remove matched records from cache. - -=item B<--cache-clear> - -Truncate cache records. - -=item B<--no-cache> - -Disable all (read and write) cache use. - -=back - -B<Download Options> - -=over 4 - -=item B<-f, --format>=I<format> - -Download the I<format> of the video. If I<format> is set to I<best>, clive -will attempt to download the best quality of the video. - -If this option is not used (or is used with "default"), clive will -attempt to download whatever is assumed to be the default format -for the website. - -Note also that each I<format> is specific to a website. See -L</FORMATS> for more. - -=item B<-n, --no-extract> - -Do not extract the video. In other words: simulate only to the point -that clive verifies the video link after fetching and parsing the -video page. - -=item B<-O, --output-file>=I<file> - -Write video to I<file>. Overwrites an already existing file. - -Do not use this option when you are downloading more than one video - on one go. - -See also the note below. - -=item B<-c, --continue> - -Continue partially downloaded video file. - -Note that, by default, clive appends a numeric suffix to the filename -if the file exists already. That is unless: - - * file is already completely retrieved, or: - * -c or -O is used - -=item B<--save-dir>=I<dir> - -Save extracted videos to I<dir>. clive defaults to the current working -directory. - -=item B<--cclass>=I<class> - -Use character-I<class> to filter video page titles. Defaults to "\w". -This is a Perl regular expression character class. For example: -"A-Za-z0-9". - -=item B<-C, --no-cclass> - -Disables the use of B<--cclass>. Causes clive to use the video page -title as it is for output filename. - -=item B<--filename-format>=I<format-string> - -Use I<format-string> to format output video filenames. Default is "%t.%s". - -Supported format specifiers: - %t .. video page title (after applying character-class filter) - %s .. video file suffix (e.g. "flv") - %i .. video id - %h .. video host - -=item B<--exec>=I<command>; - -Defines the I<command> to run when video file transfer completes. -Note that B<--exec-run> must be used to actually cause clive -to invoke the defined I<command>. - -Optional arguments may be passed to the command. The expression must be -terminated by a semicolon (";"). If the specifier "%i" appears anywhere -in the I<command>, it is replaced by the pathname of the extracted -video file. - -=item B<--exec>=I<command>+ - -Same as above but "%i" is replaced with as many path names as -possible for the invocation of I<command>. - -=item B<-e, --exec-run> - -Causes clive to invoke the command defined with B<--exec> when -transfer finishes. - -=item B<--stream-exec>=I<command> - -Define the command to be invoked with B<--stream> and B<--stream-pass>. -If a "%i" specifier is used in the I<command>, it will be replaced with -either video file path name (B<--stream>) or parsed video link -(B<--stream-pass>). - -=item B<--stream>=I<percent> - -Causes clive to fetch, parse, start download and eventually invoke -the command defined with B<--stream-exec> when the transfer reaches -the percentage defined with this option. See also L</EXAMPLES>. - -Note that clive does nothing to check if there is enough data buffered -before invoking the B<--stream-exec> defined I<command>. If the transfer -rate drops significantly after starting the process and it runs out of data, -clive does nothing to fix this. - -Also note that clive will not continue to download another file before the -child process exits. - -This mode is supported for historical reasons. Consider using -B<--stream-pass> instead. - -=item B<-s, --stream-pass> - -Otherwise the same as above but B<instead of> starting the download, -clive passes the parsed video link to the command defined with -B<--stream-exec>. See also L</EXAMPLES>. - -This option was inspired by a C<clive(1)> wrapper script contributed -by Bill Squire. - -=item B<--limit-rate>=I<amount> - -Limit transfer rate to I<amount> KB/s. - -=item B<--stop-after>=I<size|percent> - -Stop file transfer after I<size> or I<percent>. The value must -be terminated by either '%' or 'M'. - -=back - -=head1 EXAMPLES - BASIC USE - -=over 4 - -=item clive "http://youtube.com/watch?v=3HD220e0bx4" - -Extracts video (flv) from the above video page link. You -can then play the flv video file in a media player. - -=item cat E<gt> url.lst - - http://en.sevenload.com/videos/IUL3gda-Funny-Football-Clips - http://youtube.com/watch?v=3HD220e0bx4 - http://break.com/index/beach-tackle-whip-lash.html - http://www.liveleak.com/view?i=704_1228511265 - -=item cat url.lst | clive - -You can feed clive multiple video page links like this -or as command line arguments. - -=item clive URL1 URL2 URL3 URL4 - -When you are using the pipes, be sure to separate each link with a newline. - -=item xclip -o | clive - -There are many X clipboard utilities. The above example uses C<xclip(1)> -and a pipe to paste (or feed) the contents to clive. - -=item clive -l - -Recall last video page link input. Regardless the way they were fed -to clive. - -=back - -=head1 EXAMPLES - ADVANCED USE - -=over 4 - -=item clive -f best "http://youtube.com/watch?v=3HD220e0bx4" - -Extract the best format of the video. - -=item clive -r -f best "http://youtube.com/watch?v=3HD220e0bx4" - -Same as above but read the cache record without fetching and -parsing the video page again. - -=item clive --cache-dump - -Dump all cache records to stdout. You can use --cache-dump-format -to format the output. - -=item clive -ig "hd" - -Grep for "hd" pattern in cache records. If pattern matches, clive -continues to extract the matched videos. Note the use of "-i" -(--cache-ignore-case). - -=item clive -ig "hd" -D - -Same as above but removes the record from cache instead of extracting -the video. - -=item clive --exec="ffmpeg -i %i -acodec libvorbis %i.ogg;" -e URL - -Copy audio from downloaded video to ogg with C<ffmpeg(1)>. - -=item clive --stream-exec="mplayer -really-quiet %i" --stream=25 URL - -Start playing the video being extracted when the transfer reaches -25% complete. - -=item echo '--stream-exec="mplayer -really-quiet %i"' >> ~/.cliverc - -=item clive -s URL - -Alternative to Adobe Flash. C<vlc(1)> and C<totem(1)> have been reported -to work also. - -=back - -=head1 FORMATS - -Run the program with C<--hosts> to view the supported websites and -format IDs to be used with C<--format>. - -=over 4 - -=item B<youtube.com> - -For historical reasons, you can still use the following format IDs -with Youtube: - mp4, hd, hq, 3gp - -Note however that the above IDs are considered deprecated and will be -removed in the future versions. Run clive with C<--hosts> to get a list -of the current IDs. - -=back - -=head1 FILES - -Should HOME environment variable be undefined for some reason, clive will -use the current working directory instead. - -=over 4 - -=item $HOME/.cliverc, $HOME/.clive/config, $HOME/.config/clive/config - -User configuration file. For example: - % cat >> ~/.cliverc - -f best - --proxy=http://foo:1234 - -=item $HOME/.cache/clive/last - -File containing the last user input (video page links). - -You can use --last-file to override the path, e.g.: - --last-file=/path/to/last/file. - -You can also define this option in the config file. - -See also CLIVE_CACHE notes below. - -=item $HOME/.cache/clive/cache - -BerkeleyDB based cache file containing the records of fetched -and parsed video pages. - -You can use --cache-file to override the path., e.g.: - --cache-file=/path/to/cache/file. - -You can also define this option in the config file. - -See also CLIVE_CACHE notes below. - -=item Notes: CLIVE_CACHE - -clive defaults to use $HOME/.cache/clive/ for "last" and -"cache" files described above. - -The use of the default path can be overridden by -CLIVE_CACHE environment variable. Note that clive -will attempt to create the specified path recursively. - -Examples: - setenv CLIVE_CACHE /home/user/cachedata (in csh terms) - clive # will read/write /home/user/cachedata/(last|cache) - - unsetenv CLIVE_CACHE - clive # read/write $HOME/clive/(last|cache) - - clive --last-file=mylast --cache-file=cachedata/mycache - # read/write "mylast" file, read/write cachedata/mycache file - -=back - -=head1 CACHE - -The purpose of the cache is to allow clive to skip fetching -and parsing the video page again. It does not contain any -actual video data so one should not expect to recover a deleted -video file from the cache. Only some of the parsed details -are stored as records to the cache. - -By now, it is should be a well known fact that the cache fails -with some of the supported hosts. For example Youtube video links -expire after some time, this causes the re-extraction to fail if -the cached video link is used later again. - -This was the main reason why in 2.2.0 reading from cache was -disabled by default. Many users reported the reuse of expired -video links as a bug previously even though it was well documented -in the manual page explaining that most of the HTTP 403/404 errors -were actually caused by expired video links. - -It is, of course, still possible to read from cache. You can -enable this by invoking the --cache-read option. This causes -clive to look up a saved cache record and reuse the stored -video details if they are found instead of fetching the video -page. - -The use of the cache can be disabled with the --no-cache option. -This disables both read and write. Note that if the BerkeleyDB Perl -module is not installed, clive will not use the cache. - -See also the --cache-grep option. - -=head1 DEBUGGING - -Amp up libcurl verbosity: - - % clive --debug URL - -Parse only, do not download the video: - - % clive -n URL - -=head1 EXIT STATUS - -clive exits 0 on success, and E<gt>0 if an error occurs. - - CLIVE_OK = 0 - CLIVE_NOTHINGTODO = 1 # file already retrieved - CLIVE_NOSUPPORT = 2 # host not supported - CLIVE_READ = 3 # file open/read error - CLIVE_GREP = 4 # grep: nothing matched in cache - CLIVE_OPTARG = 5 # invalid option argument - CLIVE_SYSTEM = 6 # system call failed (e.g. fork) - CLIVE_REGEXP = 7 # regexp pattern matching failed - CLIVE_FORMAT = 8 # requested format unavailable - CLIVE_NET = 9 # network error - CLIVE_STOP = 10 # --stop-after - CLIVE_MARKEDBROKEN = 11 # support marked broken - -=head1 WWW - -<http://clive.sourceforge.net/> - -=head1 SEE ALSO - -C<cclive(1)> - -=head1 AUTHOR - -Toni Gundogdu <legatvs at sign gmail com> - -Thanks to all those who have contributed to the project -by sending patches, reporting bugs and writing feedback. -You know who you are. - -=cut
View file
clive-2.2.22.tar.bz2/t/eval-compile.t
Deleted
@@ -1,9 +0,0 @@ -use warnings; -use strict; - -use Test::More qw(no_plan); - -my $output = qx(perl -c -I./blib/lib blib/script/clive 2>&1); - -ok( $output =~ /syntax OK$/ ) - or diag explain $output;
View file
clive-2.2.22.tar.bz2/t/eval-exitstatus.t
Deleted
@@ -1,14 +0,0 @@ -#!/usr/bin/env perl -I./t/lib - -use warnings; -use strict; - -use Test::More tests => 1; - -my $clive = "perl -I./blib/lib blib/script/clive -q"; -my $cmd = "$clive http://nosupport"; -my $output = qx($cmd); - -my $rc = $? >> 8; -ok( $rc == 2 ) - or diag "$cmd\nexpected return code 2 (got $rc)";
View file
clive-2.2.22.tar.bz2/t/eval-pod.t
Deleted
@@ -1,11 +0,0 @@ -use warnings; -use strict; - -use Test::More; - -eval "use Test::Pod 1.00"; -plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; - -my @poddirs = qw(bin man1); - -all_pod_files_ok (all_pod_files(@poddirs));
View file
clive-2.2.22.tar.bz2/ChangeLog -> clive-2.3.3.tar.gz/ChangeLog
Changed
@@ -1,487 +1,1854 @@ -commit 2aec28627f219b58edc82ad0c081144739b12ce5 +commit 6f22d90 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2012-03-16 + + Update NEWS for 2.3.3 + +NEWS + +commit 1867800 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2012-03-16 + + Bump version to 2.3.3 + +bin/clive + +commit 13c5d89 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2012-03-14 + + Do not prepend "http" URL if it is not found + +bin/clive + +commit 02b3f64 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-12-12 + + Use -vq with quvi when supported (#15) + + Mutes: "warning: --quiet: deprecated, use --verbosity instead" + when more recent quvi version is available. + + * http://sourceforge.net/apps/trac/clive/ticket/15 + +bin/clive + +commit 9b32fd2 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-12-12 + + examples/cliverc: Use new category option + + * Comment out deprecated option + +examples/cliverc + +commit 249c3d9 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-11-21 + + Fix a typo in manual + +doc/man1/clive.1.pod + +commit cf1f0dd +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Revise --help output + +bin/clive + +commit f98aa15 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Remove ChangeLog.pre-gitlog, examples/git/hooks/pre-commit + +ChangeLog.pre-gitlog +MANIFEST +examples/git/hooks/pre-commit + +commit d9a00b7 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Bump version to 2.3.2 + +bin/clive + +commit a8ef5a1 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Update NEWS for 2.3.2 + +NEWS + +commit 85e8db7 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Revise README + +README + +commit 78f1a3b +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Revise README.packagers + +README.packagers + +commit 19555bc +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Revise INSTALL + +INSTALL + +commit 5068442 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-21 + + Revise manual + +doc/man1/clive.1.pod + +commit 059b078 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-21 + + Add --user-agent to args used with detected curl + +bin/clive + +commit a1c3802 +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-21 + + Revise examples/cliverc + +examples/cliverc + +commit b5e8ddc +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-10-22 + + Remove print_version + +bin/clive + +commit 1bafddf +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-09-16 + + Add todo/ to skipped + +MANIFEST.SKIP + +commit e06648f +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-09-16 + + Revise README + + * Add INSTALL + * Add README.packagers + +INSTALL +MANIFEST +README +README.packagers + +commit b2c52fc +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-09-16 + + mv man1/ -> doc/ + +MANIFEST +Makefile.PL +doc/man1/clive.1.pod +man1/clive.1.pod +t/clive-Pod.t + +commit dbb0e2f +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-09-16 + + Revise Makefile.PL + +Makefile.PL + +commit 7fd4d2a +Author: Toni Gundogdu <legatvs@gmail.com> +Date: 2011-09-16 + + Cleanup ignored files + +.gitignore +MANIFEST.SKIP +scripts/tidy.sh + +commit c72efe6 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sun Jan 16 18:42:24 2011 +0200 +Date: 2011-08-18 - Set release details for 2.2.22 + Lower quvi prerequisite to 0.2.16.1 - NEWS | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) +README -commit ce187e11802effb6998910c50ece38005b0e8202 +commit 14d2443 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Jan 8 12:56:04 2011 +0200 +Date: 2011-08-07 - MANIFEST.SKIP: Cleanup + Apply style changes - MANIFEST.SKIP | 16 +++++++++------- - 1 files changed, 9 insertions(+), 7 deletions(-) +bin/clive -commit 66ffcdde038575cd2a98b6541d764422124f0a04 +commit ed7dbc3 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Jan 8 12:55:16 2011 +0200 +Date: 2011-06-19 - Add gitignore file + Set release details for 2.3.1.1 - .gitignore | 11 +++++++++++ - 1 files changed, 11 insertions(+), 0 deletions(-) +NEWS -commit ae651acff429cc915c297fc0a310d1f08dd6e6ed +commit cd32360 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Jan 8 12:48:40 2011 +0200 +Date: 2011-06-19 - support-youtube.t: Cleanup, add youtu.be test + Bump version to 2.3.1.1 - t/support-youtube.t | 17 ++++++++--------- - 1 files changed, 8 insertions(+), 9 deletions(-) +bin/clive -commit a81f068443ccc65c5888c0f268993e27fa050a23 +commit 67d5a41 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Jan 8 12:46:47 2011 +0200 +Date: 2011-06-19 - Accept youtu.be URLs #8 - - * http://sourceforge.net/apps/trac/clive/ticket/8 + Rename "video" -> "media" - lib/clive/App.pm | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) +bin/clive -commit b980a6a793d26f2810e40cdf779cc07f05020083 +commit 38dde77 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Fri Jan 7 10:44:45 2011 +0200 +Date: 2011-06-19 - Bump version to 2.2.22 + Update help strings - lib/clive/Config.pm | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +bin/clive -commit d50cbd448d7cfc78cc606a95dd59ce131d1dc988 +commit 6212763 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Fri Jan 7 09:58:46 2011 +0200 +Date: 2011-06-18 - Set release details for 2.2.21 + Tweak MANIFEST.SKIP - NEWS | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) +MANIFEST.SKIP -commit b99c7de084fddb8c762f767e716de0e9daa5332e +commit b00eee3 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sun Jan 2 18:56:28 2011 +0200 +Date: 2011-06-18 - MANIFEST.SKIP: Add patches/ + Set release details for 2.3.1 - MANIFEST.SKIP | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) +NEWS -commit 0d2bb753ff7163e13f8b206c4cb366e97f916416 +commit 5df61a6 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sun Jan 2 18:55:02 2011 +0200 +Date: 2011-06-18 - Dailymotion.pm: Fix family-filter blocker #4 - - * <http://sourceforge.net/apps/trac/clive/ticket/4> + README: Add gitweb URL - lib/clive/Curl.pm | 7 ++- - lib/clive/Host/Dailymotion.pm | 111 +++++++++++++++++++++++----------------- - 2 files changed, 68 insertions(+), 50 deletions(-) +README -commit 42c0c15acb91b12960c4c7398b0a7cec2f7a9126 +commit 7051eb3 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Mon Dec 27 08:19:54 2010 +0200 +Date: 2011-06-11 - Bump version to 2.2.21 + Revise manual - lib/clive/Config.pm | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +man1/clive.1.pod -commit 67a1ab22b2b075114fc5af6db73938ec596717e0 +commit cd6e5c0 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Mon Dec 27 08:17:04 2010 +0200 +Date: 2011-06-11 - Set release details for 2.2.20 + Add --query-formats, deprecate "--format list" - NEWS | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) +bin/clive -commit e4f1981150832650b0eade0fbdfa52089363665b +commit cd2e63d Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Mon Dec 27 08:13:06 2010 +0200 +Date: 2011-06-11 - support-youtube.t: Add HTTPS URL + Add tidy.sh - t/support-youtube.t | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) +scripts/tidy.sh -commit ddd1bc82b51bba62b9a21416244cc1a3fa54f2b8 -Author: Peter Pentchev <roam@ringlet.net> -Date: Wed Dec 22 10:11:45 2010 +0200 +commit b1edcc5 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-06-11 - Process non-HTTP URL's. + Bump quvi prerequisite + +README + +commit 439fd48 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-23 + + Bump version to 2.3.1 + +bin/clive + +commit 922a1c0 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-23 + + croak if invalid --regexp + +bin/clive + +commit 6b32405 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-23 + + Add short-option for --quiet + +bin/clive +man1/clive.1.pod + +commit d8939db +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-23 + + Update README + +README + +commit b1527e1 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-23 + + Cleanup manual + +man1/clive.1.pod + +commit 4639f30 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-23 + + Add 3rd party command autodetection from $PATH + +bin/clive + +commit f63f5db +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-22 + + Manual: Rewrite HISTORY + +man1/clive.1.pod + +commit da82300 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-02 + + Set release details for 2.3.0.3 + +NEWS + +commit 738ba91 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-02 + + Bump version to 2.3.0.3 + +bin/clive + +commit e4c7a39 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-02 + + Manual: Update, cleanup, fix grammar - Some online video services, e.g. YouTube, also provide their content - over HTTPS. In some environments, e.g. weirdly configured corporate - firewalls, it may be useful to use that :) + * Replace example URLs with generic "URL" strings + * Rewrite "multiple URLs" in EXAMPLES - lib/clive/App.pm | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +man1/clive.1.pod -commit 68253c3831632787164f37d61b8fb5f148ba508a +commit f9d7344 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 18 16:49:25 2010 +0200 +Date: 2011-05-02 - Vimeo.pm: Fix video ID parsing #2 + Tweak comment + +examples/cliverc + +commit 68991c3 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-05-02 + + Add support for reading input from files - - http://sourceforge.net/apps/trac/clive/ticket/2 + * Add "error: no input urls" (with check) + * Rename add_queue -> append_queue + * Add is_url subroutine + * Add 2011, email - lib/clive/Host/Vimeo.pm | 28 +++++++++++++++------------- - 1 files changed, 15 insertions(+), 13 deletions(-) +bin/clive -commit fed6949f251289e520991b16c23c16680f80dbb2 +commit d12945e Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 20:03:36 2010 +0200 +Date: 2011-03-15 - Bump version + Set release details for 2.3.0.2 - lib/clive/Config.pm | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +NEWS -commit d3699ce9ff93d8bb2cdd18416a801261976bf827 +commit 99a3ff2 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 19:59:30 2010 +0200 +Date: 2011-03-15 - Set release details for 2.2.19 + Lower version to 2.3.0.2 - NEWS | 18 ++++++++++++++++++ - 1 files changed, 18 insertions(+), 0 deletions(-) +bin/clive -commit 5ffb0403ae723e3b9f55e6f27c7f9bbccbab3cf3 +commit ecfbac1 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 19:48:10 2010 +0200 +Date: 2011-02-19 - lastfm.url: Replace dead link + Manual: Add SYNOPSIS - url_collection/lastfm.url | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +man1/clive.1.pod -commit 861c0149a310c8a6a782ee19e278fec340a1a31f +commit 180fd71 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 19:45:40 2010 +0200 +Date: 2011-02-19 - gvideo.url: Remove dead links + Manual: Use proper tags - url_collection/gvideo.url | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) +man1/clive.1.pod -commit f80b2115dc8681a0420096346782904d0f1f4dd6 +commit 0102b9b Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 19:35:54 2010 +0200 +Date: 2011-02-19 - Fix Ggasgrank -> Ggaskrank typo + Add version word to --version output - MANIFEST | 2 +- - lib/clive/Host/Gasgrank.pm | 52 ------------------------------------------- - lib/clive/Host/Gaskrank.pm | 52 +++++++++++++++++++++++++++++++++++++++++++ - lib/clive/HostFactory.pm | 2 +- - t/support-gasgrank.t | 17 -------------- - t/support-gaskrank.t | 17 ++++++++++++++ - url_collection/gasgrank.url | 1 - - url_collection/gaskrank.url | 1 + - 8 files changed, 72 insertions(+), 72 deletions(-) +bin/clive -commit d4fee1a628fb46c922605ef8cb1c004c40964e9a +commit 4052d08 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 19:20:40 2010 +0200 +Date: 2011-02-18 - Rename evisor.url to gasgrank.url + Add quvi 0.2.12+ --category-http examples - url_collection/evisor.url | 1 - - url_collection/gasgrank.url | 1 + - 2 files changed, 1 insertions(+), 1 deletions(-) +examples/cliverc +man1/clive.1.pod -commit ecd72af36fa67954b8b26903c0ecdb186be9d96e +commit cce7706 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 19:18:13 2010 +0200 +Date: 2011-02-17 - Fix liveleak token/id parsing + examples/cliverc: Fix --get-with - lib/clive/Host/Liveleak.pm | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +examples/cliverc -commit e45631e5d45a5c3b0fa86794f3d079320b83b1d5 +commit 932c248 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 19:13:15 2010 +0200 +Date: 2011-02-14 - _cleanupTitle: remove obsolete strings from array + Make --version less verbose - lib/clive/Video.pm | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +bin/clive -commit 26d8edcc57232d131cc1a70fb7a8ab0477e17744 +commit 301c6ac Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 18:48:21 2010 +0200 +Date: 2011-02-12 - Rename Evisor.pm to Gasgrank.pm + Bump version to 2.3.1 - MANIFEST | 2 +- - lib/clive/Host/Evisor.pm | 52 -------------------------------------------- - lib/clive/Host/Gasgrank.pm | 52 ++++++++++++++++++++++++++++++++++++++++++++ - lib/clive/HostFactory.pm | 2 +- - t/support-evisor.t | 17 -------------- - t/support-gasgrank.t | 17 ++++++++++++++ - 6 files changed, 71 insertions(+), 71 deletions(-) +bin/clive -commit bc5048f5eda3e20f3a4109a99552ae1e3b147ee9 +commit 57846fb Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 18:45:13 2010 +0200 +Date: 2011-02-12 - Remove broken ehrensenf support + Set release details for 2.3.0.1 - MANIFEST | 1 - - lib/clive/Host/Ehrensenf.pm | 71 ------------------------------------------ - lib/clive/HostFactory.pm | 2 - - t/support-ehrensenf.t | 16 --------- - url_collection/ehrensenf.url | 1 - - 5 files changed, 0 insertions(+), 91 deletions(-) +NEWS -commit 3a52ea684c0e20514e3328fecf265e80ad6e1aca +commit f4d8021 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 18:42:26 2010 +0200 +Date: 2011-02-12 - Remove broken cctv support and test + example: pre-commit: add -l=72 - MANIFEST | 1 - - lib/clive/Host/Cctv.pm | 106 ---------------------------------------------- - lib/clive/HostFactory.pm | 1 - - t/support-cctv.t | 16 ------- - url_collection/cctv.url | 1 - - 5 files changed, 0 insertions(+), 125 deletions(-) +examples/git/hooks/pre-commit -commit 69c201089d19e3576d3fbc7f4c26f3aebba68009 +commit 957e31c Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 18:38:00 2010 +0200 +Date: 2011-02-12 - Rename tests, exclude net tests from dist + README: Cleanup, add notes for packagers + +README + +commit 19ad374 +Merge: 09cf6a9 b2cc1e5 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-02-10 + + Merge branch '2.3_gws' - If you need the support-*.t, get them from the repo. + Conflicts: + .gitignore + ChangeLog.pre-gitlog + MANIFEST + MANIFEST.SKIP + Makefile.PL + NEWS + README + bin/clive + lib/clive/App.pm + lib/clive/Config.pm + lib/clive/Curl.pm + lib/clive/Host/Dailymotion.pm + lib/clive/Host/Gaskrank.pm + lib/clive/Host/Liveleak.pm + lib/clive/Host/Vimeo.pm + lib/clive/Host/Youtube.pm + lib/clive/HostFactory.pm + lib/clive/Util.pm + lib/clive/Video.pm + man1/clive.1.pod + t/eval-compile.t + t/eval-exitstatus.t + t/support-break.t + t/support-buzzhumor.t + t/support-clipfish.t + t/support-dailymotion.t + t/support-funnyhub.t + t/support-gaskrank.t + t/support-golem.t + t/support-google.t + t/support-liveleak.t + t/support-sevenload.t + t/support-spiegel.t + t/support-vimeo.t + t/support-youtube.t + url_collection/break.url + url_collection/buzzhumor.url + url_collection/clipfish.url + url_collection/dmotion.url + url_collection/funnyhub.url + url_collection/golem.url + url_collection/gvideo.url + url_collection/liveleak.url + url_collection/spiegel.url + url_collection/vimeo.url + url_collection/ytube-nocookie.url + url_collection/ytube-utf8.url + url_collection/ytube.url + +commit b2cc1e5 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-02-04 - MANIFEST | 22 +++------------------- - MANIFEST.SKIP | 5 ++++- - README | 7 ++----- - t/00compiles.t | 9 --------- - t/01pod.t | 13 ------------- - t/02youtube.t | 24 ------------------------ - t/03break.t | 15 --------------- - t/04liveleak.t | 16 ---------------- - t/05dailymotion.t | 21 --------------------- - t/06golem.t | 19 ------------------- - t/07cctv.t | 16 ---------------- - t/08evisor.t | 17 ----------------- - t/09google.t | 22 ---------------------- - t/10sevenload.t | 20 -------------------- - t/12vimeo.t | 15 --------------- - t/13error.t | 14 -------------- - t/14spiegel.t | 20 -------------------- - t/15ehrensenf.t | 16 ---------------- - t/16clipfish.t | 15 --------------- - t/17funnyhub.t | 16 ---------------- - t/19buzzhumor.t | 15 --------------- - t/eval-compile.t | 9 +++++++++ - t/eval-exitstatus.t | 14 ++++++++++++++ - t/eval-pod.t | 11 +++++++++++ - t/support-break.t | 15 +++++++++++++++ - t/support-buzzhumor.t | 15 +++++++++++++++ - t/support-cctv.t | 16 ++++++++++++++++ - t/support-clipfish.t | 15 +++++++++++++++ - t/support-dailymotion.t | 21 +++++++++++++++++++++ - t/support-ehrensenf.t | 16 ++++++++++++++++ - t/support-evisor.t | 17 +++++++++++++++++ - t/support-funnyhub.t | 16 ++++++++++++++++ - t/support-golem.t | 19 +++++++++++++++++++ - t/support-google.t | 22 ++++++++++++++++++++++ - t/support-liveleak.t | 16 ++++++++++++++++ - t/support-sevenload.t | 20 ++++++++++++++++++++ - t/support-spiegel.t | 20 ++++++++++++++++++++ - t/support-vimeo.t | 15 +++++++++++++++ - t/support-youtube.t | 24 ++++++++++++++++++++++++ - 39 files changed, 310 insertions(+), 328 deletions(-) - -commit 8a9f43c00dd8d10605dc0a8ab5af45117d5fdfbc -Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 18:05:48 2010 +0200 + Manual: Cleanup, add HISTORY - Move tlinks/ to url_collection/ +man1/clive.1.pod + +commit b441168 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-24 - tlinks/break.url | 1 - - tlinks/buzzhumor.url | 1 - - tlinks/cctv.url | 1 - - tlinks/clipfish.url | 1 - - tlinks/dmotion.url | 2 -- - tlinks/ehrensenf.url | 1 - - tlinks/evisor.url | 1 - - tlinks/funnyhub.url | 1 - - tlinks/golem.url | 1 - - tlinks/gvideo.url | 12 ------------ - tlinks/lastfm.url | 1 - - tlinks/liveleak.url | 2 -- - tlinks/sload.url | 1 - - tlinks/spiegel.url | 1 - - tlinks/vimeo.url | 1 - - tlinks/ytube-nocookie.url | 1 - - tlinks/ytube-utf8.url | 1 - - tlinks/ytube.url | 1 - - url_collection/break.url | 1 + - url_collection/buzzhumor.url | 1 + - url_collection/cctv.url | 1 + - url_collection/clipfish.url | 1 + - url_collection/dmotion.url | 2 ++ - url_collection/ehrensenf.url | 1 + - url_collection/evisor.url | 1 + - url_collection/funnyhub.url | 1 + - url_collection/golem.url | 1 + - url_collection/gvideo.url | 12 ++++++++++++ - url_collection/lastfm.url | 1 + - url_collection/liveleak.url | 2 ++ - url_collection/sload.url | 1 + - url_collection/spiegel.url | 1 + - url_collection/vimeo.url | 1 + - url_collection/ytube-nocookie.url | 1 + - url_collection/ytube-utf8.url | 1 + - url_collection/ytube.url | 1 + - 36 files changed, 31 insertions(+), 31 deletions(-) - -commit 0ed73f575f5c347e070e70fbe42523c2b000104b -Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 18:02:48 2010 +0200 + Bump version to 2.3.0.1 - Add man1/clive.1.pod, simplify bin/clive POD +bin/clive + +commit 944a30e +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-24 + + --format help: Use mp4_360p instead + +bin/clive + +commit af51394 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-24 + + Manual: examples: Use mp4_360p instead - Manifying will be done now from man1/clive.1.pod. bin/clive will only - contain the help strings from now on. + * Add 2.3 note to DESCRIPTION + * EXAMPPLES: Replace webm_480p with mp4_360p - MANIFEST | 1 + - Makefile.PL | 2 + - bin/clive | 644 ++++-------------------------------------------------- - man1/clive.1.pod | 550 ++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 594 insertions(+), 603 deletions(-) +man1/clive.1.pod -commit 95752b3842a7897b4e1779cd4bd18e4fa9448b8a +commit 09cf6a9 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 17:42:18 2010 +0200 +Date: 2011-01-16 - Exclude tlinks/ from manifest + Bump version to 2.2.23 - MANIFEST | 18 ------------------ - MANIFEST.SKIP | 1 + - 2 files changed, 1 insertions(+), 18 deletions(-) +lib/clive/Config.pm -commit 59a73ae76d3b35dda8851b28b78f3d3285aab0d7 +commit 2aec286 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 17:40:30 2010 +0200 +Date: 2011-01-16 - Generate ChangeLog from gitlog; gzip src instead + Set release details for 2.2.22 - Makefile.PL | 12 +++++++++--- - 1 files changed, 9 insertions(+), 3 deletions(-) +NEWS -commit 4583a506b82f3f0c4051364c447aa5ca594a301d +commit 13e4fd4 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 17:40:02 2010 +0200 +Date: 2011-01-09 - Add more patterns to MANIFEST.SKIP + Apply perltidy with -l=72 - MANIFEST.SKIP | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) +bin/clive -commit 2539dff37b172eafb571cb9055f156e2ef4005cf +commit ce187e1 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 17:29:52 2010 +0200 +Date: 2011-01-08 - Add empty ChangeLog file + MANIFEST.SKIP: Cleanup - MANIFEST | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) +MANIFEST.SKIP -commit a38cfe691b77ceb659cf55dd39caa2d884297a5a +commit 66ffcdd Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 17:24:33 2010 +0200 +Date: 2011-01-08 - Backup ChangeLog as ChangeLog.pre-gitlog + Add gitignore file - ChangeLog | 963 -------------------------------------------------- - ChangeLog.pre-gitlog | 963 ++++++++++++++++++++++++++++++++++++++++++++++++++ - MANIFEST | 2 +- - 3 files changed, 964 insertions(+), 964 deletions(-) +.gitignore -commit 5b5a5c7ad149c459e3d16d11e30c050467527011 +commit ae651ac Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 17:03:30 2010 +0200 +Date: 2011-01-08 - Remove myubo support: dead site + support-youtube.t: Cleanup, add youtu.be test - MANIFEST | 3 -- - lib/clive/Host/Myubo.pm | 52 ----------------------------------------------- - t/18myubo.t | 17 --------------- - tlinks/myubo.url | 1 - - 4 files changed, 0 insertions(+), 73 deletions(-) +t/support-youtube.t -commit a677f13af07ca50f908681e1603f6be788b94d8f +commit a81f068 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 17:01:49 2010 +0200 +Date: 2011-01-08 - 02youtube.t: Fix format array + Accept youtu.be URLs #8 + + * http://sourceforge.net/apps/trac/clive/ticket/8 - t/02youtube.t | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) +lib/clive/App.pm -commit 0066635160eb690408240c69927cab46de55b6d9 +commit 9ae1d96 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 15:16:44 2010 +0200 +Date: 2011-01-08 - Set new home WWW + Add vim modeline - README | 6 ++---- - bin/clive | 21 +++++---------------- - 2 files changed, 7 insertions(+), 20 deletions(-) +bin/clive -commit d3085b6bbcaeb6b2fc6870927e6e7166ef05d3b4 +commit b7ef112 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 13:03:14 2010 +0200 +Date: 2011-01-07 - Youtube: Extend format aliases to match quvi IDs + Add gitignore file + +.gitignore + +commit d239f9e +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-07 + + Update MANIFEST files + +MANIFEST +MANIFEST.SKIP + +commit 3c249a8 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-07 + + Add pre-commit example to repo + +examples/git/hooks/pre-commit + +commit 8da742e +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-07 + + Apply default perltidy style + +bin/clive + +commit b980a6a +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-07 + + Bump version to 2.2.22 + +lib/clive/Config.pm + +commit d50cbd4 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-07 + + Set release details for 2.2.21 + +NEWS + +commit b99c7de +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-02 + + MANIFEST.SKIP: Add patches/ + +MANIFEST.SKIP + +commit 0d2bb75 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2011-01-02 + + Dailymotion.pm: Fix family-filter blocker #4 - Extend aliases to cover those recently introduced by quvi based the - wikipedia page information about the containers. Use - $container_$max_width. + * <http://sourceforge.net/apps/trac/clive/ticket/4> - lib/clive/Config.pm | 33 +++++++++++++++++++++++---------- - lib/clive/HostFactory.pm | 9 +++++---- - 2 files changed, 28 insertions(+), 14 deletions(-) +lib/clive/Curl.pm +lib/clive/Host/Dailymotion.pm -commit a9ee885c8c36882d846dca595a9b993df726acd1 +commit 42c0c15 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 12:47:19 2010 +0200 +Date: 2010-12-27 - Fix Youtube: Unknown error (http/404) #1 + Bump version to 2.2.21 + +lib/clive/Config.pm + +commit 67a1ab2 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-27 + + Set release details for 2.2.20 + +NEWS + +commit e4f1981 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-27 + + support-youtube.t: Add HTTPS URL + +t/support-youtube.t + +commit ddd1bc8 +Author: Peter Pentchev <roam@ringlet.net> +Date: 2010-12-22 + + Process non-HTTP URL's. - - http://sourceforge.net/apps/trac/clive/ticket/1 + Some online video services, e.g. YouTube, also provide their content + over HTTPS. In some environments, e.g. weirdly configured corporate + firewalls, it may be useful to use that :) - lib/clive/Host/Youtube.pm | 127 +++++++++++++++++++++++++-------------------- - 1 files changed, 71 insertions(+), 56 deletions(-) +lib/clive/App.pm -commit de703346f3ee76cf14c916f9fbff21b5280c3439 +commit 0900a90 Author: Toni Gundogdu <legatvs.git@gmail.com> -Date: Sat Dec 11 12:29:48 2010 +0200 +Date: 2010-12-18 - Remove TODO file + Set release details for 2.3.0_4 - MANIFEST | 1 - - TODO | 2 -- - 2 files changed, 0 insertions(+), 3 deletions(-) +NEWS -commit be4ad0a61f0730368985bd039ce9218fcc8d4ec2 -Author: legatvs <legatvs.git@gmail.com> -Date: Tue Nov 30 14:02:38 2010 +0200 +commit 68253c3 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-18 - bump version + Vimeo.pm: Fix video ID parsing #2 + + - http://sourceforge.net/apps/trac/clive/ticket/2 + +lib/clive/Host/Vimeo.pm + +commit 5ba0c23 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-17 + + Generate ChangeLog from git log + +Makefile.PL + +commit ebbc902 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-17 + + Add stub ChangeLog + +ChangeLog + +commit 60af72b +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-17 + + mv ChangeLog to ChangeLog.pre-gitlog + +ChangeLog +ChangeLog.pre-gitlog +MANIFEST + +commit e192fc4 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-17 + + NEWS: Move 2.3 changes from ChangeLog + +ChangeLog +NEWS + +commit fed6949 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Bump version + +lib/clive/Config.pm + +commit d3699ce +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Set release details for 2.2.19 + +NEWS + +commit 5ffb040 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + lastfm.url: Replace dead link + +url_collection/lastfm.url + +commit 861c014 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + gvideo.url: Remove dead links + +url_collection/gvideo.url + +commit f80b211 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Fix Ggasgrank -> Ggaskrank typo + +MANIFEST +lib/clive/Host/Gasgrank.pm +lib/clive/Host/Gaskrank.pm +lib/clive/HostFactory.pm +t/support-gasgrank.t +t/support-gaskrank.t +url_collection/gasgrank.url +url_collection/gaskrank.url + +commit d4fee1a +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Rename evisor.url to gasgrank.url + +url_collection/evisor.url +url_collection/gasgrank.url + +commit ecd72af +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Fix liveleak token/id parsing + +lib/clive/Host/Liveleak.pm + +commit e45631e +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + _cleanupTitle: remove obsolete strings from array + +lib/clive/Video.pm + +commit 26d8edc +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Rename Evisor.pm to Gasgrank.pm + +MANIFEST +lib/clive/Host/Evisor.pm +lib/clive/Host/Gasgrank.pm +lib/clive/HostFactory.pm +t/support-evisor.t +t/support-gasgrank.t + +commit bc5048f +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Remove broken ehrensenf support + +MANIFEST +lib/clive/Host/Ehrensenf.pm +lib/clive/HostFactory.pm +t/support-ehrensenf.t +url_collection/ehrensenf.url + +commit 3a52ea6 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Remove broken cctv support and test + +MANIFEST +lib/clive/Host/Cctv.pm +lib/clive/HostFactory.pm +t/support-cctv.t +url_collection/cctv.url + +commit 69c2010 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Rename tests, exclude net tests from dist + + If you need the support-*.t, get them from the repo. + +MANIFEST +MANIFEST.SKIP +README +t/00compiles.t +t/01pod.t +t/02youtube.t +t/03break.t +t/04liveleak.t +t/05dailymotion.t +t/06golem.t +t/07cctv.t +t/08evisor.t +t/09google.t +t/10sevenload.t +t/12vimeo.t +t/13error.t +t/14spiegel.t +t/15ehrensenf.t +t/16clipfish.t +t/17funnyhub.t +t/19buzzhumor.t +t/eval-compile.t +t/eval-exitstatus.t +t/eval-pod.t +t/support-break.t +t/support-buzzhumor.t +t/support-cctv.t +t/support-clipfish.t +t/support-dailymotion.t +t/support-ehrensenf.t +t/support-evisor.t +t/support-funnyhub.t +t/support-golem.t +t/support-google.t +t/support-liveleak.t +t/support-sevenload.t +t/support-spiegel.t +t/support-vimeo.t +t/support-youtube.t + +commit 8a9f43c +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Move tlinks/ to url_collection/ + +tlinks/break.url +tlinks/buzzhumor.url +tlinks/cctv.url +tlinks/clipfish.url +tlinks/dmotion.url +tlinks/ehrensenf.url +tlinks/evisor.url +tlinks/funnyhub.url +tlinks/golem.url +tlinks/gvideo.url +tlinks/lastfm.url +tlinks/liveleak.url +tlinks/sload.url +tlinks/spiegel.url +tlinks/vimeo.url +tlinks/ytube-nocookie.url +tlinks/ytube-utf8.url +tlinks/ytube.url +url_collection/break.url +url_collection/buzzhumor.url +url_collection/cctv.url +url_collection/clipfish.url +url_collection/dmotion.url +url_collection/ehrensenf.url +url_collection/evisor.url +url_collection/funnyhub.url +url_collection/golem.url +url_collection/gvideo.url +url_collection/lastfm.url +url_collection/liveleak.url +url_collection/sload.url +url_collection/spiegel.url +url_collection/vimeo.url +url_collection/ytube-nocookie.url +url_collection/ytube-utf8.url +url_collection/ytube.url + +commit 0ed73f5 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Add man1/clive.1.pod, simplify bin/clive POD + + Manifying will be done now from man1/clive.1.pod. bin/clive will only + contain the help strings from now on. + +MANIFEST +Makefile.PL +bin/clive +man1/clive.1.pod + +commit 95752b3 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Exclude tlinks/ from manifest + +MANIFEST +MANIFEST.SKIP + +commit 59a73ae +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Generate ChangeLog from gitlog; gzip src instead + +Makefile.PL + +commit 4583a50 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Add more patterns to MANIFEST.SKIP + +MANIFEST.SKIP + +commit 2539dff +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Add empty ChangeLog file + +ChangeLog +MANIFEST + +commit a38cfe6 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Backup ChangeLog as ChangeLog.pre-gitlog + +ChangeLog +ChangeLog.pre-gitlog +MANIFEST + +commit 5b5a5c7 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Remove myubo support: dead site + +MANIFEST +lib/clive/Host/Myubo.pm +t/18myubo.t +tlinks/myubo.url + +commit a677f13 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + 02youtube.t: Fix format array + +t/02youtube.t + +commit c3f6ac2 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Set new home WWW + +README +man1/clive.1.pod + +commit 0066635 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Set new home WWW + +README +bin/clive + +commit d3085b6 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Youtube: Extend format aliases to match quvi IDs + + Extend aliases to cover those recently introduced by quvi based the + wikipedia page information about the containers. Use + $container_$max_width. + +lib/clive/Config.pm +lib/clive/HostFactory.pm + +commit a9ee885 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Fix Youtube: Unknown error (http/404) #1 + + - http://sourceforge.net/apps/trac/clive/ticket/1 + +lib/clive/Host/Youtube.pm + +commit de70334 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-11 + + Remove TODO file + +MANIFEST +TODO + +commit 23004c7 +Author: Toni Gundogdu <legatvs.git@gmail.com> +Date: 2010-12-05 + + Bump version to 2.3.0_4 + +bin/clive + +commit b9001dc +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-12-01 + + set release date + +ChangeLog + +commit be4ad0a +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-30 + + bump version + +lib/clive/Config.pm + +commit 5ee4d5f +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-30 + + set release date + +ChangeLog + +commit e62c4d7 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-30 + + change google test URL + +ChangeLog +t/09google.t + +commit da617b8 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-25 + + ChangeLog: dailymotion swf urls + +ChangeLog + +commit dc05c6f +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-25 + + dailymotion: accept swf urls + +lib/clive/App.pm + +commit 2d88bd6 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-07 + + add missing comma + +bin/clive + +commit 6f6f1c4 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-07 + + add support for /etc/xdg/clive/clive.conf + +ChangeLog +bin/clive +man1/clive.1.pod + +commit 90120eb +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-07 + + add /etc/xdg/clive.conf + +ChangeLog +bin/clive +man1/clive.1.pod + +commit e4f720c +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-06 + + bump version + +lib/clive/Config.pm + +commit dc6bd23 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-06 + + set release date + +ChangeLog + +commit d14e4fc +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-06 + + sload.url: remove old urls + +tlinks/sload.url + +commit ef81914 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-05 + + omit return operator where optional + +bin/clive + +commit 67ec193 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-05 + + add more whitespace + +bin/clive + +commit b41a71a +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-05 + + README: bump quvi prereq for --support + +README + +commit 0149b11 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + manual: website support: add -f + +man1/clive.1.pod + +commit 570010b +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + bump version + +bin/clive + +commit f2b5ebf +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + add --format help,list to ChangeLog + +ChangeLog + +commit b19a3d7 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + add --format help,list to manual + +man1/clive.1.pod + +commit 644d343 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + add --format help,list + +bin/clive + +commit 8b42e0f +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + set release date + +ChangeLog + +commit 771b879 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + ChangeLog: 2.3 beta 2, 2.3_gws + +ChangeLog + +commit d655aaf +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + add prefix to gws + +NEWS + +commit 88ef6f6 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + ChangeLog: add -2 commits + +ChangeLog + +commit 2ec01ff +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + rewrite toUnits + +lib/clive/Util.pm + +commit 00b2208 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + Makefile.PL: VERSION_FROM, use "version" module + +Makefile.PL +lib/clive/Config.pm + +commit 7c17d36 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + tidy NEWS, README + +NEWS +README + +commit 2fed4cb +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-04 + + Makefile.PL: use 5.008009 + +Makefile.PL + +commit a099c50 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + clive.1.pod: add missing sections + +man1/clive.1.pod + +commit 9170b07 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + NEWS: cleanup 2.3 + +NEWS + +commit 40fb225 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + remove TODO from dist + +MANIFEST +MANIFEST.SKIP + +commit 1b3d733 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + run "make manifest" + +MANIFEST + +commit 0a67bc6 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + add system-wide config support + +ChangeLog +NEWS +bin/clive +examples/cliverc +man1/clive.1.pod + +commit 9b9f03a +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + remove TODO + +TODO + +commit 0c74db6 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + ChangeLog: fix a typo + +ChangeLog + +commit 9609eed +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + ChangeLog: cleanup 2.3 beta 2 + +ChangeLog + +commit d328ece +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + bin/clive: manual to man1/clive.1.pod + +MANIFEST +Makefile.PL +bin/clive +man1/clive.1.pod +t/clive-Pod.t + +commit 5d01a2d +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-03 + + NEWS: cleanup 2.3 + +NEWS + +commit 30f7d99 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + NEWS: fix a typo + +NEWS + +commit 1d19509 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + bin/clive: rewrite for --quvi, --get-with + +bin/clive + +commit 409eea0 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + README: update for 2.3 beta 2 + +README + +commit ca4705a +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + Makefile.PL: update prereqs + +Makefile.PL + +commit 81182a3 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + MANIFEST: add examples/cliverc + +MANIFEST + +commit 806b160 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + cliverc: remove line + +examples/cliverc + +commit 55efafc +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + ChangeLog: update 2.3 beta 2 + +ChangeLog + +commit c183507 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + NEWS: rewrite 2.3 + +NEWS + +commit 518800a +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-11-02 + + add gz to MANIFEST.SKIP + +MANIFEST.SKIP +examples/cliverc + +commit c410432 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-31 + + cleanup README + +README + +commit 988c267 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-28 + + add version->declare to ChangeLog + +ChangeLog + +commit d1d26ca +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-28 + + prepend word "version" + +bin/clive + +commit 53df86e +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-28 + + Makefile.PL: require version module 0.77 + +Makefile.PL + +commit c96109d +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-28 + + use version->declare instead of version::qv + +bin/clive + +commit a51c994 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-27 + + bump version + +bin/clive + +commit b1a2da1 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-27 + + tag with release date + +ChangeLog + +commit c2bcde7 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-27 + + add esoteric comments. + +ChangeLog +NEWS + +commit 3951a23 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-27 + + force version module 0.77 + +bin/clive + +commit b81bb3c +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-25 + + add missing progressbar issues to ChangeLog + +ChangeLog + +commit f1f50d2 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-25 + + remove -r, realign --help output + +bin/clive + +commit 8aa6189 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-24 + + NEWS, 2.3, move new-options + +NEWS + +commit 289a2b1 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-24 + + progressbar, change size precision + +bin/clive + +commit 353bfb7 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-24 + + fix LICENSE in Makefile.PL + +Makefile.PL + +commit 8d7f815 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-23 + + tidy ChangeLog + +ChangeLog + +commit 22e65ef +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-23 + + news, all in one line + +NEWS + +commit b04731d +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-23 + + add alpha to version + +bin/clive + +commit a948191 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-23 + + change example URLs + +bin/clive + +commit 3b1a9f3 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-23 + + fix unicode in progressbar + +bin/clive + +commit 5d47e1c +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-23 + + rewrite set default term width differently + +bin/clive + +commit 6b9e331 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-22 + + reuse sub_len + +bin/clive + +commit 1340950 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + add clive-Pod.t + +MANIFEST +t/clive-Pod.t + +commit c3079c5 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + rewrite Makefile.PL + +Makefile.PL + +commit 8518e27 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + add 2.3b1 to ChangeLog + +ChangeLog + +commit b0c3db0 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + update MANIFEST + +MANIFEST + +commit 9473620 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + rewrite README + +README + +commit 980ec6f +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + add 2.3 to NEWS + +NEWS + +commit 04b2af1 +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + rewrite clive script + +bin/clive + +commit baf414a +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-10-21 + + remove t tlinks lib examples dirs + +examples/config +lib/clive/App.pm +lib/clive/Cache.pm +lib/clive/Compat.pm +lib/clive/Config.pm +lib/clive/Curl.pm +lib/clive/Error.pm +lib/clive/Exec.pm +lib/clive/Host/Break.pm +lib/clive/Host/Buzzhumor.pm +lib/clive/Host/Cctv.pm +lib/clive/Host/Clipfish.pm +lib/clive/Host/Dailymotion.pm +lib/clive/Host/Ehrensenf.pm +lib/clive/Host/Evisor.pm +lib/clive/Host/Funnyhub.pm +lib/clive/Host/Golem.pm +lib/clive/Host/Google.pm +lib/clive/Host/Liveleak.pm +lib/clive/Host/Myubo.pm +lib/clive/Host/Sevenload.pm +lib/clive/Host/Spiegel.pm +lib/clive/Host/Vimeo.pm +lib/clive/Host/Youtube.pm +lib/clive/HostFactory.pm +lib/clive/Log.pm +lib/clive/Progress/Bar.pm +lib/clive/Util.pm +lib/clive/Video.pm +t/00compiles.t +t/01pod.t +t/02youtube.t +t/03break.t +t/04liveleak.t +t/05dailymotion.t +t/06golem.t +t/07cctv.t +t/08evisor.t +t/09google.t +t/10sevenload.t +t/12vimeo.t +t/13error.t +t/14spiegel.t +t/15ehrensenf.t +t/16clipfish.t +t/17funnyhub.t +t/18myubo.t +t/19buzzhumor.t +t/lib/Test/clive.pm +tlinks/break.url +tlinks/buzzhumor.url +tlinks/cctv.url +tlinks/clipfish.url +tlinks/dmotion.url +tlinks/ehrensenf.url +tlinks/evisor.url +tlinks/funnyhub.url +tlinks/golem.url +tlinks/gvideo.url +tlinks/lastfm.url +tlinks/liveleak.url +tlinks/myubo.url +tlinks/sload.url +tlinks/spiegel.url +tlinks/vimeo.url +tlinks/ytube-nocookie.url +tlinks/ytube-utf8.url +tlinks/ytube.url + +commit 485829f +Author: legatvs <legatvs.git@gmail.com> +Date: 2010-09-28 + + bump version. - lib/clive/Config.pm | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +lib/clive/Config.pm
View file
clive-2.3.3.tar.gz/INSTALL
Added
@@ -0,0 +1,41 @@ + + +Prerequisites +============= + +* Perl 5.8.9+ <http://perl.org/> +* quvi 0.2.16.1+ <http://quvi.sourceforge.net/> +* Getopt::ArgvFile <http://search.cpan.org/perldoc?Getopt::ArgvFile> +* JSON::XS <http://search.cpan.org/perldoc?JSON::XS> +* curl <http://curl.haxx.se/> + + +Installation from source +======================== + +Uninstall earlier versions of clive if you have any installed. + +For the impatient +----------------- + +Run bin/clive without installing. This assumes the required Perl modules +and system commands can be found by the script. + +Typical installation +-------------------- + +To install: + + perl Makefile.PL + make + make install + + * Note that you can specify install prefix with INSTALL_BASE + e.g. perl Makefile.PL INSTALL_BASE=/usr/local + +Recommended reading: + * <http://search.cpan.org/perldoc?ExtUtils::MakeMaker> + * <http://perldoc.perl.org/ExtUtils/MakeMaker/FAQ.html> + + +vim: set ts=2 sw=2 tw=72 expandtab:
View file
clive-2.2.22.tar.bz2/MANIFEST -> clive-2.3.3.tar.gz/MANIFEST
Changed
@@ -1,39 +1,13 @@ bin/clive -NEWS ChangeLog -ChangeLog.pre-gitlog COPYING -examples/config -man1/clive.1.pod -lib/clive/App.pm -lib/clive/Cache.pm -lib/clive/Compat.pm -lib/clive/Config.pm -lib/clive/Curl.pm -lib/clive/Error.pm -lib/clive/Exec.pm -lib/clive/Host/Break.pm -lib/clive/Host/Clipfish.pm -lib/clive/Host/Dailymotion.pm -lib/clive/Host/Gaskrank.pm -lib/clive/Host/Funnyhub.pm -lib/clive/Host/Golem.pm -lib/clive/Host/Google.pm -lib/clive/Host/Liveleak.pm -lib/clive/Host/Sevenload.pm -lib/clive/Host/Spiegel.pm -lib/clive/Host/Vimeo.pm -lib/clive/Host/Youtube.pm -lib/clive/Host/Buzzhumor.pm -lib/clive/HostFactory.pm -lib/clive/Log.pm -lib/clive/Progress/Bar.pm -lib/clive/Util.pm -lib/clive/Video.pm +examples/cliverc Makefile.PL +doc/man1/clive.1.pod MANIFEST This list of files +NEWS +INSTALL README -t/eval-compile.t -t/eval-pod.t -t/eval-exitstatus.t +README.packagers +t/clive-Pod.t META.yml Module meta-data (added by MakeMaker)
View file
clive-2.2.22.tar.bz2/META.yml -> clive-2.3.3.tar.gz/META.yml
Changed
@@ -1,8 +1,9 @@ --- #YAML:1.0 name: clive -version: 2.2.22 -abstract: ~ -author: +version: 2.3.3 +abstract: (c)ommand (li)ne (v)ideo (e)xtraction tool +author: + - Toni Gundogdu <legatvs@cpan.org> license: gpl distribution_type: module configure_requires: @@ -10,19 +11,14 @@ build_requires: ExtUtils::MakeMaker: 0 requires: - Class::Singleton: 1.4 - Config::Tiny: 2.12 - Digest::SHA: 5.45 Getopt::ArgvFile: 1.11 - HTML::TokeParser: 2.37 - URI::Escape: 3.29 - version: 0.77 - WWW::Curl: 4.05 + JSON::XS: 2.3 + perl: 5.008009 no_index: directory: - t - inc -generated_by: ExtUtils::MakeMaker version 6.56 +generated_by: ExtUtils::MakeMaker version 6.57_05 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4
View file
clive-2.2.22.tar.bz2/Makefile.PL -> clive-2.3.3.tar.gz/Makefile.PL
Changed
@@ -7,34 +7,33 @@ use ExtUtils::MakeMaker; WriteMakefile( - 'NAME' => 'clive', - ( $ >= 5.8 ) - ? ( AUTHOR => 'Toni Gundogdu <legatvs at sign gmail com>', - 'ABSTRACT' => 'command line video downloading tool' - ) - : (), - 'VERSION_FROM' => 'lib/clive/Config.pm', - 'EXE_FILES' => 'bin/clive', - 'PREREQ_PM' => { - 'Getopt::ArgvFile' => 1.11, - 'Class::Singleton' => 1.4, - 'HTML::TokeParser' => 2.37, - 'URI::Escape' => 3.29, - 'Digest::SHA' => 5.45, - 'WWW::Curl' => 4.05, - 'Config::Tiny' => 2.12, - 'version' => 0.77 - }, - 'LICENSE' => 'gpl', - 'MAN1PODS' => { - 'man1/clive.1.pod' => '${INST_MAN1DIR}/clive.$(MAN1EXT)' }, - dist => { - PREOP => -'@if test -f .git/HEAD; then \ - git log --stat --after="Tue Nov 30 14:02:38 2010" >ChangeLog; \ + NAME => 'clive', + DISTNAME => 'clive', + VERSION_FROM => 'bin/clive', + PREREQ_PM => { +'Getopt::ArgvFile' => 1.11, +'JSON::XS' => 2.30, + }, + BUILD_REQUIRES => { + 'ExtUtils::MakeMaker' => 0, + }, + CONFIGURE_REQUIRES => { + 'ExtUtils::MakeMaker' => 0, + }, + MIN_PERL_VERSION => 5.008009, + ($ >= 5.005 ? + (ABSTRACT_FROM => 'doc/man1/clive.1.pod', + AUTHOR => 'Toni Gundogdu <legatvs@cpan.org>') : ()), + 'LICENSE' => 'gpl', + 'EXE_FILES' => 'bin/clive', + 'MAN1PODS' => + {'doc/man1/clive.1.pod' => '$(INST_MAN1DIR)/clive.$(MAN1EXT)'}, + dist => { + PREOP => '@if test -f .git/HEAD; then \ + git log --stat --name-only --date=short --abbrev-commit \ + --after="Tue Sep 28 02:13:39 2010" > ChangeLog; \ fi', - POSTOP => -'@if test -f .git/HEAD; then \ + POSTOP => '@if test -f .git/HEAD; then \ git checkout ChangeLog; \ fi', },
View file
clive-2.2.22.tar.bz2/NEWS -> clive-2.3.3.tar.gz/NEWS
Changed
@@ -1,62 +1,121 @@ +v2.3.3 (2012-03-16) / Toni Gundogdu -2.2.22 Sun Jan 16 2011 Toni Gundogdu +Toni Gundogdu: + - Do not prepend "http" URL if it is not found 13c5d89 + - examples/cliverc: Use new category option 9b32fd2 + - Fix a typo in manual 249c3d9 + - Revise --help output cf1f0dd + - Use -vq with quvi when supported (#15) 02b3f64 + + +2.3.2 Sat Oct 22 2011 Toni Gundogdu Changes: - - Accept youtu.be URLs (#8) + - Revise README, README.packagers, INSTALL, manual, Makefile.PL + - Add --user-agent to args used with autodetected curl command + - Revise examples/cliverc, add --user-agent to curl example + - Lower quvi prerequisite to 0.2.16.1 -2.2.21 Fri Jan 07 2011 Toni Gundogdu -Bugfixes: - - Dailymotion.pm: Access blocked by "family filter" (#4) +2.3.1.1 Sun Jun 19 2011 Toni Gundogdu +Fixes: + - Missing details in --help output -2.2.20 Mon Dec 27 2010 Toni Gundogdu + +2.3.1 Sat Jun 18 2011 Toni Gundogdu Changes: - - Accept non-HTTP (input) URLs #3 -Bugfixes: - - Vimeo.pm: Fix video ID parsing #2 - - -2.2.19 Sat Dec 11 2010 Toni Gundogdu -Changes: - - Set <http://clive.sourceforge.net> as new WWW home - - Add man1/clive.1.pod, manify from this from now on - - Youtube: Extend format aliases to match quvi IDs - - Remove myubo support: dead site - - Backup ChangeLog as ChangeLog.pre-gitlog - - Generate ChangeLog from gitlog - - Rename Evisor.pm to Gaskrank.pm - - Rename tests - - Remove dangling (and broken) ehrensenf, cctv support - - Exclude network tests, can still be found in the repo - - gzip release tarball from now on + - Add --query-formats, deprecate "--format list" + - Detect quvi and/or download command from $PATH + - In the absence of --quvi and/or --get-with + - Bump quvi prerequisite to 0.2.17 + - Revise manual + + +2.3.0.3 Mon May 02 2011 Toni Gundogdu +Changes: + - Add support to read input from files + + +2.3.0.2 Tue Mar 15 2011 Toni Gundogdu +Changes: + - Make --version less verbose + - Manual: Add SYNOPSIS + - examples/cliverc, Manual: Add --category-http (quvi 0.2.12+) Bugfixes: - - Liveleak.pm: token/ID parsing - - Youtube.pm: Unknown error (http/404) #1 + - examples/cliverc: Typo in --get-with -Version 2.2.15 +2.3.0.1 Sat Feb 12 2011 Toni Gundogdu +Changes: + - Replace outdated webm_480p with mp4_360p in examples + - README: Cleanup, add notes for packagers + - Add examples/git/hooks/pre-commit + - Manual: Cleanup, add HISTORY + - Add vim modeline +Other: + - Create "2.2" branch from "master" + - Merge "2.3_gws" into "master" branch + - http://sourceforge.net/apps/trac/clive/wiki/Changes-2.3 + + +2.3.0_4 (beta 4, 2.3_gws) Sat Dec 18 2010 Toni Gundogdu +Changes: + - Generate ChangeLog from git log + + +2.3.0_3 (beta 3, 2.3_gws) Wed Dec 01 2010 legatvs +Changes: + - Add support for /etc/xdg/clive/clive.conf + - Add support /etc/xdg/clive.conf + - Add --format list pattern + - Add --format list + - Add --format help + -Changes to --format +2.3.0_2 (beta 2, 2.3_gws) Thu Nov 04 2010 legatvs +Changes: + - Use quvi(1) for parsing video details, --quvi arg + - Use external command to download, --get-with arg + - Use version->declare instead of version::qv + - Add JSON::XS dependency + - Add examples/cliverc + - Additional config file search paths (e.g. system-wide) + - Remove WWW::Quvi dependency + - Remove WWW::Curl dependency + - Remove Term::ReadKey dependency + - Remove --continue, --overwrite, --proxy + - Remove --no-proxy, --agent, --throttle + + +2.3.0_1 (beta 1) Wed Oct 27 2010 + +Changes: + - Use libquvi (WWW::Quvi) to parse video details + - Remove options / features + - Rename options + - Prerequisites +Bugfixes: + - Progressbar unicode issues - * "flv" is now called "default" -Youtube: +2.3.0 "Glorified Wrapper Script" (2.3_gws) - * Add HD 1080p support +* Single-script vs. multiple-clive-modules + - clive is no longer dispersed all over the file system in Perl packages - * Add support for the quvi supported Youtube IDs (e.g. sd_270p). - The old (and vague) IDs (e.g. mp4 or hd) are still supported - but should be considered _deprecated_. +* Use quvi(1) to parse the video details + - 2.3 was going to use WWW::Quvi and libquvi (beta 1) + - Had a piffany (beta 2) +* Leave downloading for an external 3rd party command to do + - e.g. curl, wget or whatever -Version 2.2.9 +* Complete command line interface clean up + - Esoteric, or otherwise now completely obsoleted, features were discarded -cctv support was fixed. These videos appear to come in (at least) two -flavors now: multi-segment and single-segment. The issue has been -discussed here: - http://code.google.com/p/clive/issues/detail?id=45 +See also: + <http://sourceforge.net/apps/trac/clive/wiki/DevelopmentStatus> -It was decided, mainly due to overall laziness, that multi-segment -video links are to be dumped to the terminal without any further -fiddling with them. The reasons have also been covered in the above -discussion. +For earlier version history, please see: + http://repo.or.cz/w/clive.git/blob/maint-2.2:/NEWS + http://repo.or.cz/w/clive.git/blob/maint-2.2:/ChangeLog.pre-gitlog
View file
clive-2.2.22.tar.bz2/README -> clive-2.3.3.tar.gz/README
Changed
@@ -1,53 +1,7 @@ -README for clive ----------------- -clive is a command line utility for extracting videos from Youtube and other -video-sharing websites. It was written to bypass the Adobe Flash requirement -to view the hosted videos. - -WWW: <http://clive.sourceforge.net/> - - -Prerequisites -------------- - -See Makefile.PL file. - - -Optional modules ----------------- - -* BerkeleyDB - - If not installed, clive cache features will be disabled - -* Term::ReadKey - - If not installed, clive will not resize progressbar to - match terminal width - - -Installation ------------- - -Be sure to remove any previous versions of clive first. - -INSTALL_BASE can be passed into Makefile.PL to change where clive will -be installed. For example: - - perl Makefile.PL INSTALL_BASE=/usr/local - - perl Makefile.PL - make - (make test) - make install - -See also (for Makefile.PL options etc.): - <http://search.cpan.org/perldoc?ExtUtils::MakeMaker> - - -Notes ------ - -If you want to try clive without installing it first: - cd lib; ../bin/clive URL +clive is a command line media extraction tool for YouTube and similar +websites that require flash. +Home : <http://clive.sourceforge.net/> +gitweb: <http://repo.or.cz/w/clive.git>
View file
clive-2.3.3.tar.gz/README.packagers
Added
@@ -0,0 +1,14 @@ + +PACKAGERS +========= + +clive will attempt to detect the quvi(1) and the curl(1) commands +from the $PATH if either "--quvi" or "--get-with" is missing. + +Please consider installing a preconfigured system wide configuration +file with clive. This file should contain the preconfigured "--quvi" +and "--get-with" (see "$top_srcdir/examples/cliverc"). See also the +manual page ($top_srcdir/doc/man1/clive.1.pod) for "FILES" which lists +the typical system wide config file paths. + +Last but not least, thanks for your support.
View file
clive-2.2.22.tar.bz2/bin/clive -> clive-2.3.3.tar.gz/bin/clive
Changed
@@ -1,84 +1,551 @@ #!/usr/bin/perl # -*- coding: ascii -*- -########################################################################### -# clive, command line video extraction utility. -# Copyright 2007, 2008, 2009 Toni Gundogdu. # -# This file is part of clive. +# clive +# Copyright (C) 2010-2011 Toni Gundogdu <legatvs@gmail.com> # -# clive is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # -# clive is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with this program. If not, see <http://www.gnu.org/licenses/>. -########################################################################### +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + use warnings; use strict; -binmode( STDOUT, ":utf8" ); -binmode( STDERR, ":utf8" ); +use version 0.77 (); our $VERSION = version->declare("2.3.3"); + +binmode STDOUT, ":utf8"; +binmode STDERR, ":utf8"; + +use Getopt::ArgvFile qw(argvFile); + +use Getopt::Long qw(:config bundling); +use Encode qw(decode_utf8); +use Carp qw(croak); + +my $depr_msg = "Warning: + '--format list' is deprecated and will be removed in the later + versions. Use --query-formats instead."; + +my $quvi_quiet_switch = '-q'; +my %config; +my @queue; +my $media; + +exit main(); + +sub main +{ + init(); + return process_queue(); +} + +sub init +{ + if (grep {$_ eq "--config-file"} @ARGV) + { + argvFile(fileOption => '--config-file'); + } + else + { + @ARGV = ( + @ARGV, + ( + "@/usr/local/share/clive/cliverc", + "@/usr/share/clive/cliverc", + "@/etc/clive/config", + "@/etc/xdg/clive/clive.conf", + "@/etc/xdg/clive.conf" + ) + ); + + if ($ENV{HOME}) + { + @ARGV = ( + @ARGV, + ( + '@' . "$ENV{HOME}/.cliverc", + '@' . "$ENV{HOME}/.clive/config", + '@' . "$ENV{HOME}/.config/clive/config" + ) + ); + } + + push @ARGV, '@' . "$ENV{CLIVE_CONFIG}" if $ENV{CLIVE_CONFIG}; + + argvFile(); + } + + GetOptions( + \%config, + 'help' => \&print_help, + 'version' => sub {print "clive version $VERSION\n"; exit 0}, + 'license' => \&print_license, + 'quiet|q', + 'query_formats|query-formats|F', + 'format|f=s', + 'output_file|output-file|O=s', + 'no_download|no-download|n', + + # Configuration: + 'quvi=s', + 'get_with|get-with=s', + 'filename_format|filename-format=s', + 'regexp=s', + 'exec=s', + ) or exit 1; + + $config{format} ||= 'default'; + $config{filename_format} ||= '%t.%s'; + $config{regexp} ||= '/(\\w|\\s)/g'; + + # Check --quvi. + unless ($config{quvi}) + { + print "Detect quvi from \$PATH\n" unless $config{quiet}; + + my $s = detect_cmd('quvi'); + if ($s) + { + $config{quvi} = "quvi %u"; + } + else + { + croak "error: specify path to quvi(1) command with --quvi\n"; + } + } + check_quvi(); + check_format(); + + # Check --get-with. + unless ($config{get_with}) + { + + print "Detect a download command from \$PATH\n" + unless $config{quiet}; + + my %h = ( + curl => "-L -C - -o %f %u --user-agent Mozilla/5.0", + + # Add new ones below. + ); + + for my $k (keys %h) + { + my $s = detect_cmd($k); + if ($s) + { + $config{get_with} = "$k $h{$k}"; + last; + } + } + + croak "error: specify path to a download command with --get-with\n" + unless $config{get_with}; + } + + # Check --regexp. + + apply_regexp(); + + # Process input. + + if (scalar @ARGV == 0) + { + append_queue($_) while <STDIN>; + } + else + { + foreach (@ARGV) + { + if (!is_url($_)) + { + open my $fh, "<", $_ + or print STDERR "$_: $!\n" and next; + append_queue($_) while <$fh>; + close $fh; + } + else + { + append_queue($_); + } + } + } + + @queue = uniq2(@queue); # Remove duplicate URLs. + + print STDERR "error: no input urls\n" and exit 0x3 # QUVI_INVARG + unless scalar @queue; + + select STDOUT; + $| = 1; # Go unbuffered. +} + +sub detect_cmd +{ + my ($cmd) = @_; + + print " Check for $cmd ..." unless $config{quiet}; + my $o = join '', qx|$cmd --version 2>/dev/null|; + + if ($? >> 8 == 0) + { + + # TODO: Use more a elegant regexp combining all three. + my @a = + (qr|(\d+.\d+.\d+-\w+-\w+)|, qr|(\d+.\d+.\d+)|, qr|(\d+.\d+)|); + foreach (@a) + { + if ($o =~ /$_/) + { + print "$1\n" unless $config{quiet}; + return $1; + } + } + } + else + { + print "no\n" unless $config{quiet}; + } + undef; +} + +sub is_url +{ + return $_ =~ /^\w+\:\/\//; +} + +sub append_queue +{ + my $ln = trim(shift); + chomp $ln; + + return if $ln =~ /^$/; + return if $ln =~ /^#/; + + push @queue, $ln; +} + +sub uniq2 +{ # http://is.gd/g8jQU + my %seen = (); + my @r = (); + foreach my $a (@_) + { + unless ($seen{$a}) + { + push @r, $a; + $seen{$a} = 1; + } + } + @r; +} + +sub process_queue +{ + require JSON::XS; + + my $n = scalar @queue; + my $i = 0; + my $r = 0; + my $fpath; + + foreach (@queue) + { + print_checking(++$i, $n); + + my $q = $config{quvi}; + $q =~ s/%u/"$_"/; + $q .= " $quvi_quiet_switch" + if $q !~ /$quvi_quiet_switch/; # Force quiet. + $q .= " -f $config{format}"; + $q .= " -F" if $config{query_formats}; + + my $o = join '', qx/$q/; + $r = $? >> 8; + + next unless $r == 0; + + print "done.\n" unless $config{quiet}; + print $o and next if $config{query_formats}; + + $media = JSON::XS::decode_json($o); + ($r, $fpath) = get_media(); + if ($r == 0) + { + $r = invoke_exec($fpath) if $config{exec}; + } + } + $r; +} + +sub print_checking +{ + return if $config{quiet}; + + my ($i, $n) = @_; + + print "($i of $n) " if $n > 1; + print "Checking ..."; +} -use clive::App; +sub get_media +{ + require File::Basename; -clive::App->main; + my $fpath = get_filename(); + my $fname = File::Basename::basename($fpath); + + if ($config{no_download}) {print_media($fname); return 0;} + + write_media($fpath, $fname); +} + +sub invoke_exec +{ + my $fpath = shift; + + my $e = $config{exec}; + $e =~ s/%f/"$fpath"/g; + + qx/$e/; + + $? >> 8; +} + +sub to_mb {(shift) / (1024 * 1024);} + +sub print_media +{ + printf "%s %.2fM %s\n", + shift, + to_mb($media->{link}0->{length_bytes}), + $media->{link}0->{content_type}; +} + +sub write_media +{ + my ($fpath, $fname) = @_; + + my $g = $config{get_with}; + $g =~ s/%u/"$media->{link}0->{url}"/g; + $g =~ s/%f/"$fpath"/g; + $g =~ s/%n/"$fname"/g; + + qx/$g/; + + ($? >> 8, $fpath); +} + +sub get_filename +{ + my $fpath; + + if ($config{output_file}) {$fpath = $config{output_file};} + else {$fpath = apply_output_path(apply_filename_format());} + + $fpath; +} + +sub apply_output_path +{ + require Cwd; + + # Do not touch. + my $cwd = decode_utf8(Cwd::getcwd); + my $fname = shift; + + require File::Spec::Functions; + + File::Spec::Functions::catfile($cwd, $fname); +} + +sub apply_filename_format +{ + return $config{output_filename} + if $config{output_filename}; + + my $title = trim(apply_regexp($media->{page_title})); + my $fname = $config{filename_format}; + + $fname =~ s/%s/$media->{link}0->{file_suffix}/g; + $fname =~ s/%h/$media->{host}/g if $media->{host}; # quvi 0.2.8+ + $fname =~ s/%i/$media->{id}/g; + $fname =~ s/%t/$title/g; + + $fname; +} + +sub trim +{ + my $s = shift; + $s =~ s{^\s+}//; + $s =~ s{\s+$}//; + $s =~ s{\s\s+}/ /g; + $s; +} + +sub apply_regexp +{ + my ($title, $rq) = (shift, qr|^/(.*)/(.*)$|); + + if ($config{regexp} =~ /$rq/) + { + return unless $title; # Must be a syntax check. + + $title = decode_utf8($title); # Do not touch. + + my ($pat, $flags, $g, $i) = ($1, $2); + + if ($flags) + { + $g = ($flags =~ /g/); + $i = ($flags =~ /i/); + } + + $rq = $i ? qr|$pat|i : qr|$pat|; + + return $g + ? join '', $title =~ /$rq/g + : join '', $title =~ /$rq/; + } + + croak "error: --regexp: expects " + . "`/pattern/flags', for example: `/(\\w)/g'\n"; +} + +sub detect_quvi_version +{ + my $q = (split /\s+/, $config{quvi})0; # Improve this. + my $o = qx|$q --version|; + if ($? >> 8 == 0) + { + return ($1, $2, $3) if (split /\n/, $o)0 =~ /(\d+).(\d+).(\d+)/; + } + print "warning: unable to detect quvi version\n" + unless $config{quiet}; + -1; +} + +sub check_quvi +{ + my @v = detect_quvi_version(); + $quvi_quiet_switch = '-vq' if $v0 >= 0 && $v1 >= 4 && $v2 >= 1; +} + +sub check_format +{ + if ($config{format} eq "help") + { + printf "Usage: + --format arg get format arg of media + --format list print domains with formats + --format list arg match arg to supported domain names +Examples: + --format list youtube print youtube formats + --format fmt34_360p get format fmt34_360p of media +%s\n", $depr_msg; + exit 0; + } + + elsif ($config{format} eq "list") + { + my $q = (split /\s+/, $config{quvi})0; # Improve this. + + my %h; + foreach (qx/$q --support/) + { + my ($k, $v) = split /\s+/, $_; + $h{$k} = $v; + } + + # -f list <pattern> + if (scalar @ARGV > 0) + { + + foreach (sort keys %h) + { + print "$_:\n $h{$_}\n" if $_ =~ /$ARGV0/; + } + } + + # -f list + else + { + print "$_:\n $h{$_}\n\n" foreach sort keys %h; + } + + printf "%s\n", $depr_msg; + + exit 0; + } +} + +sub print_help +{ + require Pod::Usage; + Pod::Usage::pod2usage(-exitstatus => 0, -verbose => 1); +} + +sub print_license +{ + print "# clive +# Copyright (C) 2010-2011 Toni Gundogdu <legatvs\@gmail.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +"; + exit 0; +} __END__ =head1 SYNOPSIS -clive options... URL... - -=head1 OPTIONS - - -h, --help Print help and exit - -v, --version Print version and exit - --hosts Print supported hosts and exit - --upgrade-config Upgrade 2.0/2.1 config to 2.2+ format - -l, --last Recall last input - --last-file=FILE Read/write FILE instead of default path -Output Options: - --emit-csv Emit video details in CSV to stdout - --debug Print cURL debug messages - -q, --quiet Turn off all output - --stderr Redirect all output to stderr - --print-fname Print filename before download starts -HTTP Options: - --agent=STRING Identify as STRING to http server - --connect-timeout=SECS Max time allowed connection to take - --connect-timeout-socks=S Same as above, tries to workaround SOCKS - --proxy=ADDR Use ADDR for http proxy - --no-proxy Disable all use of http proxy - --cookie-jar=FILE Enable cookies, write them to FILE -Cache Options: - --cache-file=FILE Read/write FILE instead of default path - -r, --cache-read Enable reading from cache - -d, --cache-dump Dump cache records to stdout - --cache-dump-format=STRING Print format for dumping cache records - --cache-grep=PATTERN Grep cache records for PATTERN - -i, --cache-ignore-case Ignore case while matching records - -D, --cache-remove-record Remove matched records from cache - --cache-clear Truncate cache records - --no-cache Disable cache all (read and write) use -Download Options: - -f, --format=FORMAT Extract FORMAT of video - -O, --output-file=FILE Write video to file - -c, --continue Continue partially downloaded file - -n, --no-extract Do not extract any videos - --save-dir=DIR Save video files to DIR - --cclass=CLASS Use character CLASS to filter titles - -C, --no-cclass Do not apply character class - --filename-format=STRING Use STRING to format output filename - --exec=CMD Command to run when transfer finishes - -e, --exec-run Invoke command defined with --exec - --stream-exec=CMD Stream command to be invoked - --stream=PERCENT Invoke --stream-exec when transfer reaches % - -s, --stream-pass Pass video link to --stream-exec command - --limit-rate=AMOUNT Limit transfer rate to AMOUNT (KB/s) - --stop-after=SIZE|PERCENT Stop file transfer after SIZE or PERCENT +clive -F -n --format=E<lt>value<gt> --output-file=E<lt>value<gt> + --filename-format=E<lt>valueE<gt> --config-file=E<lt>value<gt> + --quvi=E<lt>valueE<gt> --get-with=E<lt>valueE<gt> + --regexp=E<lt>valueE<gt> --exec=E<lt>valueE<gt> + --help --version --license --quiet + E<lt>urlE<gt> | E<lt>fileE<gt> + +=head2 OPTIONS + + --help Print help and exit + --version Print version and exit + --license Print license and exit + --quiet Turn off all output excl. errors + -F, --query-formats Query available formats to URL + -f, --format arg (=default) Download media format + -O, --output-file arg Write media to arg + -n, --no-download Do not download media, print details + --config-file arg File to read clive arguments from +Configuration: + --quvi arg Path to quvi(1) with additional args + --get-with arg Path to download command with args + --filename-format arg (=%t.%s) Downloaded media filename format + --regexp arg (=/(\w|\s)/g) Regexp to cleanup media title + --exec arg Invoke arg after each finished download + +=cut + +# vim: set ts=2 sw=2 tw=72 expandtab:
View file
clive-2.3.3.tar.gz/doc
Added
+(directory)
View file
clive-2.3.3.tar.gz/doc/man1
Added
+(directory)
View file
clive-2.3.3.tar.gz/doc/man1/clive.1.pod
Added
@@ -0,0 +1,318 @@ +=head1 NAME + +clive - (c)ommand (li)ne (v)ideo (e)xtraction tool + +=head1 SYNOPSIS + +clive E<lt>optionsE<gt> E<lt>urlE<gt> | E<lt>fileE<gt> ... + +=head1 DESCRIPTION + +clive is a command line media extraction tool for YouTube and similar +websites that require flash. + +=head2 Background + +clive originates from a simple shell script that was cooked up to work +around the YouTube's flash requirement back in 2006. + +=head2 Getting started + +=head3 Configuring + +=head4 Autodetection + +clive will attempt to autodetect the required commands from the $PATH, +when they have not been defined in either config file or the command +line. + +=head4 Configuration file + +See L</FILES> for an example configuration file. You may want to +consider adding at least the L</--quvi> and L</--get-with> there. + +=head4 See also + +L</TROUBLESHOOTING>, L</KNOWN ISSUES> and L</EXAMPLES>. + +=head1 OPTIONS + +clive expects the URLs to be separated by a newline character when the +they are read from either stdin or files. + +=head2 --help + +Print help and exit. + +=head2 --version + +Print version and exit. + +=head2 --license + +Print license and exit. + +=head2 -q, --quiet + +Turn off all I<clive> output excluding errors. Note that this switch has no +effect on any of the third party commands that clive invokes. + +=head2 -F, --query-formats + +Query available formats to an URL. The returned string will contain +an array of I<format strings>, each separated by the '|' character. +The array is created, by libquvi, from the data returned by the server. +You can use these I<format strings> with C<--format>. + +See also L</EXAMPLES> and C<--format>. + +=head2 -f, --format I<arg> (=default) + +Download format I<arg> of the media. The I<arg> can also be C<default>, +C<best>, C<help> or C<list>. Note, however, that of these, the C<list> and +the C<help> are deprecated and will be removed in the later versions of +clive. + +The I<arg> value is used with all of the URLs fed to clive at runtime. If +the I<arg> is C<best>, libquvi will determine the C<best> format available +to an URL. + +If the I<arg> is C<default> libquvi attempts to return an URL to whatever +was deemed to be the C<default> format to the URL. libquvi will switch +to C<default> format if the I<arg> was unregognized or the requested +I<arg> format was unavailable. + +For the above reasons, the downloaded format may be different from the +requested I<arg> format. + +For details about the YouTube's "fmt" IDs, refer to: + http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs + +See also L</EXAMPLES>, C<--query-formats>. + +=head2 -O, --output-file I<arg> + +Write media to I<arg>. Overrides C<--filename-format>. + +=head2 -n, --no-download + +Do not download the media, print details only. + +=head2 --config-file I<arg> + +Path to a file to read clive arguments from. See also L</FILES>. + +=head1 OPTIONS - CONFIGURATION + +The C<configuration> options may be read from the config file. +See L</FILES>. + +=head2 --quvi I<arg> + +I<arg> to be invoked to start the C<quvi(1)> command which clive uses to +parse the media details. This is typically a full path to C<quvi(1)> with +any additional options. Overrides any value set by autodetection. + +The following specifiers can be used in the I<arg>: + + %u .. Media stream URL + +I<All> occurences of the specifier will be replaced. clive will +automatically append C<--quiet> to I<arg>. + +=head2 --get-with I<arg> + +Path to a download command (e.g. C<wget(1)> or C<curl(1)>) with any additional +arguments. clive invokes this command to download the media. Overrides any +value set by autodetection. + +The following specifiers are supported: + + %n Media filename (after applying --regexp and --filename-format) + %f Path to downloaded media file (output path and %n) + %u Media stream URL + +I<All> occurences of the specifier will be replaced. + +=head2 --filename-format I<arg> (="%t.%s") + +Use I<arg> to specify the media output filename format. +The following specifiers are supported: + + %t Media title (after applying --regexp) + %h Media host ID + %s File suffix + %i Media ID + +I<All> occurences of the specifier will be replaced. + +=head2 --regexp I<arg> (="/(\w|\s)/g") + +Use regular expression I<arg> to clean up the media title before +it is used in the filename. The syntax supports both "i" +(case-insensitive) and "g" (global or "find all"). + +=head2 --exec I<arg> + +Invoke I<arg> after media download finishes. The following specifiers +are supported: + + %f Path to the downloaded media file + +I<All> occurences of the specifier will be replaced. + +=head1 TROUBLESHOOTING + +=head2 error: specify path to quvi(1) command with --quvi + +clive uses C<quvi(1)> to parse the media details. Use the C<--quvi> to specify +the path. See also L</FILES>. + +=head2 error: specify path to a download command with --get-with + +clive uses a 3rd party command to download the media. Use the C<--get-with> to +specify the path to such command. See also L</FILES>. + +=head2 HTTP/1.0 500 Internal Server Error + +Any number of reasons. Some have been tracked back to unacceptable +user-agent string value and mangled HTTP headers (e.g. a green-eyed +HTTP proxy). See also L</KNOWN ISSUES>. + +=head1 KNOWN ISSUES + +=head2 Resuming partially transferred files may fail + +Some websites are known to refuse to work with the HTTP requests to +resume a file transfer. + +=head3 Workaround + +None known. You will have to remove the existing file before you try +again. + +=head2 HTTP user-agent + +Some websites refuse to play nice with renegade user-agent strings. + +=head3 Recommendations + +Make sure both C<quvi(1)> and C<curl(1)> use the same user-agent string. +Note that C<quvi(1)> uses "Mozilla/5.0" by default. See also +L</TROUBLESHOOTING> for C<HTTP/500>. + +=head2 HTTP proxy + +Generally OK, although some proxies may have been configured to +C<cook up> the HTTP headers before they are sent back to the server. +This may sometimes lead to issues with the servers. + +=head3 Recommendations + +If you use an HTTP proxy, make sure you have configured all of the commands +that clive uses (e.g. C<quvi(1)>, C<curl(1)>, etc.) to use the same proxy. + +=head2 Exit status + +If you are planning to use clive for anything more peculiar, consider the +following example: + + * You feed clive two URLs + * The 1st one fails, quvi exits with a non-zero value + * clive proceeds to the 2nd URL, quvi now exits with zero value + * clive exits with the zero, even if the 1st URL failed + +=head3 Workaround + +Feed one URL at a time. + +=head1 FILES + +=head2 Local user + + * ~/.config/clive/config + * ~/.clive/config + * ~/.cliverc + +=head2 System wide + + * /usr/local/share/clive/config + * /etc/xdg/clive/clive.conf + * /usr/share/clive/config + * /etc/xdg/clive.conf + * /etc/clive/config + +=head2 CLIVE_CONFIG + +You can also set CLIVE_CONFIG, e.g.: + + env CLIVE_CONFIG=/path/to/config/file clive + +=head2 --config-file + +Or use C<--config-file>, e.g.: + + clive --config-file /path/to/config/file + +=head2 Example config + +A typical configuration file could look like: + + --get-with "/usr/bin/curl -L -C - -o %f %u --user-agent Mozilla/5.0" + --quvi "/usr/bin/quvi --category-http %u" + --filename-format "%t_%i.%s" + --exec "/usr/bin/vlc %f" + +=head1 EXAMPLES + +=head2 Note + +Put the URLs inside quotes when they are specified as the command line +arguments to the program. This is the recommended practice. + +=head2 clive "URL" + +Typical use. + +=head2 clive -f best "URL" + +Download the best available format of the media. + +=head2 clive -F "URL" + +Query available formats to the URL. Use one of the returned format +strings from this list with C<--format>. + +=head2 clive -n "URL" + +Do not download the media, print the details only. + +=head1 EXIT STATUS + +clive exits with 0 on success, otherwise the code is E<gt>0. For example, +if command line parsing fails, the exit status is 1. + +When an error occurs in another command invoked by clive, e.g. C<quvi(1)>, +clive then exits with the exit status returned by that command. + +See also L</KNOWN ISSUES> for L</Exit status>. + +=head1 SEE ALSO + +C<quvi(1)> C<curl(1)> + +=head1 WWW + + Home : http://clive.sourceforge.net/ + gitweb: http://repo.or.cz/w/clive.git + +=head1 LICENSE + +clive is free software, licensed under the GPLv3+. + +=head1 AUTHOR + +Toni Gundogdu E<lt>legatvs at sign gmail comE<gt> + +Thanks to all those who have contributed to the project by sending +patches, reporting bugs and writing feedback. You know who you are.
View file
clive-2.3.3.tar.gz/examples/cliverc
Added
@@ -0,0 +1,37 @@ + +# Typical paths. +# /usr/local/share/clive/config +# /usr/share/clive/config +# /etc/clive/config +# ~/.cliverc +# ~/.clive/config +# ~/.config/clive/config +# or set the path to the file with CLIVE_CONFIG env. variable. + +# quvi command. clive appends "--quiet" to it. +# %u Media page URL +# quvi 0.4.1+ +--quvi "/usr/bin/quvi -c http %u" +#--quvi "/usr/bin/quvi --category-http %u" + +# Download command. +# %u Media stream URL +# %f Path to the downloaded media file +# %n File name (basename of the above) +# Make a note of user-agent. Some websites are known refuse to work +# with the curl default user-agent value. Use the quvi default value. +--get-with "/usr/bin/curl -L -C - -o %f %u --user-agent Mozilla/5.0" + +# Play copied media file when transfer finishes. +# %f Path to the local media file +#--exec "/usr/bin/vlc --quiet %f" + +# Save downloaded media as, where +# %h Media host ID +# %t Media title +# %s File suffix +# %i Media ID +#--filename-format "%t_%i.%s" + +# Cleanup title with regular expression. +#--regexp "/(\\w)/g"
View file
clive-2.3.3.tar.gz/t/clive-Pod.t
Added
@@ -0,0 +1,11 @@ +use warnings; +use strict; + +use Test::More; + +eval "use Test::Pod 1.00"; +plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; + +my @poddirs = qw(doc/man1); + +all_pod_files_ok(all_pod_files(@poddirs));
View file
clive-rpmlintrc
Changed
@@ -1,1 +1,5 @@ +# This line is mandatory to access the configuration functions +from Config import * + addFilter("perl5-naming-policy-not-applied") +addFilter("invalid-spec-name")
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.