Package: icalcli
icalcliAn iCalendar Command Line Interfaceicalcli- a modification ofgcalcli- is a Python command line front-end to your Calendar. It allows you to get your agenda, view weekly and monthly calendars (ascii text graphical calendar), search for events, add new events, delete events, and edit events.Unlikegcalcliwhich is tied to Google Calendar,icalcliis agnostic to (abstracts away from) the actual backend calendar service. It relies on a backend interface which interacts with the backend calendar to perform all the CRUD (Create, Retrieve, Update and Delete) operations on the actual calendar. The package includes two backends:Theetesync_backendsubpackage provides a backend interface to theEteSynccalendar. In fact,icalcliwas created primarily to provide a command line interface to my self hostedEteSynccalendar.Thefile_backendsubpackage provides a backend interface to a calendar contained in a localicsfile. This is useful as a viewer/editor oficsfiles. It is also useful to try outicalciwithout having any other backend configured.The two included backends would also be useful to those who wish to write their own backend interfaces.icalclirequires the calendar to be presented to it as a list oficalendarevents (VEVENT). It is the responsibility of the backend interface to read the actual calendar and create this list of events. It must also perform all the CRUD (Create, Retrieve, Update and Delete) operations on the actual calendar.RequirementsPython(3+)dateutilparsedatetimeicalendarA love for the command line!Optional packagespyetesyncthe python client library forEteSyncif you want to use theEteSyncbackend.InstallationInstall from PyPIpipinstallicalcliInstall from sourcegitclonehttps://github.com/jrvarma/icalcli.gitcdicalcli
pythonsetup.pyinstallUsageCommand line argumentsicalcliprovides a series of subcommands with the following functionality:edit (e)               edit calendar events
agenda (g)             get an agenda for a time period
calw (w)               get a week-based agenda in calendar format
calm (m)               get a month agenda in calendar format
add (a)                add a detailed event to the calendar
search (s)             (regex) search for events 
sync (y)               sync the backend calendar
quit (q)               quit icalcliBy default,icalcliruns interactively as an REPL (Read Evaluate Print Loop). Runicalcli --helpfor more details.icalcli <subcommand> --helpgives help on each subcommand.Configuration ScriptIn the beginning,icalcliexecutes a configuration script which is expected to create the objectbackend_interfacerepresenting the backend interface initialized with the right authentication credentials to access the backend calendar. The configuration script is located, by default, at~/.icalcli.py, but this can be changed with the-coption.Example configuration for file_backendfrom icalcli import ICSInterface

backend_interface = ICSInterface("/path/to/ics-file")Example configuration for etesync_backendThis configuration assumes that all the credentials are stored in a plain text (json) file. In practice, you would use a more secure storage (perhaps, theGnome keyring) or just read it from the terminal.from icalcli import EtesyncInterface
import base64
import json

conf_file = '/path/to/json-file'
with open(conf_file, 'r') as fp:
    c = json.load(fp)
backend_interface = EtesyncInterface(
    c['email'], c['userPassword'], c['remoteUrl'],
    c['uid'], c['authToken'],
    base64.decodebytes(c['cipher_key'].encode('ascii')))See theExample codefor getting theuidandauthTokenfor theetesynccalendar.ScreenshotsSome screenshots are available at Github:Agenda and Week ViewsAdding an eventSearching and editing eventsMulti-day eventsMonth View