Re: [Om2008.9] How to export Vcf Contacts from FR?
Charles Pax wrote: On Wed, Oct 15, 2008 at 11:00 PM, nickd [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Vasco I've put your contribution up on the wiki. Once step closer to working out the export. Also in the discussion I've asked for thoughts on either moving 'exporting' to a new page or rename the current one. What do you think? -Nick Have you guys considered writing a plugin for Conduit [1]? It looks like Conduit supports Evolution Data Server, which is what (I think) Openmoko uses. 2007.2 used Evolution Data Server, but 2008.9 uses qtopia which stores things in an sqlite database. I'd be pretty happy if I could synchronize my Freerunner with Evolution via Conduit. Maybe some of us should put together a beer of the month club [2] bounty for whoever makes a plugin for conduit. -Charles Pax [1] http://www.conduit-project.org/ [2] http://www.beermonthclub.com/ ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
Matthias Apitz ha scritto: Hello, I've recently moved from a normal cellphone to FR and punched out of the old cellphone all my contacts to a CSV file, converted this to Vcf (which is easy using the KDE application 'kontact' because it supports both formats on import/export); than I've loaded the resulting addr.vcf file into my FR as described in http://wiki.openmoko.org/wiki/Import_Vcf_Contacts so far so good; but how can I export now all these (and new added) contacts to a Vcf file, for example before flashing the rootfs on next update? Some time weeks ago I used an huge workaround, but it worked. Contacts - Options - Send All.. - (in qtopia it let you choose how send them, select by email) - Don't send the message that pop ups, but save it as draft. Now, get the mail with the contacts attached using: cp /home/root/Applications/qtmail/mail/$(ls -t \ /home/root/Applications/qtmail/mail/ | head -n1) /tmp/contacts.eml (it copies the latest modified mail/sms to /tmp/contacts.eml, you can find the needed file also grepping like this: grep vCard describing multiple contacts \ /home/root/Applications/qtmail/mail/* After you got the mail with the contacts attached, copy it on your PC. If you can handle the .eml files with your mail client, just open it and save the attachment. Otherwise open that file with a text editor and decode the base64 encoded text (under MIME-Version: 1.0) using a tool like this [1] (if you don't want to write down few lines of python/php/c...) A little tricky, but it works :) [1] http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/ -- Treviño's World - Life and Linux http://www.3v1n0.net/ ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
Great! Now I know which client to use, let's play!!! :) I've spent 15 minutes reviving my SQL (which I had forgotten for at least 5 years), and this is what I have so far: * sqlite3 /home/root/Applications/Qtopia/qtopia_db.sqlite 'Select distinct nickname, title, firstname, middlename, lastname, suffix, profession, b_webpage, company, office, department, jobtitle, default_email, phone_number, h_webpage, spouse, gender, birthday, anniversary from contacts, contactphonenumbers where contacts.recid=contactphonenumbers.recid;' | sed 's/|/\t/g' addressbook.txt * This creates an addressbook tab-delimited-file with all the fields I thought where important for each contact (some info may be missing, check the columns and tables). Each contact that has more than one phone number will appear multiple times because I haven't yet come up with a clean way to show the join between the contacts and contactphonenumbers tables, so for now it just duplicates the whole line, with the only difference being the phone number. Anyone versed in SQL will be able to hack this into a full VCF file generator... or you can just go the Python way (but I prefer to use the nice tools already in place) :) Your turn! ;) Paul wrote: Hey Vasco, You mean creating VCF's from the sqlite-data in a backup? Would be interesting to play with. I could envision a slq-script that dumps the data into a file and then a bash or python script that puts things in the proper format. That's not too difficult, if sqlite plays nice. I had thought about that too, but I can't find an SQLite client in OM repos to create the necessary script. How can we talk to SQLite on OM without going the full C/C++ and respective libs way? Python maybe?... I found sqlite3 on my desktop pc, which makes things a lot easier. I think that is included on anyone's Linux box these days, and on www.sqlite.com/download there are also precompiled binaries for Mac and Windows. You need sqlite version 3 for the .sqlite files on the FR. I've been playing a bit with it: copied a .sqlite file from the Freerunner to my machine and using sqlite3 I can pull information from it quite easily: echo .tables | sqlite3 qtopia_db.sqlite appointmentcategories contactpresence mimeTypeMapping appointmentcustom contactspimdependencies appointmentexceptions content servicehistory appointmentscontentPropssimcardidmap callhistory currentsimcard simlabelidmap callhistorytimezone databaseProperties sqlsources categories defaultMimeApplication syncServers categoryringtoneemailaddresses taskcategories changelog favoriteservicestaskcustom contactaddressesgoogleidtasks contactcategories locationLookup versioninfo contactcustom mapCategoryToContent contactphonenumbers mimeTypeLookup echo .dump contactphonenumbers | sqlite3 qtopia_db.sqlite BEGIN TRANSACTION; CREATE TABLE contactphonenumbers ( phone_number VARCHAR(100) NOT NULL, recid INTEGER, phone_type INTEGER, FOREIGN KEY(recid) REFERENCES contacts(recid) ); INSERT INTO contactphonenumbers VALUES('04x875',83886113,1); INSERT INTO contactphonenumbers VALUES('07x693',83886209,1); INSERT INTO contactphonenumbers VALUES('+3167678',83886277,257); INSERT INTO contactphonenumbers VALUES('049275',83886193,1); INSERT INTO contactphonenumbers VALUES('118',83886361,1); INSERT INTO contactphonenumbers VALUES('+316244',83886365,1); INSERT INTO contactphonenumbers VALUES('+3162233',83886357,1); CREATE INDEX contactphonenumbersbytype ON contactphonenumbers (phone_type, phone_number); CREATE INDEX contactphonenumbersindex ON contactphonenumbers (recid); CREATE INDEX contactphonenumbersnumbers ON contactphonenumbers (phone_number, recid); CREATE INDEX contactphnenumberscontacts ON contactphonenumbers (recid, phone_number); COMMIT; I can imagine a python script on the desktop/laptop that would read all the dumps, disect all the insert statements, combine the information based on the recid attribute and after pulling all that together, write out Vcards. Note that I am using qtopia. I am not certain if the structure on OM2008.x is identical. If that is the case, I can imagine a config file per distribution, mapping attribute-names to the necessary Vcard entries. (I have a lot of imagination.) You'd then run the python script with a parameter telling it what config/mapping to use. I am sure I can write something like that. I am however not sure how long it would take me, as my order for 36-hour days has still not been fullfilled. *grin* What do you (or anyone) think of this? Paul
Re: [Om2008.9] How to export Vcf Contacts from FR?
Vasco I've put your contribution up on the wiki. Once step closer to working out the export. Also in the discussion I've asked for thoughts on either moving 'exporting' to a new page or rename the current one. What do you think? -Nick Vasco Névoa wrote: Great! Now I know which client to use, let's play!!! :) I've spent 15 minutes reviving my SQL (which I had forgotten for at least 5 years), and this is what I have so far: * sqlite3 /home/root/Applications/Qtopia/qtopia_db.sqlite 'Select distinct nickname, title, firstname, middlename, lastname, suffix, profession, b_webpage, company, office, department, jobtitle, default_email, phone_number, h_webpage, spouse, gender, birthday, anniversary from contacts, contactphonenumbers where contacts.recid=contactphonenumbers.recid;' | sed 's/|/\t/g' addressbook.txt * This creates an addressbook tab-delimited-file with all the fields I thought where important for each contact (some info may be missing, check the columns and tables). Each contact that has more than one phone number will appear multiple times because I haven't yet come up with a clean way to show the join between the contacts and contactphonenumbers tables, so for now it just duplicates the whole line, with the only difference being the phone number. Anyone versed in SQL will be able to hack this into a full VCF file generator... or you can just go the Python way (but I prefer to use the nice tools already in place) :) Your turn! ;) Paul wrote: Hey Vasco, You mean creating VCF's from the sqlite-data in a backup? Would be interesting to play with. I could envision a slq-script that dumps the data into a file and then a bash or python script that puts things in the proper format. That's not too difficult, if sqlite plays nice. I had thought about that too, but I can't find an SQLite client in OM repos to create the necessary script. How can we talk to SQLite on OM without going the full C/C++ and respective libs way? Python maybe?... I found sqlite3 on my desktop pc, which makes things a lot easier. I think that is included on anyone's Linux box these days, and on www.sqlite.com/download there are also precompiled binaries for Mac and Windows. You need sqlite version 3 for the .sqlite files on the FR. I've been playing a bit with it: copied a .sqlite file from the Freerunner to my machine and using sqlite3 I can pull information from it quite easily: echo .tables | sqlite3 qtopia_db.sqlite appointmentcategories contactpresence mimeTypeMapping appointmentcustom contactspimdependencies appointmentexceptions content servicehistory appointmentscontentPropssimcardidmap callhistory currentsimcard simlabelidmap callhistorytimezone databaseProperties sqlsources categories defaultMimeApplication syncServers categoryringtoneemailaddresses taskcategories changelog favoriteservicestaskcustom contactaddressesgoogleidtasks contactcategories locationLookup versioninfo contactcustom mapCategoryToContent contactphonenumbers mimeTypeLookup echo .dump contactphonenumbers | sqlite3 qtopia_db.sqlite BEGIN TRANSACTION; CREATE TABLE contactphonenumbers ( phone_number VARCHAR(100) NOT NULL, recid INTEGER, phone_type INTEGER, FOREIGN KEY(recid) REFERENCES contacts(recid) ); INSERT INTO contactphonenumbers VALUES('04x875',83886113,1); INSERT INTO contactphonenumbers VALUES('07x693',83886209,1); INSERT INTO contactphonenumbers VALUES('+3167678',83886277,257); INSERT INTO contactphonenumbers VALUES('049275',83886193,1); INSERT INTO contactphonenumbers VALUES('118',83886361,1); INSERT INTO contactphonenumbers VALUES('+316244',83886365,1); INSERT INTO contactphonenumbers VALUES('+3162233',83886357,1); CREATE INDEX contactphonenumbersbytype ON contactphonenumbers (phone_type, phone_number); CREATE INDEX contactphonenumbersindex ON contactphonenumbers (recid); CREATE INDEX contactphonenumbersnumbers ON contactphonenumbers (phone_number, recid); CREATE INDEX contactphnenumberscontacts ON contactphonenumbers (recid, phone_number); COMMIT; I can imagine a python script on the desktop/laptop that would read all the dumps, disect all the insert statements, combine the information based on the recid attribute and after pulling all that together, write out Vcards. Note that I am using qtopia. I am not certain if the structure on OM2008.x is identical. If that is the case, I can imagine a config file per distribution, mapping attribute-names to the necessary Vcard entries. (I have a lot of imagination.)
Re: [Om2008.9] How to export Vcf Contacts from FR?
On Wed, Oct 15, 2008 at 11:00 PM, nickd [EMAIL PROTECTED] wrote: Vasco I've put your contribution up on the wiki. Once step closer to working out the export. Also in the discussion I've asked for thoughts on either moving 'exporting' to a new page or rename the current one. What do you think? -Nick Have you guys considered writing a plugin for Conduit [1]? It looks like Conduit supports Evolution Data Server, which is what (I think) Openmoko uses. I'd be pretty happy if I could synchronize my Freerunner with Evolution via Conduit. Maybe some of us should put together a beer of the month club [2] bounty for whoever makes a plugin for conduit. -Charles Pax [1] http://www.conduit-project.org/ [2] http://www.beermonthclub.com/ ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
On Fri, Oct 10, 2008 at 16:33, Cédric Berger [EMAIL PROTECTED] wrote: I could not try yet, but in qtopia addressbook (at least in Trolltech's 4.3.2 and 4.1.1), there is a menu send all to export to vcard via sms/mail/bluetooth. I do not know yet if it works ?.. Export from qtopia 4.3.2, then import into qtextended 4.4.1 worked (both via bluetooth). (addressbook option send all - bluetooth, then to import back, simply sent via bluetooth from the computer) (But it was a small address book) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
Hey Vasco, You mean creating VCF's from the sqlite-data in a backup? Would be interesting to play with. I could envision a slq-script that dumps the data into a file and then a bash or python script that puts things in the proper format. That's not too difficult, if sqlite plays nice. I had thought about that too, but I can't find an SQLite client in OM repos to create the necessary script. How can we talk to SQLite on OM without going the full C/C++ and respective libs way? Python maybe?... I found sqlite3 on my desktop pc, which makes things a lot easier. I think that is included on anyone's Linux box these days, and on www.sqlite.com/download there are also precompiled binaries for Mac and Windows. You need sqlite version 3 for the .sqlite files on the FR. I've been playing a bit with it: copied a .sqlite file from the Freerunner to my machine and using sqlite3 I can pull information from it quite easily: echo .tables | sqlite3 qtopia_db.sqlite appointmentcategories contactpresence mimeTypeMapping appointmentcustom contactspimdependencies appointmentexceptions content servicehistory appointmentscontentPropssimcardidmap callhistory currentsimcard simlabelidmap callhistorytimezone databaseProperties sqlsources categories defaultMimeApplication syncServers categoryringtoneemailaddresses taskcategories changelog favoriteservicestaskcustom contactaddressesgoogleidtasks contactcategories locationLookup versioninfo contactcustom mapCategoryToContent contactphonenumbers mimeTypeLookup echo .dump contactphonenumbers | sqlite3 qtopia_db.sqlite BEGIN TRANSACTION; CREATE TABLE contactphonenumbers ( phone_number VARCHAR(100) NOT NULL, recid INTEGER, phone_type INTEGER, FOREIGN KEY(recid) REFERENCES contacts(recid) ); INSERT INTO contactphonenumbers VALUES('04x875',83886113,1); INSERT INTO contactphonenumbers VALUES('07x693',83886209,1); INSERT INTO contactphonenumbers VALUES('+3167678',83886277,257); INSERT INTO contactphonenumbers VALUES('049275',83886193,1); INSERT INTO contactphonenumbers VALUES('118',83886361,1); INSERT INTO contactphonenumbers VALUES('+316244',83886365,1); INSERT INTO contactphonenumbers VALUES('+3162233',83886357,1); CREATE INDEX contactphonenumbersbytype ON contactphonenumbers (phone_type, phone_number); CREATE INDEX contactphonenumbersindex ON contactphonenumbers (recid); CREATE INDEX contactphonenumbersnumbers ON contactphonenumbers (phone_number, recid); CREATE INDEX contactphnenumberscontacts ON contactphonenumbers (recid, phone_number); COMMIT; I can imagine a python script on the desktop/laptop that would read all the dumps, disect all the insert statements, combine the information based on the recid attribute and after pulling all that together, write out Vcards. Note that I am using qtopia. I am not certain if the structure on OM2008.x is identical. If that is the case, I can imagine a config file per distribution, mapping attribute-names to the necessary Vcard entries. (I have a lot of imagination.) You'd then run the python script with a parameter telling it what config/mapping to use. I am sure I can write something like that. I am however not sure how long it would take me, as my order for 36-hour days has still not been fullfilled. *grin* What do you (or anyone) think of this? Paul -- If there were no schools to take the children away from home part of the time, the insane asylum would be filled with mothers. -Edgar Watson Howe http://www.nlpagan.net Running on Mandriva Linux 2008 and Ubuntu 8.04 ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
El día Friday, October 10, 2008 a las 04:40:05AM -0700, Steven Goyvaerts escribió: Hi, I found this on the wiki. ... Hi, I withdraw my question how one could unload the contacts in the FR to vCard format :-) Converting my old CSV based cellphone contacts to vCard with the KDE Kaddressbook tool let me think that the correct place for the 'master database' of my contacts is not the FR itself, but the Kaddressbook tool itself; the internal format of Kaddressbook is already vCard 3.0 and it's just easy to copy it over to the FR and load it there as: $ scp ~/.kde/share/apps/kabc/std.vcf [EMAIL PROTECTED]:. $ ssh [EMAIL PROTECTED] # DISPLAY=:0.0 export DISPLAY # addressbook ./std.vcf that's all; before loading the contacts in the FR I'm just dropping the old database with sqlite3 as described in the Wiki with a small script; the problem with vCard 3.0 are the mangled non-ASCII chars of the UTF-8 input file; and as well the NICKNAME is not filled in from the file into the contact; the file reads for example: BEGIN:VCARD CLASS:PUBLIC FN:Lina Maria Lozano Manchola N:Lozano Manchola;Lina Maria;;; NICKNAME:Linchen REV:2008-10-12T12:41:20Z TEL;TYPE=CELL:+49... TEL;TYPE=HOME:+57... UID:Lij1Mm4v3L VERSION:3.0 END:VCARD but 'Linchen' does not get inserted into the FR contact field 'Nickname'; any idea? thx matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e [EMAIL PROTECTED] - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
Has anyone done this yet? I copied the sqlite file from FDOM, tried to import it (by copying to ~/Applications/Qtopia/) in QtopiaExtended and it shows how many contacts I have, but all of them are blank! So exporting to VCF and Importing it again would be quite nice! Richard ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
Paul wrote: Timo Jyrinki wrote: Does anyone know how to not only make a backup, but to export back to VCF format from Qtopia/Om2008.8? I now added a section for it at http://wiki.openmoko.org/wiki/Import_Vcf_Contacts - the 2007.2 section has a script that handles it. I wouldn't want to actively change the addressbook if I cannot export from it to some standard format if I eg. change to FSO (or even back to 2007.2 / SHR!). You mean creating VCF's from the sqlite-data in a backup? Would be interesting to play with. I could envision a slq-script that dumps the data into a file and then a bash or python script that puts things in the proper format. That's not too difficult, if sqlite plays nice. Paul I had thought about that too, but I can't find an SQLite client in OM repos to create the necessary script. How can we talk to SQLite on OM without going the full C/C++ and respective libs way? Python maybe?... ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
2008/10/10 Steven Goyvaerts [EMAIL PROTECTED]: http://wiki.openmoko.org/wiki/Pre-Flash_Backup Pre-Flash Backup Does anyone know how to not only make a backup, but to export back to VCF format from Qtopia/Om2008.8? I now added a section for it at http://wiki.openmoko.org/wiki/Import_Vcf_Contacts - the 2007.2 section has a script that handles it. I wouldn't want to actively change the addressbook if I cannot export from it to some standard format if I eg. change to FSO (or even back to 2007.2 / SHR!). -Timo ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
[Om2008.9] How to export Vcf Contacts from FR?
Hello, I've recently moved from a normal cellphone to FR and punched out of the old cellphone all my contacts to a CSV file, converted this to Vcf (which is easy using the KDE application 'kontact' because it supports both formats on import/export); than I've loaded the resulting addr.vcf file into my FR as described in http://wiki.openmoko.org/wiki/Import_Vcf_Contacts so far so good; but how can I export now all these (and new added) contacts to a Vcf file, for example before flashing the rootfs on next update? Thx matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e [EMAIL PROTECTED] - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
On Fri, Oct 10, 2008 at 16:05, Timo Jyrinki [EMAIL PROTECTED] wrote: 2008/10/10 Steven Goyvaerts [EMAIL PROTECTED]: Does anyone know how to not only make a backup, but to export back to VCF format from Qtopia/Om2008.8? I now added a section for it at http://wiki.openmoko.org/wiki/Import_Vcf_Contacts - the 2007.2 section has a script that handles it. I wouldn't want to actively change the addressbook if I cannot export from it to some standard format if I eg. change to FSO (or even back to 200 I could not try yet, but in qtopia addressbook (at least in Trolltech's 4.3.2 and 4.1.1), there is a menu send all to export to vcard via sms/mail/bluetooth. I do not know yet if it works ?.. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
Timo Jyrinki wrote: Does anyone know how to not only make a backup, but to export back to VCF format from Qtopia/Om2008.8? I now added a section for it at http://wiki.openmoko.org/wiki/Import_Vcf_Contacts - the 2007.2 section has a script that handles it. I wouldn't want to actively change the addressbook if I cannot export from it to some standard format if I eg. change to FSO (or even back to 2007.2 / SHR!). You mean creating VCF's from the sqlite-data in a backup? Would be interesting to play with. I could envision a slq-script that dumps the data into a file and then a bash or python script that puts things in the proper format. That's not too difficult, if sqlite plays nice. Paul -- People who fight fire with fire usually end up with ashes. -Abigail Van Buren http://www.nlpagan.net Running on Mandriva Linux 2008 and Ubuntu 8.04 ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: [Om2008.9] How to export Vcf Contacts from FR?
Hi, I found this on the wiki. http://wiki.openmoko.org/wiki/Pre-Flash_Backup Pre-Flash Backup Greetings, Steven -- View this message in context: http://n2.nabble.com/-Om2008.9--How-to-export-Vcf-Contacts-from-FR--tp1315905p1316029.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community