clive.1.pod: add missing sections
[clive.git] / man1 / clive.1.pod
blob02173e1631f4dbc97b5e7a09fea8df4c043f0ac0
1 =head1 NAME
3 clive - command line video extraction tool
5 =head1 DESCRIPTION
7 clive is a command line video extraction tool for Youtube and other similar
8 video websites that require Adobe Flash for viewing the content.
10 =head1 OPTIONS
12 =over 4
14 =item B<--help>
16 Print help and exit.
18 =item B<--version>
20 Print version and exit.
22 =item B<--license>
24 Print license and exit.
26 =item B<--quiet>
28 Turn off all I<clive> output excluding errors. Note that this switch has no
29 effect on any of the third party commands that clive invokes.
31 =item B<-f, --format> I<arg>
33 Download I<arg> format of the video. Run C<quvi(1)> with C<--support> to get
34 a list of the supported formats.
36 =item B<-O, --output-file> I<arg>
38 Write video to I<arg>.
40 =item B<-n, --no-download>
42 Do not download the video, display video details only.
44 =item B<--config-file> I<arg>
46 Path to a file to read clive arguments from. See also L</FILES>.
48 =back
50 =head1 OPTIONS - CONFIGURATION
52 You can specify I<any> of the the command line options in the configuration
53 file. These options are under C<Configuration> for superficial reasons
54 (C<--help> output) only.
56 =over 4
58 =item B<--quvi> I<arg>
60 Path to C<quvi(1)> command with any additional arguments. clive invokes this
61 command to parse the video details (e.g. download URL). The following
62 specifiers are supported:
64     %u  Video URL
66 Note that I<all> occurences of the specifier will be replaced. clive also
67 appends C<--quiet> to I<arg> if it's not found.
69 If you use an HTTP proxy with C<quvi(1)>, you should do the same with
70 C<--get-with>, especially the proxy masks your IP. Some websites refuse
71 to work with requests for unique URLs coming from different IPs.
73 =item B<--get-with> I<arg>
75 Path to a download command (e.g. C<wget(1)> or C<curl(1)>) with any additional
76 arguments. clive invokes this command to download the video. The following
77 specifiers are supported:
79     %u  Video download URL
80     %f  Full path to video file
81     %n  Video file name
83 Note that I<all> occurences of the specifier will be replaced. See also the
84 note above about using an HTTP proxy with C<--quvi>.
86 =item B<--filename-format> I<arg>
88 Use I<arg> to specify the video output filename format. The default is "%t.%s".
89 The following specifiers are supported:
91     %t  Video title (after applying --regexp)
92     %i  Video ID
93     %h  Video host ID (req. quvi 0.2.8+)
94     %s  Video file suffix (parsed from server returned content-type)
96 Note that I<all> occurences of the specifier will be replaced.
98 =item B<--regexp> I<arg>
100 Use regular expression I<arg> to clean up the video title before
101 it is used in the output filename. The default is "/(\w|\s)/g".
103 Note that the syntax supports both "i" (case-insensitive) and "g"
104 (global or find all).
106 =item B<--exec> I<arg>
108 Invoke I<arg> after video download finishes. The following specifiers
109 are supported:
111     %f  Full path to the downloaded video file
113 Note that I<all> occurences of the specifier will be replaced.
115 =back
117 =head1 EXAMPLES
119 These examples assume you have set C<--quvi> and C<--get-with> in the config
120 file. See L</FILES> for an example config file.
122 =over 4
124 =item B<clive "http://www.youtube.com/watch?v=DUM1284TqFc">
126 Typical use.
128 =item B<clive "http://www.youtube.com/watch?v=DUM1284TqFc" -f sd_270p>
130 Same but get the sd_270p (Youtube specific) format instead. See
131 C<--support> for a complete list of websites and formats.
133 =item B<clive "http://www.youtube.com/watch?v=DUM1284TqFc" -n>
135 Do not download the video. Print the video details only.
137 =item B<echo "http://www.youtube.com/watch?v=DUM1284TqFc" | clive>
139 Yet another way to feed clive with an URL. Or feed several on one go:
141   % cat >> urls.lst
142   http://www.youtube.com/watch?v=DUM1284TqFc
143   http://www.youtube.com/watch?v=TqgTz8ymZl8
144   (ctrl+d)
145   % clive < urls.lst
147 =back
149 =head1 FILES
151 =over 4
153 =item B<~/.cliverc>
155 Additional search paths:
157     ~/.clive/config
158     ~/.config/clive/config
160 For a system-wide configuration:
162     /usr/local/share/clive/config
163     /usr/share/clive/config
164     /etc/clive/config
166 You can also set CLIVE_CONFIG, e.g.:
168     env CLIVE_CONFIG=/path/to/config/file clive
170 Or use C<--config-file>, e.g.:
172     clive --config-file /path/to/config/file
174 A typical configuration file could look like:
176     --quvi "/usr/bin/quvi %u"
177     --get-with "/usr/bin/curl -L -C - -o %f %u"
178     --filename-format "%t_%i.%s"
179     --exec "/usr/bin/vlc %f"
181 You should consider setting at least the C<--quvi> and C<--get-with>.
183 =back
185 =head1 EXIT STATUS
187 clive exits with 0 on success, otherwise the code is E<gt>0. Strictly clive
188 exit statuses are 0 or 1. For example, if command line parsing fails, the exit
189 status is 1.
191 When an error occurs in another command invoked by clive, e.g. C<quvi(1)>,
192 clive exits with the exit status returned by the command.
194 If you are planning to use clive for anything more peculiar, you should feed
195 it only one URL at a time. For example:
197     * You feed clive two URLs
198     * The 1st one fails, quvi exits with a non-zero value
199     * clive proceeds to the 2nd URL, quvi now exits with zero value
200     * clive exits with the zero, even if the 1st URL failed
202 =head1 MANGLED CHARACTERS
204 Check your terminal settings for an invalid locale setting. You can get a list
205 of the available locale names by running C<locale -a>. Also, make sure your
206 terminal supports unicode. e.g.:
208     % LANG=en_US.UTF8 urxvt&
209     % clive ... # in the new opened terminal
211 quvi (or libquvi) converts the characters to unicode if the parsed data
212 contains the charset meta tag. Otherwise the characters are copied from
213 the original content as they are without conversion.
215 =head1 WEBSITE SUPPORT
217 Run C<quvi(1)> with C<--support> to get a list of the websites and formats
218 that they support.
220 =head1 UPGRADING TO 2.3
222 =over 4
224 =item B<error: specify path to quvi(1) command with --quvi>
226 clive uses C<quvi(1)> to parse the video details. Use the C<--quvi> to specify
227 the path. See also L</FILES>.
229 =item B<error: specify path to a download command with --get-with>
231 clive uses a 3rd party command to download the videos. Use the C<--get-with> to
232 specify the path. See also L</FILES>.
234 =back
236 =head1 CONTRIBUTING
238 =over 4
240 =item B<Add support for a website>
242 This is quvi(1) territory, please visit L<http://quvi.googlecode.com/>.
244 You can also find the the READMEs and HOWTOs (on most systems) from
245 $prefix/share/quvi and $prefix/share/doc/quvi directories. Or visit:
247     <http://repo.or.cz/w/quvi.git/tree/HEAD:/doc>
248     <http://repo.or.cz/w/quvi.git/tree/HEAD:/share/lua>
250 =item B<Submitting patches>
252 If you have cooked up a patch, please submit it to the tracker see L</OTHER>.
253 Pull requests from git repos are also welcome.
255 =back
257 =head1 OTHER
259 <http://clive.googlecode.com/>
261 <http://sourceforge.net/projects/clive/support>
263 <git://repo.or.cz/clive.git>
265 =head1 SEE ALSO
267 C<quvi(1)>  C<wget(1)>  C<curl(1)>
269 =head1 AUTHOR
271 Toni Gundogdu <legatvs at sign gmail com>.