[SCM] Video extraction utility for YouTube, Google Video and other video sites (Debian packaging) branch, master, updated. upstream/2.1.7-214-g6762190
legatvs
legatvs at gmail.com
Wed Apr 1 14:45:08 UTC 2009
The following commit has been merged in the master branch:
commit e2843fc84352dc04c4b302cdf531c36c2792d693
Author: legatvs <legatvs at gmail.com>
Date: Sun Mar 15 16:25:04 2009 +0200
Add --output-video option.
diff --git a/CHANGES b/CHANGES
index 9db28b8..54ae258 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
Version 2.1.7
User-visible changes:
+ * Add --output-video option
* Add option groups to --help output
* Add --stream-exec and --stream options
- Ported from cclive
diff --git a/clive b/clive
index 7c44b09..d7c9c96 100755
--- a/clive
+++ b/clive
@@ -128,18 +128,19 @@ GetOptions(\%opts,
# Commented out until WWW::Curl is fixed:
# 'maxspeed!', 'minspeed!',
# Workarounds since $longopt!|$shortopt cannot be used.
- 'no-extract|n' => sub { $opts{extract} = 0 },
- 'no-login|L' => sub { $opts{login} = 0 },
- 'no-proxy|X' => sub { $opts{proxy} = "" },
+ 'no-extract|n' => sub { $opts{extract} = 0 },
+ 'no-login|L' => sub { $opts{login} = 0 },
+ 'no-proxy|X' => sub { $opts{proxy} = "" },
# Workaround for options with dashes. There's likely a better way.
- 'ignore-case|i' => sub { $opts{case} = 0 },
- 'filename-format|N=s' => sub { $opts{fnfmt} = $_[1] },
- 'show-format|H=s' => sub { $opts{showfmt} = $_[1] },
- 'youtube-user|u=s', => sub { $opts{ytuser} = $_[1] },
- 'youtube-pass|t=s', => sub { $opts{ytpass} = $_[1] },
- 'emit-csv|e', => sub { $opts{emitcsv} = 1 },
- 'emit-xml|E', => sub { $opts{emitxml} = 1 },
- 'stream-exec=s', => sub { $opts{streamexec}= $_[1] },
+ 'ignore-case|i' => sub { $opts{case} = 0 },
+ 'filename-format|N=s' => sub { $opts{fnfmt} = $_[1] },
+ 'show-format|H=s' => sub { $opts{showfmt} = $_[1] },
+ 'youtube-user|u=s' => sub { $opts{ytuser} = $_[1] },
+ 'youtube-pass|t=s' => sub { $opts{ytpass} = $_[1] },
+ 'emit-csv|e' => sub { $opts{emitcsv} = 1 },
+ 'emit-xml|E' => sub { $opts{emitxml} = 1 },
+ 'stream-exec=s' => sub { $opts{streamexec} = $_[1] },
+ 'output-video|O=s' => sub { $opts{outputfname} = $_[1] },
) or exit(1);
pod2usage(-exitstatus => 0, -verbose => 1) if $opts{help};
@@ -407,13 +408,12 @@ sub extract_video {
return
if $rc != 0 or !defined $content_type;
- my $fn = title_to_filename($entry{page_title});
- my $path = File::Spec->catfile( $opts{savedir} || $workdir, $fn );
+ my $fn = $opts{outputfname} || title_to_filename($entry{page_title});
+ my $path = File::Spec->catfile($opts{savedir} || $workdir, $fn);
my $filemode = ">";
my $remaining = $entry{file_length};
my $size = -s $path || 0;
my $cont_from = 0;
- my $errmsg;
save_entry($hash);
@@ -462,6 +462,7 @@ sub extract_video {
print "\n";
}
+ my $errmsg;
if ( $rc == 0 ) {
return
unless $opts{extract};
@@ -1637,6 +1638,7 @@ Logging and Input Options:
-T, --savebatch=FILE save url batch to FILE
-p, --paste paste input from clipboard
Download Options:
+ -O, --output-video=FNAME write video to file
-n, --no-extract do not extract any videos
-c, --continue continue partially downloaded file
-W, --overwrite overwrite existing video file
diff --git a/clive.1 b/clive.1
index 770ad18..9276b68 100644
--- a/clive.1
+++ b/clive.1
@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "clive 1"
-.TH clive 1 "2009-03-14" "2.1.7" "clive manual"
+.TH clive 1 "2009-03-15" "2.1.7" "clive manual"
.SH "NAME"
clive \- the non\-interactive video extraction utility
.SH "SYNOPSIS"
@@ -297,6 +297,9 @@ Paste input from clipboard. The pasted URLs are expected to be separated with
newlines.
.PP
\&\fBDownload Options\fR
+.IP "\fB\-O \-\-output\-video=\fR\fIfile\fR" 4
+.IX Item "-O --output-video=file"
+Write video to \fIfile\fR.
.IP "\fB\-n \-\-no\-extract\fR" 4
.IX Item "-n --no-extract"
Do not actually extract any videos.
diff --git a/clive.pod b/clive.pod
index 1167aae..7f66652 100644
--- a/clive.pod
+++ b/clive.pod
@@ -200,6 +200,10 @@ B<Download Options>
=over 4
+=item B<-O --output-video=>I<file>
+
+Write video to I<file>.
+
=item B<-n --no-extract>
Do not actually extract any videos.
--
Video extraction utility for YouTube, Google Video and other video sites (Debian packaging)
More information about the Pkg-perl-cvs-commits
mailing list