GSOC 2014: Akonadi Commandline Client’s Current Status

Hey everyone!

GSoC 2014 just ended (today was the firm pencils down date) and I thought it would be great to blog about the current status of my project.

AkonadiClient is an application that allows power users and system administrators to manage Akonadi from the command line.

As per my proposal I had to improve upon and add commands to the already existing prototype of the client (developed by my mentors Kevin Krammer and Jonathan Marten).

I recently finished adding documentation (man pages) to the project and also finished improving upon the add command and it’s test cases. And I beleive this completes all the tasks that I had planned for in my GSoC proposal.Features of AkonadiClient

For those who are interested, following are the commands that are supported by AkonadiClient after this summers work (short description included):

  • add – Add an item to a collection
  • list – List collections
  • rename - Rename collections
  • move – Move a collection
  • copy – Copy a collection
  • create - Create new collections
  • delete - Delete an item or a collection
  • show - Shows the raw payload of an item
  • update – Update an items payload
  • edit Open an item’s payload in $EDITOR for editing
  • agents - Manage running Akonadi agents
  • export – Export a collection to XML
  • importImport a collection from XML
  • expand - Expands a contact group item
  • info – Display information about a collection or an item
  • tags - List all known tags

In addition to these commands a command shell / interpreter has also been created by me which is invoked when no arguments are passed to the akonadiclient. It can be used to run multiple commands without launching a separate instance of the application.

Future Plans

I would love to continue working on the project and add bug fixes and or enhancements (and more thorough test cases :)). I would also love to work on other parts of KDE  like other PIM applications and Plasma.

Shoutouts

I would like to thank my mentors Jonathan Marten and Kevin Krammer  for their support and guidance and I really appreciate the time and effort you put into reviewing my patches Kevin, I’ve learnt a lot working on this project with you (especially the need for properly formatted code :)) and thanks Jonathan for the invaluable suggestions that you gave at the start of the project and the implementation of the tags command :)

I would also like to thank Daniel Vrátil (KDE PIM) for suggesting the proper way to test akonadiclient using Akonadi’s isolated testing environment, Luigi Toscano (Documentation Team) for pointing me in the right direction pertaining to KDE’s standard way of writing man pages and Yuri Chornoivan (Documentation Team)  for reviewing the documentation that I’ve written for the project, much appreciated guys!

This has been a really fun summer! Now, I can finally go and get a full nights sleep :D

Cheers,

Bhaskar Kandiyal

  • Bugzy

    Great work. Congratulations of finishing this phase of the work on the cli client and completing GSOC. I think I understand the management of akonadi resources only generally and it will be very helpful if you can give an example of using the client to manage a resource. For instance, can it replace something like konsolekalendar (https://userbase.kde.org/KonsoleKalendar). If so, how would I input a calander event, task, or journal entry?

    • http://kbhaskar.in/ Bhaskar Kandiyal

      Thanks :)

      It’s not a complete replacement for KonsoleKalendar as AkonadiClient provides a generic / low-level way to manage resources and KonsoleKalendar is very much resource-specific. It will require an extra step to, say add a calendar event or a journal entry.

      I’ll give the most basic example of adding a note in KJots:

      1. Create a file with the contents of your note (eg: note.txt). This will act as a ‘payload’ for the item you’re going to add. So you should be aware of the format that KJots uses for the payload of it’s items.

      2. akonadiclient add “/Local Notes” note.txt – Where “/Local Notes” is the collection where KJots stores it’s data.

      It’s a similar process for adding a calendar event etc. Since akonadiclient is a low-level application it requires you to be more aware of the collections / payload format for the resource that you’re trying to modify.

      I hope this made things clear, I might make another blog post about the ways to use akonadiclient in the future :)

      Cheers,
      Bhaskar Kandiyal

      • Bugzy

        That helps. Thanks