![]() |
Quick add new task to Calendar?
Is there any way of accessing the calendar from the command line? E.g. I would like to write add a calendar quick add widget that does the follows:
1. Pops up a small entry widget in which I would type something like: Lunch with Ron next Wednesday at 12:00 2. A freetext format parses would convert this into an ical file. 3. The widget should somehow import the ical file into the calendar db. The question is how to do step number 3? |
Re: Quick add new task to Calendar?
Quote:
http://maemo.org/api_refs/5.0/5.0-fi...4d8d5b8d043570 But if you do so, you can just skip step 2 and 3 and use the API for adding a new task. Feel free to ask me if you have any questions. I used the calendar API in my calendar-home-widget and my scout application. Nicolai |
Re: Quick add new task to Calendar?
This is a little off-topic, Nicolai, but how hard would it be to create a command line app that exports a calendar to ical? I know there is an option in the UI for this, but I would like to automatically push some of my calendars to my personal "cloud" using scheduled tasks. I don't know C++ nor QT (I'm a java guy) but I'd like to learn. Would this API be something easy enough to use to do what I have described. Any high level steps to get started? There is a ton of documentation floating out there on how to develop on Maemo and getting started seems difficult.
|
Re: Quick add new task to Calendar?
@jackburton
Yes, this should be easy. Setting up the scratchbox development envrionment is much more difficult than writing this app. I don't know the qtmobility api for the calendar. But installing QtCreator and making a simple commandline application should be easy. The calendar-backend uses C++ as well, so it is easier to use this from Qt code than for a gtk+ application for example. nicolai |
Re: Quick add new task to Calendar?
@Nicolai
Thanks for the input. So I should be able to do this with QtCreator then? I'll check that out first. Also, kudos for the Calendar Home Widget. |
Re: Quick add new task to Calendar?
@nicolai
The link you pointed me at imports ICS data. Do you have a link to this format, or did you suggest that I use non-file methods of the API? Is it the same fromat as the VCARD file format mentioned in: http://en.wikipedia.org/wiki/ICalendar ? Regarding your programs scout and calendar-home-widget, are the sources available for reference? Quote:
|
Re: Quick add new task to Calendar?
Quote:
create and insert new entries. Quote:
regards Nicolai |
Re: Quick add new task to Calendar?
|
Re: Quick add new task to Calendar?
And the bruteforce methode :)
Quote:
|
Re: Quick add new task to Calendar?
@ Khertan
Now we're talking. :) Does the calendar application poll its database or is it necessary to bump it somehow to make it reread the file when it changes after inserting changes through sqlite3? Btw, I assume that you meant ~/.calendar/calendardb . |
Re: Quick add new task to Calendar?
Quote:
but it is also listening for dbus-signals send by the calendar-backand. Maybe you can send this signals manually. nicolai |
Re: Quick add new task to Calendar?
Hi all.
I can confirm that writing entries directly into ~user/.calendar/calendardb works fine. I have just bought an n900 and wanted to import the datebook from my old Palm Pilot into my new toy. I wrote a Perl script to parse dumps from the Palm and generate SQL statements to run against the database and now have a nicely populated calendar. I didn't need to restart or signal anything. Thanks to Khertan for the suggestion. :) Cheers. Garrick. |
Re: Quick add new task to Calendar?
Quote:
I've been looking for the same functionality for a long time, esp. setting an appointment+alarm from the command line. I don't know why it has to be so difficult! Based on Khertan's response and this thread I was able to make a simple utility to add appointments from command line. Never tried to directly modify the sqlitedb. The source and binary is on github. Binary works for me but otherwise the single file should be buildable if you have the dependencies. See main.cpp for arguments. e.g. Code:
setcalendar --start "2011-01-11 10:20:00" --end "2011-01-11 10:20:00" --name "make phonecall" --desc "whatever description" --loc "some location" --alarm "5min"Forgot to add, by default it looks for a calendar named "Org-calendar". Didn't try to see what happens if you don't have it. You can change it though. |
Re: Quick add new task to Calendar?
Quote:
I have finally gotten around to trying out some C++ and Maemo Dev. My first task is to try to work with the calendar api has you have mentioned. I downloaded the Nokia Qt SDK, which comes with Qt Creator and other things. I loaded up the sample calendar application referenced in this thread by Khertan that is hosted at the Nokia dev forum. http://wiki.forum.nokia.com/index.ph...lendar_example I load the project into the Qt Creator, but it cannot resolve the headers for the calendar api. This includes the CCalendar.h, CMulticalendar.h, CEvent.h, etc. files where the api is defined. Does the Nokia Qt SDK come with the full dev API or am I going to have to use the Maemo SDK itself for this? Thanks! |
Re: Quick add new task to Calendar?
Hm, it does work for me.
I just downloaded the example from http://wiki.forum.nokia.com/index.ph...lendar_example and opened the .pro file with qt creator. No compilation errors the project build fine. If you made your own project, be sure you have this line in your .pro file: PKGCONFIG += calendar-backend Nicolai |
Re: Quick add new task to Calendar?
Thanks! Not sure why it wasn't working. A reboot seems to have fixed it.
|
Re: Quick add new task to Calendar?
Quote:
I finally got my app to work and build in scratchbox. The .deb also installs and works fine on my N900 itself. I uploaded it to Extras-Devel, but the autobuilder fails saying Code:
cd builddir && qmake-qt4 PREFIX=/usr ../maecaltool.proAny thoughts? Thanks so much. |
Re: Quick add new task to Calendar?
Nevermind. I got it!
I added calendar-backend-dev to the debian control file under Build-Depends. It now reads Code:
Build-Depends: debhelper (>= 5), libqt4-dev, calendar-backend-dev |
| All times are GMT. The time now is 11:23. |
vBulletin® Version 3.8.8