12

I want to be able to access the Evolution calendar from the command line. Specifically, I'd like to be able to:

  1. List calendar events (the one-line summary, date and time is enough)
    1. Upcoming events starting today
    2. Events on a specific date
  2. Add an event on a specific date

How can I do that? Is it possible?

Google was distinctly unhelpful in this case. I'm running Evolution 3.4.4. Using additional software packages that talk to the Evolution server is perfectly fine.

9
  • what is your calendar server type ? it's very unlikely that evolution allow such a thing or maybe by reading it's files
    – Kiwy
    Commented Feb 14, 2014 at 14:47
  • @Kiwy I have no idea. How do I find out? I just installed Debian's evolution package plus dependencies (including evolution-data-server) and created a couple of calendars in the Evolution GUI. The only thing I can say reasonably for sure is that they are not "web" calendars of any kind. I think they are termed "local" or something like that, but am not in front of that system to check.
    – user
    Commented Feb 14, 2014 at 14:51
  • You can also refer to developer.gnome.org/platform-overview/stable/tech-eds.html.en whoch sound like the exact thing you need to handle your calendar
    – Kiwy
    Commented Feb 14, 2014 at 15:03
  • @Kiwy Um, what's pointed at by those links looks like API documentation to me. Is there anything in particular there that you have in mind which might help me, or are you saying I have to roll my own?
    – user
    Commented Feb 14, 2014 at 15:04
  • derbian eshell was a shot, but not the right one.
    – Kiwy
    Commented Feb 14, 2014 at 15:05

2 Answers 2

1

As said in another answer, syncevolution.

Here is an example: assuming you have an email in your Evolution mail client, this example will export the calendar events

ACCOUNT='[email protected]'
ACCOUNT_ID=`syncevolution --print-databases | grep $ACCOUNT | awk '{print($2)}' | sed 's/[\(|\)]//g'`
syncevolution --export - backend=evolution-calendar database=$ACCOUNT_ID

Then you can parse the output.

Some notes about the script:

  • I sent the output to STDOUT with --export. You can send straight to a file, etc.
  • There is no need to programmatically get the account id, just use the print-databases command to select whatever account id you need and then export it.
0

The answer to your question is SyncEvolutiuon. The documentation for the Command Line usage is on the website

SyncEvolution synchronizes personal information management (PIM) data via various protocols (SyncML, CalDAV/CardDAV, ActiveSync). It syncs contacts, appointments, tasks and memos. It syncs to web services or to SyncML-capable phones via Bluetooth.

You can then use this to access your Evolution Calendar by getting the information sync to CalDAV. Good blog on this is Degooglifying Part IV

The best thing is that you can use this to sync your calendar to many devices or just so you can bang on CalDAV with any script.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .