umph man page

umph — Command line tool for parsing YouTube feeds

Synopsis

umph [-q] [-i] [--type=<value>]
[--export-response=<value>] [--export-format=<value>]
[[--all | [--start-index=<value>] [--max-results=<value>]]
[--proxy=<addr> | --no-proxy] [--user-agent=<value>]
[--help] <playlist_id> | <username>

Description

umph is a command line tool for parsing YouTube feeds. It can parse playlists, favorite lists, and user upload lists.

umph prints the found URLs to the standard output, each URL separated with a newline. It can be used to select the feed items by using the "--interactive" prompt.

Options

-h, --help

Print help and exit.

-v, --version

Print version and exit.

-q, --quiet

Turn off output to stderr, e.g. status changes. Warnings and errors are still printed.

-t, --type arg (=p)

Specifies the feed type to get. arg can be one of the following:

p, playlist  (arg0 will be treated as playlist ID)
f, favorites (arg0 will be treated as username)
u, uploads   (ditto)

See also "Examples".

-s, --start-index arg (=1)

"The start-index parameter specifies the index of the first matching result that should be included in the result set. This parameter uses a one-based index, meaning the first result is 1, the second result is 2 and so forth.

This parameter works in conjunction with the "--max-results" parameter to determine which results to return. For example, to request the second set of 10 results, i.e. results 11-20, set the start-index parameter to 11 and the max-results parameter to 10." -- <http://is.gd/l4wDNf>

"--all" causes umph to ignore the value set with this option.

-m, --max-results arg (=25)

"The max-results parameter specifies the maximum number of results that should be included in the result set.

This parameter works in conjunction with the "--start-index" parameter to determine which results to return. For example, to request the second set of 10 results, i.e. results 11-20, set the max-results parameter to 10 and the start-index parameter to 11.

The default value of this parameter is 25, and the maximum value is 50. However, for displaying lists of videos, we recommend that you set the max-results parameter to 10." -- <http://is.gd/OcSjwU>

"--all" causes umph to ignore the value set with this option.

-a, --all

Get the entire feed.

-i, --interactive

Open the interactive prompt which can be used to select the items. umph selects all feed items by default. See also "Interactive Prompt".

-E, --export-response arg

Write server error response (XML) to file arg and exit with status 1. Normally, the program parses the response and prints it to the stderr.

-d, --export-format arg

Set the interchange format in which the data is to be printed. Possible values:

json .. Print in JSON
csv  .. Print in CSV

By default, umph prints out each media URL separated by a newline.

--json [depr.]

Print details in JSON. Negates --csv. This option is deprecated since 0.2.2, use "--export-format", instead.

--csv [depr.]

Print details in CSV. This option is deprecated since 0.2.2, use "--export-format", instead.

--user-agent, -g arg

Set the user-agent string to send to the HTTP server. The default value is 'Mozilla/5.0'.

--proxy arg

Use arg for HTTP proxy, e.g. "http://foo:1234". Overrides the http_proxy environment setting.

--no-proxy

Disable use of HTTP proxy. Overrides both "--proxy" and http_proxy environment settings.

Interactive Prompt

The interactive prompt may be used to select the feed items. The prompt may be useful when the feed contains many items and you wish to limit the selection to cover only some of them.

Note

This requires the Umph::Prompt module.

Examples

umph AAF3A1D0CA1E304F

Get the playlist "AAF3A1D0CA1E304F".

umph -s 11 -m 10 AAF3A1D0CA1E304F

Like above but get the items 11-20 from the playlist.

umph -a AAF3A1D0CA1E304F

Get the entire playlist. By default, umph gets only the items 1-25. See also "--start-index" and "--max-results".

umph -t f foo

Get the favorites for user "foo".

umph -t u foo

Get the uploads for user "foo".

umph AAF3A1D0CA1E304F | cclive

Download the playlist items using cclive(1).

umph -i AAF3A1D0CA1E304F | cclive

Same but choose which of the videos to download.

Exit Status

Exits 0 on success, otherwise 1.

Files

~/.umphrc - configuration file

Most of the options may be defined in the configuration file.

Note

umph uses Getopt::ArgvFile Perl module to read the configuration file. The module interpolates the options from the configuration file. Getopt::ArgvFile is described at:
http://search.cpan.org/perldoc?Getopt::…

Example

$ cat ~/.umphrc
--user-agent=foo/1.0
--export-format=json
--interactive
--all

Environment

http_proxy

LWP::UserAgent reads the http_proxy setting. See also "--proxy" and "--no-proxy".

Example

$ env http_proxy=http://foo:1234 umph AAF3A1D0CA1E304F

Notes

Unavailable feeds

umph cannot parse "private" lists.

“Play all” playlists

umph cannot currently handle these.

WWW

Home  : http://umph.googlecode.com/
gitweb: http://repo.or.cz/w/umph.git

License

umph is free software, licensed under the GPLv3+.

Author

Toni Gundogdu <legatvs at sign cpan org>

Info

2012-11-25 perl v5.22.1 User Contributed Perl Documentation