Notices


Reply
Thread Tools
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#11
Originally Posted by dov View Post
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?
The calendar application rereads the database everytime on startup,
but it is also listening for dbus-signals send by the calendar-backand.
Maybe you can send this signals manually.

nicolai
 
Posts: 1 | Thanked: 0 times | Joined on Jan 2011 @ The Gdansk of Oxfordshire
#12
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.
 
Posts: 1 | Thanked: 1 time | Joined on Jan 2011
#13
Originally Posted by dov View Post
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?
Hi dov,

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"
It's a crappy program and will probably crash if you don't give all the arguments like above or if you use --name "make phonecall!" (because of exclamation mark), but good enough for me to call from org-mode

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.
 

The Following User Says Thank You to kingdomnebaneba For This Useful Post:
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#14
Originally Posted by nicolai View Post
@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
Hi Nicolai.

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!
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#15
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
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#16
Thanks! Not sure why it wasn't working. A reboot seems to have fixed it.
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#17
Originally Posted by nicolai View Post
If you made your own project, be sure you have this
line in your .pro file:
PKGCONFIG += calendar-backend

Nicolai
Hi Nicolai,

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.pro
Package calendar-backend was not found in the pkg-config search path.
Perhaps you should add the directory containing `calendar-backend.pc'
to the PKG_CONFIG_PATH environment variable
No package 'calendar-backend' found
https://garage.maemo.org/builder/fre...log.FAILED.txt

Any thoughts?

Thanks so much.
 
Posts: 466 | Thanked: 661 times | Joined on Jan 2009
#18
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
Finally. I have finished my first C++ app ever. Simple, but fun.
 

The Following 2 Users Say Thank You to jackburton For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 09:09.