From 38f8b09aa59b7da47e8597b17a91be5f177bec74 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 10 May 2015 21:40:55 -0400 Subject: documentation --- bin/pocket | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) (limited to 'bin') diff --git a/bin/pocket b/bin/pocket index a73633c..b335ae1 100644 --- a/bin/pocket +++ b/bin/pocket @@ -1,6 +1,101 @@ #!/usr/bin/env perl use strict; use warnings; +# PODNAME: pocket +# ABSTRACT: interact with the Pocket API from the command line + +=head1 SYNOPSIS + + $ pocket list + Enter your consumer key: ... + Visit https://getpocket.com/auth/authorize?request_token=...&redirect_uri=https://getpocket.com/ and log in. When you're done, press enter to continue. + + http://the-toast.net/2015/04/27/looking-back-fragments-from-womens-shelters-1981-1996/view-all/ + https://modelviewculture.com/pieces/dreaming-holding-onto-the-hope-of-justice-in-technology-and-america + [...] + $ pocket words --archive + 2233913 + +=head1 DESCRIPTION + +This program provides several subcommands to allow you to interact with your +Pocket list from the command line. It will automatically authenticate as +needed, prompting you for your consumer key, and will store the returned +credentials in C<~/.pocket>. + +=head1 COMMANDS + +=head2 authenticate + +Authenticates you with the Pocket API and does nothing else. Not usually +necessary, since all of the following commands will automatically authenticate +as necessary. + +=head2 list + +Prints the URLs in your list. By default, prints unread URLs, but also takes options to adjust the list that is returned: + +=over 4 + +=item --unread + +Return only unread links. This is the default, but can be provided for +explicitness. + +=item --archive + +Return only archived links. + +=item --all + +Return both unread and archived links. + +=item --tag= + +Return links with the given tag. This option can be passed multiple times, and +may be combined with the above options. + +=back + +=head2 words + +Takes the same options as C, but instead of printing the URLs of the +articles, prints the number of words in all of those articles combined. + +=head2 search + +Returns a list of URLs whose title or URL contains C. Takes the same +options as C to limit the search. + +=head2 favorites + +Returns a list of favorited URLs. Takes the same options as C. + +=head2 add [title] + +Adds C to your list, optionally with the given C. + +=head2 archive <url> + +Moves C<url> from your list to your archive. + +=head2 readd <url> + +Moves C<url> from your archive to your list. + +=head2 favorite <url> + +Marks C<url> as a favorite. + +=head2 unfavorite <url> + +Unmarks C<url> as a favorite. + +=head2 delete <url> + +Deletes C<url> from your list and/or archive entirely. + +=cut use WWW::Pocket::Script; WWW::Pocket::Script->new->run(@ARGV); -- cgit v1.2.3-54-g00ecf