.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "GCAP.1 1p" .TH GCAP.1 1p "2021-01-05" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" gcap \- Youtube closed caption downloader .SH "SYNOPSIS" .IX Header "SYNOPSIS" gcap [\-i] [\-t] [\-r ] [\-\-proxy= | \-\-no\-proxy] [\-\-help] | .SH "DESCRIPTION" .IX Header "DESCRIPTION" gcap is a command line tool for downloading Youtube closed captions. The downloaded closed captions are saved in SubRip (srt) file format. The srt files are saved as \*(L"$videoid_$langid.srt\*(R" by default. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-help\fR" 4 .IX Item "--help" Print help and exit. .IP "\fB\-\-version\fR" 4 .IX Item "--version" Print version and exit. .IP "\fB\-q, \-\-quiet\fR" 4 .IX Item "-q, --quiet" Be quiet. .IP "\fB\-i, \-\-interactive\fR" 4 .IX Item "-i, --interactive" Open the interactive prompt which can be used to select the items. gcap selects \fIall\fR items by default. See also \*(L"\s-1INTERACTIVE PROMPT\*(R"\s0. .IP "\fB\-t, \-\-title\fR" 4 .IX Item "-t, --title" Parse video title and use it in the output filename(s) instead of video \s-1ID.\s0 The default is no. .IP "\fB\-r, \-\-regexp\fR=arg" 4 .IX Item "-r, --regexp=arg" Cleanup video title using the specified \fIarg\fR regular expression. The default is \*(L"/(\ew|\es)/g\*(R". .IP "\fB\-\-proxy\fR \fIarg\fR" 4 .IX Item "--proxy arg" Use \fIarg\fR for \s-1HTTP\s0 proxy, e.g. \*(L"http://foo:1234\*(R". Overrides the http_proxy environment setting. .IP "\fB\-\-no\-proxy\fR" 4 .IX Item "--no-proxy" Disable use of \s-1HTTP\s0 proxy. Overrides both \f(CW\*(C`\-\-proxy\*(C'\fR and http_proxy environment settings. .SH "INTERACTIVE PROMPT" .IX Header "INTERACTIVE PROMPT" Use the \f(CW\*(C`\-\-interactive\*(C'\fR switch to open the prompt. Note that gcap uses (as of 0.1.0) the Umph::Prompt module for this. Once the prompt opens, type \*(L"help\*(R" to get a list of commands available to the prompt. .SH "EXAMPLES" .IX Header "EXAMPLES" .IP "\fBgcap 0QRO3gKj3qw\fR" 4 .IX Item "gcap 0QRO3gKj3qw" .PD 0 .ie n .IP "\fBgcap ""http://www.youtube.com/watch?v=0QRO3gKj3qw""\fR" 4 .el .IP "\fBgcap ``http://www.youtube.com/watch?v=0QRO3gKj3qw''\fR" 4 .IX Item "gcap http://www.youtube.com/watch?v=0QRO3gKj3qw" .PD Both yield the same results. .IP "\fBgcap \-ti 0QRO3gKj3qw\fR" 4 .IX Item "gcap -ti 0QRO3gKj3qw" Same as above two but use video title in the filename and choose which of the closed captions should be downloaded. .SH "EXIT STATUS" .IX Header "EXIT STATUS" Exits 0 on success, otherwise 1. .SH "FILES" .IX Header "FILES" .ie n .IP "$HOME/.gcaprc, for example:" 4 .el .IP "\f(CW$HOME\fR/.gcaprc, for example:" 4 .IX Item "$HOME/.gcaprc, for example:" echo \*(L"\-\-interactive\*(R" >> ~/.gcaprc .SH "NOTES" .IX Header "NOTES" .IP "\fBAvailability\fR" 4 .IX Item "Availability" The following error message produced by gcap (or the \s-1XML::DOM\s0 module) typically indicates that the video does not have any closed captions available for it (\s-1URL\s0 omitted for brewity): .Sp .Vb 2 \& Couldn\*(Aqt parsefile [...] with LWP: no element found at line 1, \& column 0, byte \-1 at [...]/XML/Parser.pm [...] .Ve .IP "\fBhttp_proxy\fR" 4 .IX Item "http_proxy" gcap depends on \s-1XML::DOM\s0 which uses LWP::UserAgent to download the data. Note that LWP::UserAgent reads http_proxy environment setting. e.g.: .Sp .Vb 1 \& env http_proxy=http://foo:1234 gcap video_id .Ve .SH "WWW" .IX Header "WWW" .PP .SH "AUTHOR" .IX Header "AUTHOR" Toni Gundogdu