#!/usr/bin/perl
# -*- coding: ascii -*-
###########################################################################
# clive, command line video extraction utility.
# Copyright 2007, 2008, 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/>.
###########################################################################
use warnings;
use strict;

binmode( STDOUT, ":utf8" );
binmode( STDERR, ":utf8" );

use clive::App;

clive::App->main;

__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
