App-gcal

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    Add note about Google's two factor authentication.

1.120860  2012-03-26 13:33:44 Europe/London
    Doc updates. No code changes.

1.120850  2012-03-25 19:54:23 Europe/London
    Allow user to pass in a username and password as arguments to gcal.

1.120110  2012-01-11 12:43:55 Europe/London
    Support wildcards on Windows.
    Better error message if we can't find credentials.

1.113460  2011-12-12 13:49:09 Europe/London
    Don't die if event does not have a description or location.

1.113220  2011-11-18 08:08:10 Europe/Zurich
    Initial version.

lib/App/gcal.pm  view on Meta::CPAN

    unless ($gcal) {

        unless ( $username && $password ) {

            # get login and password from .netrc
            require Net::Netrc;
            my $netrc = Net::Netrc->lookup('google.com');

            unless ($netrc) {
                die(
                    'Error. Could not find your credentials in your .netrc file'
                );
            }

            $username = $netrc->login;
            $password = $netrc->password;
        }

        # login
        require Net::Google::Calendar;
        $gcal = Net::Google::Calendar->new;

lib/App/gcal.pm  view on Meta::CPAN

  gcal --help

  gcal [events.ical, 'tomorrow at noon. Lunch with Bob', ...]

  gcal --username="bill" --password="1234" [events.ical, 'tomorrow at noon. Lunch with Bob', ...]

=head1 DESCRIPTION

The C<gcal> command provides a quick and easy interface to Google Calendar from the command line.

Before using the C<gcal> command, you need to provide your Google credentials. The most convenient way to do this is by using your C<~.netrc> file and supplying credentials for the C<google.com> machine. For example:

  machine google.com
  login bill
  password 1234

NOTE: On Windows, your C<.netrc> file is at C<%HOME%.netrc>.

NOTE 2: On Unix, ensure your C<~.netrc> file has the permissions set to 600.

Alternatively, you can pass the username and password as a parameter to C<gcal>, as follows:



( run in 0.237 second using v1.01-cache-2.11-cpan-4d50c553e7e )