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 [[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.
-
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 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).
-
__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 ==
 +
== Structure ==
 +
=== Tables & fields ===
 +
 +
==== ALARM ====
===== Id =====
===== Id =====
===== Trigger =====
===== Trigger =====
Line 16: Line 17:
===== Attach =====
===== Attach =====
-
==== [[#toc|Birthdays]] ====
+
==== Birthdays ====
 +
===== Id =====
 +
===== DayMonth =====
 +
===== Year =====
-
{| class="wikitable"
+
==== Calendars ====
-
|+ Birthdays table
+
===== 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"
 +
|-
 +
| 0 || not visible
 +
|-
 +
| 1 || visible
 +
|-
 +
|}
-
{| class="wikitable"
+
===== IsReadonly =====
-
|+ Calendars table
+
:{| class="wikitable"
|-
|-
-
! Field !! Type !! Description
+
| 0 || writeable
|-
|-
-
| CalendarId || integer || primary key
+
| 1 || not writeable
|-
|-
-
| Name || text || name of the calendar
+
|}
 +
 
 +
===== CalendarType =====
 +
:{| 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 || local
|-
|-
-
| isVisible || integer || 0 = not visible, 1 = visible
+
| 1 || intelligent
|-
|-
-
| isReadonly || integer || 0 = writeable, 1 = not writeable
+
| 2 ||  
|-
|-
-
| CalendarType || integer || 0 = local, 1 = intelligent, 2 = ?, 3 = private, 4 = synchronized
+
| 3 || private
 +
|-
 +
| 4 || synchronized
 +
|-
 +
|}
 +
 
 +
===== CalendarTune =====
 +
:{| class="wikitable"
|-
|-
-
| CalendarTune || text || Path to the calendar alarm sound. Default path: <code>/usr/share/sounds/ui-calendar_alarm_default.aac</code>
+
| <txt> || path to the calendar alarm sound
|-
|-
-
| CalendarVersion || ||
+
| <code>/usr/share/sounds/ui-calendar_alarm_default.aac</code> || default alarm
|-
|-
-
| CalendarProfile || ||
 
|}
|}
-
==== [[#toc|ComponentDetails]] ====
+
===== CalendarVersion =====
 +
===== CalendarProfile =====
 +
==== ComponentDetails ====
===== Id =====
===== Id =====
===== ComponentType =====
===== ComponentType =====
Line 77: Line 114:
===== Completed =====
===== 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
+
| <int> || UTC 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
+
| <int> || UTC 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)
+
| <txt> || title [event, task, note, birthday]
|-
|-
-
| 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]
+
| <txt> || location [event]
|-
|-
-
| Location || text || location [event]
+
|}
 +
 
 +
===== Description =====
 +
:{| class="wikitable"
|-
|-
-
| Description || text || comments [event, task, note]
+
| <txt> || comments [event, task, note]
|-
|-
-
| Status || integer || -1 = undefined [event, note]. 0 = incomplete [task], 1 = complete [task], yyyy = year [birthday]
+
|}
 +
 
 +
===== Status =====
 +
:{| class="wikitable"
|-
|-
-
| Uid || ||
+
| -1 || undefined [event, note]
|-
|-
-
| 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 || uncomplete [task]
|-
|-
-
| AllDay || integer || 0 = in limited time [event, task, note], 1 = all day [event, birthday]
+
| 1 || complete [task]
|-
|-
-
| CreatedTime || integer || date of creation
+
| <yyyy> || year [birthday]
|-
|-
-
| ModifiedTime || integer || last date of modification
+
|}
 +
 
 +
===== Uid =====
 +
===== Until =====
 +
:{| class="wikitable"
|-
|-
-
| Tzid || text || time zone identifier, for example "<code>Europe/Paris</code>"
+
| -1 || none [event, task, note]
|-
|-
-
| TzOffset || text || time zone offset in seconds compared to UTC, for example "<code>7200</code>" (2 hours)
+
| <int> || end date of a recurrence [event, birthday]
 +
|-
 +
| 2145913199 || end of calendar / limit of the Unix Time Format
|}
|}
-
==== [[#toc|IDMAP]] ====
+
===== AllDay =====
 +
:{| class="wikitable"
 +
|-
 +
| 0 || in limited time [event, task, note]
 +
|-
 +
| 1 || all day [event, birthday]
 +
|-
 +
|}
 +
===== CreatedTime =====
 +
:{| class="wikitable"
 +
|-
 +
| <int> || date of creation
 +
|-
 +
|}
 +
 +
===== ModifiedTime =====
 +
:{| class="wikitable"
 +
|-
 +
| <int> || last date of modification
 +
|-
 +
|}
 +
 +
===== Tzid =====
 +
:{| class="wikitable"
 +
|-
 +
| <txt> || time zone identifier
 +
|-
 +
| :Europe/Paris || France time zone
 +
|-
 +
|}
 +
 +
===== TzOffset =====
 +
:{| class="wikitable"
 +
|-
 +
| <txt> || time zone offset in seconds compared to UTC
 +
|-
 +
| 7200 || France time zone offset (2 hours)
 +
|-
 +
|}
 +
 +
==== IDMAP ====
===== LocalId =====
===== LocalId =====
===== ExternalId =====
===== ExternalId =====
-
==== [[#toc|Instances]] ====
+
==== Instances ====
-
 
+
===== Id =====
===== Id =====
===== DateStart =====
===== DateStart =====
===== DateEnd =====
===== DateEnd =====
-
==== [[#toc|Parameters]] ====
+
==== Parameters ====
-
 
+
===== ComponentId =====
===== ComponentId =====
===== PropertyType =====
===== PropertyType =====
Line 138: Line 249:
===== ParamValue =====
===== ParamValue =====
-
==== [[#toc|RECURSIVE]] ====
+
==== RECURSIVE ====
-
 
+
===== Id =====
===== Id =====
===== Rrule =====
===== Rrule =====
Line 148: Line 258:
===== Rtype =====
===== Rtype =====
-
==== [[#toc|TIMEZONE]] ====
+
==== TIMEZONE ====
-
 
+
===== Location =====
===== Location =====
===== Tzid =====
===== Tzid =====
Line 161: Line 270:
===== DSTFlag =====
===== DSTFlag =====
-
 
+
==== Trash ====
-
==== [[#toc|Trash]] ====
+
-
 
+
===== ComponentId =====
===== ComponentId =====
===== CalendarId =====
===== CalendarId =====
Line 170: Line 277:
===== CreatedTime =====
===== CreatedTime =====
-
==== [[#toc|XProperties]] ====
+
==== XProperties ====
-
 
+
===== ComponentId =====
===== ComponentId =====
===== XPropertyName =====
===== XPropertyName =====
===== XPropertyValue =====
===== XPropertyValue =====
-
==== [[#toc|sqlite_sequence]] ====
+
==== sqlite_sequence ====
-
 
+
===== name =====
===== name =====
===== seq =====
===== seq =====
-
=== [[#toc|Indices]] ===
+
 
 +
=== Indices ===
==== IDX_ALARM ====
==== IDX_ALARM ====
==== IDX_BIRTHDAYS_DATE ====
==== IDX_BIRTHDAYS_DATE ====

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)