View source for PIM Storage
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to PIM Storage.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Return to PIM Storage.
PIM storage describes a means of storing data in an extensible and cross-referencable way.
(TBD)
Possible solutions:
This Import/Export can be realized by syncing an ics Calendar File (e.g. std.ics from Kontact-KDE, ...) by parsing this ICS-file (ICAL) and import the to the PIM-Storage on OpenMoko device. Make sure you have sqlite3 client installed
opkg install sqlite3
The PIM database file on the OpenMoko device is located at
/home/root/Applications/Qtopia/qtopia_db.sqlite
You can handle the file with sqlite (see Import Vcf Contacts):
sqlite3 ~/Applications/Qtopia/qtopia_db.sqlite
For parsing the ics-File (iCal) on the OpenMoko device you need to install Perl
opkg install perl
Remark: The following desciption shows a possbible additional concept for PIM storage for import/export by application of OpenSource perl libraries that can be used to realized the concept.
Lets name the perl scripts ics2qtcal.pl and qtcal2ics.pl.
For parsing the ICS-file there are several CPAN perl libraries available
After parsing a file with SQL-Commands can be generated for the ics input file of that are used by sqlite3 to import the dates in the qtopia PIM storage ics2qtcal.pl. In a first step of realisation of ics2qtcal.pl the old qtopia-db can be backuped and a full import of.
When all scripts are in place generate an icon in /usr/share/application that call and rsync command from to Openmoko device to copy the kontact-KDE ics-file parse it and copy it to the qtopia database.
#!/usr/bin/sh cd ~/Applications/Qtopia rsync -avz -e ssh user@192.168.0.200:/home/myhome/.kde/share/apps/korganizer/std.ics std.ics mv qtopia_db.sqlite qtopia_db.sqlite.backup perl /path_to_the_script/ics2qtcal.pl std.ics qtopia_db.sqlite
192.168.0.200 is the IP of the desktop computer. It can be replaced by any IP you have your home directory with the ICS file. You need to enter a password so far. Automate this process see http://troy.jdmz.net/rsync/index.html for using rsync and ssh without authentication.
The perl script can call the sqlite3 and import the calendar data in the sqlite-database. To avoid to have the same events 2 times in the PIM storage the existing OpenMoko database should be exported first via qtcal2ics.pl removing events from the SQL imput that already exist in the SQL database. Records that have changed should be updated via SQL commands.
.... mv qtopia_db.sqlite qtopia_db.sqlite.backup perl /path_to_the_script/qtcal2ics.pl qtopia_db.sqlite qtopia.ics perl /path_to_the_script/ics2qtcal.pl std.ics qtopia_db.sqlite qtopia.ics
Remark: The perl scripts mentioned above are not programmed yet (19.01.2009), they show a solution for syncing. The development of the perl scripts ics2qtcal.pl and qtcal2ics.pl mentioned above can be helpful in converting ical formats to and from the OpenMoko device anyway.