Active Topics

 


Reply
Thread Tools
Posts: 197 | Thanked: 101 times | Joined on Dec 2009 @ Netherlands
#11
here is some calendar and other apps apis:

http://wiki.maemo.org/Documentation/...scover_Maemo_5

I also like to have a small cli app to add/update/remove calendar events.
(e.g. to create a simple cli tool to add easter dates for several years to the calendar)

Last edited by mirakels; 2010-03-09 at 12:14.
 

The Following User Says Thank You to mirakels For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#12
/usr/bin/calendarclt ( to view/add/modify )

make sure you dont run this as another user(example as root )
I think it resets your calendar on the phone.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Posts: 74 | Thanked: 5 times | Joined on Mar 2010 @ torino - italia
#13
Originally Posted by mirakels View Post
...create a simple cli tool to add ...
Can you show us some code rows to understand how to write something useful for our needings?

I wrote something simple in Python
and tons of string in max script but it works in another world...
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#14
Originally Posted by davide View Post
Can you show us some code rows to understand how to write something useful for our needings?
adding a new calendar

Code:
  multiCalendar->addCalendar (calendarName.toStdString(), COLOUR_YELLOW,
        0, 1, type /*Local calendar*/,
        "Default" /*CalendarTune*/,
        "0.1" /*CalendarVersion*/, errorCode);
thats how you could create an event and add an alarm 15 minutes before starttime to a calender

Code:
CCalendar *calendar = multiCalendar->getCalendarByName (calendarName.toStdString(), errorCode);
	CEvent *pEvent = new CEvent(title.toStdString(), description.toStdString(), "", sdateUtc, edateUtc);
	CAlarm *alarmEvent = new CAlarm();
	alarmEvent->setDuration(E_AM_15MIN);
	alarmEvent->setTrigger(sdateUtc - 15 * 60);

	pEvent->setAlarm(alarmEvent);
       multiCalendar->addEvent(pEvent, calendar->getCalendarId(), errorCode);
thats how you can delete a calendar

Code:
CCalendar *calendar = multiCalendar->getCalendarByName (calendarName.toStdString(), errorCode);
    if (errorCode)
    {
        success = multiCalendar->deleteCalendar (calendar->getCalendarId(), errorCode);
    }
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following 5 Users Say Thank You to krk969 For This Useful Post:
Posts: 74 | Thanked: 5 times | Joined on Mar 2010 @ torino - italia
#15
I guess this code need headers. Do you save it in a file and then type this file in CLI to launch it?
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#16
Originally Posted by davide View Post
I guess this code need headers. Do you save it in a file and then type this file in CLI to launch it?
its not something you can add to a file and type the file in CLI.
it needs to be compiled with the headers from here.
Not sure if there are any python bindings with which you could do the same and "type the file" in the CLI

If you want to try something quick in the CLI check post#12.
However I havent played with it myself.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following User Says Thank You to krk969 For This Useful Post:
Posts: 74 | Thanked: 5 times | Joined on Mar 2010 @ torino - italia
#17
I need some days on a good book. thanks, see you.
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:51.