📅 2013-Nov-19 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ gcalcli, google calendar ⬩ 📚 Archive
If you spend a lot of time at the terminal, you might like to access your Google Calendar at the shell too. A great tool to do this is gcalcli. It shows information from all your calendars in Google Calendar, in various formats and using colors.
To install:
$ sudo apt install gcalcli
Note that this is an old version, it did not work for me.
To install:
$ sudo pip install gcalcli
This worked without problems on Ubuntu 14.04, but had problems on Ubuntu 15.04.
Before you install gcalcli, first install the Python libraries that it depends on:
$ sudo apt install python-gflags python-googleapi
After this, clone gcalcli from its Github repository:
$ git clone https://github.com/insanum/gcalcli.git
Finally, install gcalcli using its setup.py
file:
$ cd gcalcli
$ sudo python setup.py install
The gcalcli project has a Client ID and Client Secret registered with Google to access its API. You need to authorize it to access your Google account only the first time. To do this, call gcalcli with any of its options, for example:
$ gcalcli agenda
This opens a Google URL in your browser asking whether you want to authorize gcalcli to access your Calendar. Authorize it and come back to the terminal. Let the gcalcli command exit or just kill it. gcalci would have stored the authorization information in ~/.gcalcli_oauth
.
From here on, you can call gcalcli with any of its options and it works using the stored authorization information.
To view your events for the next few days:
$ gcalcli agenda
To view your calendar for this week:
$ gcalcli calw
To view your calendar for this week and the following week:
$ gcalcli calw 2
Tried with: Ubuntu 14.04 and Ubuntu 15.04