Editing Calendar database

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
The [[Open development/Maemo roadmap/Fremantle|Maemo 5]] calendar database can be found in <code>/home/user/.calendar/calendardb</code>. The goal of this article is to provide enough information on the calendar database in order to implement mass modifying/adding/deleting events verifying some criterias (string match in title, locations, comments for example). It could be easy then to write a small shell script using zenity and sqlite3 to perform this tasks.
+
The calendar database can be found in /home/user/.calendar/calendardb. The goal of this wiki is to provide enough information on the calendar database in order to implement mass modifying/adding/deleting events verifying some criterias (string match in title, locations, comments for example). It could be easy then to write a small shell script using zenity and sqlite3 to perform this tasks.
-
If you want to help editing this article and writing useful informations on fields or new scripts, feel free to copy your own database on your computer and analyze it with some tools like "SQLite Database Browser" (Linux/Debian). The datatypes are those listed in the [http://www.sqlite.org/datatype3.html SQLite documentation].
+
If you want to help editing this wiki and writing useful informations on fields or new scripts, feel free to copy your own database on your computer and analyze it with some tools like "SQLite Database Browser" (Linux/Debian).
-
__NOEDITSECTION__<!-- removes section edit links as they look quite ugly on this page. -ashley on 8 June 2013 -->
+
-
== [[#toc|Structure]] ==
+
-
=== [[#toc|Tables & fields]] ===
+
-
==== [[#toc|ALARM]] ====
+
= Scripts =
-
===== Id =====
+
= Structure =
-
===== Trigger =====
+
== Tables & fields ==
-
===== Repeat =====
+
-
===== Duration =====
+
-
===== Action =====
+
-
===== CookieId =====
+
-
===== Attach =====
+
-
==== [[#toc|Birthdays]] ====
+
=== ALARM ===
 +
==== Id ====
 +
==== Trigger ====
 +
==== Repeat ====
 +
==== Duration ====
 +
==== Action ====
 +
==== CookieId ====
 +
==== Attach ====
-
{| class="wikitable"
+
=== Birthdays ===
-
|+ Birthdays table
+
==== Id ====
 +
==== DayMonth ====
 +
==== Year ====
 +
 
 +
=== Calendars ===
 +
==== CalendarId ====
 +
==== Name ====
 +
==== Colour ====
 +
:{| class="wikitable"
|-
|-
-
! Field !! Type !! Description
+
| 0 || Dark Blue
|-
|-
-
| Id || integer || primary key
+
| 1 || Green
|-
|-
-
| DayMonth || integer || Day and month as a combined integer. Calculated as: month*100+day (day with a leading zero). 1102 means November 2
+
| 2 || Dark Pink
|-
|-
-
| Year || integer || Year as a number.
+
| 3 || Orange
 +
|-
 +
| 4 || Purple
 +
|-
 +
| 5 || Yellow
 +
|-
 +
| 6 || White
 +
|-
 +
| 7 || Light Blue
 +
|-
 +
| 8 || Light Pink
 +
|-
 +
| 9 || Yellow-Green
|}
|}
-
==== [[#toc|Calendars]] ====
+
==== IsVisible ====
-
 
+
:{| class="wikitable"
-
{| class="wikitable"
+
-
|+ Calendars table
+
|-
|-
-
! Field !! Type !! Description
+
| 0 || not visible
|-
|-
-
| CalendarId || integer || primary key
+
| 1 || visible
|-
|-
-
| Name || text || name of the calendar
+
|}
 +
 
 +
==== IsReadonly ====
 +
:{| class="wikitable"
|-
|-
-
| Colour || integer || 0 = dark blue, 1 = green, 2 = dark pink, 3 = orange, 4 = purple, 5 = yellow, 6 = white, 7 = light blue, 8 = light pink, 9 = yellow-green
+
| 0 || writeable
|-
|-
-
| isVisible || integer || 0 = not visible, 1 = visible
+
| 1 || not writeable
|-
|-
-
| isReadonly || integer || 0 = writeable, 1 = not writeable
+
|}
 +
 
 +
==== CalendarType ====
 +
:{| class="wikitable"
 +
|-
 +
| 0 || local
 +
|-
 +
| 1 || intelligent
|-
|-
-
| CalendarType || integer || 0 = local, 1 = intelligent, 2 = ?, 3 = private, 4 = synchronized
+
| 2 ||  
|-
|-
-
| CalendarTune || text || Path to the calendar alarm sound. Default path: <code>/usr/share/sounds/ui-calendar_alarm_default.aac</code>
+
| 3 || private
|-
|-
-
| CalendarVersion || ||
+
| 4 || synchronized
|-
|-
-
| CalendarProfile || ||
 
|}
|}
-
==== [[#toc|ComponentDetails]] ====
+
==== CalendarTune ====
 +
==== CalendarVersion ====
 +
==== CalendarProfile ====
-
===== Id =====
+
=== ComponentDetails ===
-
===== ComponentType =====
+
==== Id ====
-
===== Class =====
+
==== ComponentType ====
-
===== Geo =====
+
==== Class ====
-
===== Priority =====
+
==== Geo ====
-
===== DateStamp =====
+
==== Priority ====
-
===== Sequence =====
+
==== DateStamp ====
-
===== Transparency =====
+
==== Sequence ====
-
===== Uid =====
+
==== Transparency ====
-
===== Url =====
+
==== Uid ====
-
===== Attach =====
+
==== Url ====
-
===== Category =====
+
==== Attach ====
-
===== Comment =====
+
==== Category ====
-
===== Contact =====
+
==== Comment ====
-
===== Related =====
+
==== Contact ====
-
===== Resources =====
+
==== Related ====
-
===== Percent =====
+
==== Resources ====
-
===== Completed =====
+
==== Percent ====
 +
==== Completed ====
-
==== [[#toc|Components]] ====
+
=== Components ===
 +
==== Id ====
 +
==== CalendarId ====
 +
==== ComponentType ====
 +
:{| class="wikitable"
 +
|-
 +
| 1 || event
 +
|-
 +
| 2 || task
 +
|-
 +
| 3 || note
 +
|-
 +
| 4 || birthday
 +
|-
 +
|}
-
{| class="wikitable"
+
==== Flags ====
-
|+ Components table
+
==== DateStart ====
 +
:{| class="wikitable"
|-
|-
-
! Field !! Type !! Description
+
| <INTEGER> || start date in Unix Time Format (number of seconds since 01/01/1970)
|-
|-
-
| Id || integer || primary key
+
|}
 +
 
 +
==== DateEnd ====
 +
:{| class="wikitable"
|-
|-
-
| CalendarId || integer || association with the corresponding [[#Calendar|calender]]
+
| -1 || undefined
|-
|-
-
| ComponentType || integer || 1 = event, 2 = task, 3 = note, 4 = birthday
+
| <INTEGER> || end date in Unix Time Format (number of seconds since 01/01/1970)
|-
|-
-
| Flags || integer || 3 = has recursive entry, 4 = has alarm, 5 = has both
+
|}
 +
 
 +
==== Summary ====
 +
:{| class="wikitable"
|-
|-
-
| DateStart || integer || UTC start date in Unix Time Format (number of seconds since 01/01/1970)
+
| <TEXT> || title
|-
|-
-
| DateEnd || integer || -1 = undefined, otherwise UTC end date in Unix Time Format (number of seconds since 01/01/1970)
+
|}
 +
 
 +
==== Location ====
 +
:{| class="wikitable"
|-
|-
-
| Summary || text || title [event, task, note, birthday]
+
| <TEXT> || location
|-
|-
-
| Location || text || location [event]
+
|}
 +
 
 +
==== Description ====
 +
:{| class="wikitable"
|-
|-
-
| Description || text || comments [event, task, note]
+
| <TEXT> || comments
|-
|-
-
| Status || integer || -1 = undefined [event, note]. 0 = incomplete [task], 1 = complete [task], yyyy = year [birthday]
+
|}
 +
 
 +
==== Status ====
 +
:{| class="wikitable"
|-
|-
-
| Uid || ||
+
| -1 || undefined (for events and notes)
|-
|-
-
| Until || integer || -1 = none [event, tastk, note], 2145913199 = end of calendar / limit of the Unix Time Format, other integer = end date of a recurrence [event, birthday]
+
| 0 || task uncomplete
|-
|-
-
| AllDay || integer || 0 = in limited time [event, task, note], 1 = all day [event, birthday]
+
| 1 || task complete
|-
|-
-
| CreatedTime || integer || date of creation
+
| <YYYY> || year (for birthdays)
|-
|-
-
| ModifiedTime || integer || last date of modification
+
|}
 +
 
 +
==== Uid ====
 +
==== Until ====
 +
:{| class="wikitable"
|-
|-
-
| Tzid || text || time zone identifier, for example "<code>Europe/Paris</code>"
+
| -1 || until the end
 +
|-
 +
| <INTEGER> || end date of a recurring event
|-
|-
-
| TzOffset || text || time zone offset in seconds compared to UTC, for example "<code>7200</code>" (2 hours)
 
|}
|}
-
==== [[#toc|IDMAP]] ====
+
==== AllDay ====
-
 
+
:{| class="wikitable"
-
===== LocalId =====
+
|-
-
===== ExternalId =====
+
| 0 || limited time event
-
 
+
|-
-
==== [[#toc|Instances]] ====
+
| 1 || allday event
-
 
+
|-
-
===== Id =====
+
|}
-
===== DateStart =====
+
-
===== DateEnd =====
+
-
 
+
-
==== [[#toc|Parameters]] ====
+
-
 
+
-
===== ComponentId =====
+
-
===== PropertyType =====
+
-
===== PropertyValue =====
+
-
===== ParamName =====
+
-
===== ParamValue =====
+
-
 
+
-
==== [[#toc|RECURSIVE]] ====
+
-
 
+
-
===== Id =====
+
-
===== Rrule =====
+
-
===== Rdates =====
+
-
===== Exdates =====
+
-
===== Exrule =====
+
-
===== RecurrenceId =====
+
-
===== Rtype =====
+
-
==== [[#toc|TIMEZONE]] ====
+
==== CreatedTime ====
 +
==== ModifiedTime ====
 +
==== Tzid ====
 +
==== TzOffset ====
-
===== Location =====
+
=== IDMAP ===
-
===== Tzid =====
+
==== LocalId ====
-
===== DtStartStd =====
+
==== ExternalId ====
-
===== DtStartDst =====
+
-
===== TzOffsetStd =====
+
-
===== TzOffsetDst =====
+
-
===== RRuleStd =====
+
-
===== RRuleDst =====
+
-
===== TzName =====
+
-
===== DSTFlag =====
+
 +
=== Instances ===
 +
==== Id ====
 +
==== DateStart ====
 +
==== DateEnd ====
-
==== [[#toc|Trash]] ====
+
=== Parameters ===
 +
==== ComponentId ====
 +
==== PropertyType ====
 +
==== PropertyValue ====
 +
==== ParamName ====
 +
==== ParamValue ====
-
===== ComponentId =====
+
=== RECURSIVE ===
-
===== CalendarId =====
+
==== Id ====
-
===== ComponentType =====
+
==== Rrule ====
-
===== DeletedTime =====
+
==== Rdates ====
-
===== CreatedTime =====
+
==== Exdates ====
 +
==== Exrule ====
 +
==== RecurrenceId ====
 +
==== Rtype ====
-
==== [[#toc|XProperties]] ====
+
=== TIMEZONE ===
 +
==== Location ====
 +
==== Tzid ====
 +
==== DtStartStd ====
 +
==== DtStartDst ====
 +
==== TzOffsetStd ====
 +
==== TzOffsetDst ====
 +
==== RRuleStd ====
 +
==== RRuleDst ====
 +
==== TzName ====
 +
==== DSTFlag ====
-
===== ComponentId =====
+
=== Trash ===
-
===== XPropertyName =====
+
==== ComponentId ====
-
===== XPropertyValue =====
+
==== CalendarId ====
 +
==== ComponentType ====
 +
==== DeletedTime ====
 +
==== CreatedTime ====
-
==== [[#toc|sqlite_sequence]] ====
+
=== XProperties ===
 +
==== ComponentId ====
 +
==== XPropertyName ====
 +
==== XPropertyValue ====
-
===== name =====
+
=== sqlite_sequence ===
-
===== seq =====
+
==== name ====
 +
==== seq ====
-
=== [[#toc|Indices]] ===
 
-
==== IDX_ALARM ====
 
-
==== IDX_BIRTHDAYS_DATE ====
 
-
==== IDX_BIRTHDAYS_IDS ====
 
-
==== IDX_CALENDAR ====
 
-
==== IDX_COMPONENT ====
 
-
==== IDX_DETAILS ====
 
-
==== IDX_INST ====
 
-
==== IDX_RECURSIVE ====
 
-
==== IDX_TIMEZONE ====
 
-
==== IDX_TRASH ====
 
-
[[Category:Fremantle]]
+
== Indices ==
 +
=== IDX_ALARM ===
 +
=== IDX_BIRTHDAYS_DATE ===
 +
=== IDX_BIRTHDAYS_IDS ===
 +
=== IDX_CALENDAR ===
 +
=== IDX_COMPONENT ===
 +
=== IDX_DETAILS ===
 +
=== IDX_INST ===
 +
=== IDX_RECURSIVE ===
 +
=== IDX_TIMEZONE ===
 +
=== IDX_TRASH ===
[[Category:Calendar]]
[[Category:Calendar]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)