Author Topic: Export & Import PIM in XML or CSV  (Read 2491 times)

SJR3t120

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • http://
Export & Import PIM in XML or CSV
« on: September 11, 2004, 02:48:15 am »
Does anyone know of a program that exports & imports PIM information into/from XML or CSV?  I tried to use Sharp ROM Backup/Restore program.  It exported the data in an un-known format.  I am hoping there is another program that exports/imports PIM data.  Anyone knows of any?

Steven

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Export & Import PIM in XML or CSV
« Reply #1 on: September 11, 2004, 05:13:43 am »
This goes the other way xml->dtm, but with some hacking you can probably getting it working the way you want:

http://www.zaurus.com/dev/board/index.php?...pic=4334&hl=dtm

(be careful, the devnet is soon to vanish - such a shame)


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

mike151

  • Newbie
  • *
  • Posts: 34
    • View Profile

SJR3t120

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • http://
Export & Import PIM in XML or CSV
« Reply #3 on: September 13, 2004, 05:13:11 am »
I looked at the xml2dtm.  There is a script and a bin file.  The script just calls the bin multiple times.  So without having the source code for the bin, I don't see how I could get the app to do dtm2xml.

Steven

SJR3t120

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • http://
Export & Import PIM in XML or CSV
« Reply #4 on: September 13, 2004, 08:02:28 pm »
mike151,

could you give me the url for the download, I can't make much sence for either of the urls you gave me.  But I would like to try the program zdbat, just don't know how to get it.

Steven

mike151

  • Newbie
  • *
  • Posts: 34
    • View Profile
Export & Import PIM in XML or CSV
« Reply #5 on: September 15, 2004, 12:32:06 am »
sure, the url is this: http://yakty.s31.xrea.com/cgi-bin/misc/dl....0.2.9-1_arm.ipk

This is an example of use, copied from the japanese site and translated automatically from Japanese to English by a web tool, so be open minded about the English you'll see here:

Address book  
Backup and restoration

Backup

From a terminal
$ zdbat address -r > address.cs v  

It comes out and the data of an address book In CSV form It is outputted to an address.csv file.

It is like outputting the following. Since it is long, it has skipped.

CARDID, CATEGORY, FULL, TITL, LNME, FNME, MNME, SUFX, FLAS ... It continues.
1 and a warrior -- alley , "", and a warrior -- an alley, , and "", "" -- " -- a warrior -- an alley and" ... it continues
    -
    -
    -
   It continues.

Restoration

It is "data" about the data of an address book. - It changes into the state where there is no data, by "all data deletion."

At the time of data writing With zdbat CARDID It becomes the meaning of making a new record from 0.
- It outputted by r. address.csv Since CARDID is consecutive numbers, they are all about the number of CARDID. It changes into 0.

Variously, a method is here, although it is. A stream editor called sed is used (it enters as standard). With sed A character sequence is changed by s / object character sequence / conversion character sequence/.
$ sed 's/^[ 0-9]*,/0,/' address.csv > import.csv  

It comes out. It is called import.csv. CARDID The file set to 0 is outputted.
Head of the sentence "12" etc. It changes into "0."

^ [0-9] "*" that to which a portion is called regular expression -- it is -- the space of "head of the sentence, continuation of a number, or empty [ (comma) ] -- up to -- " is expressed
[0-9] although it comes out and thinks that it is satisfactory, it thinks, when a space is in front of a comma, and is referred to as [0-9] It says others and it is thought that there is expression.

Especially although it is convenient, it is not necessary to memorize a regular expression. What is necessary will be just to investigate the degree of capital, when needed. Riue my -- regular expression lecture が -- it is written intelligibly

It changed. import.csv is written in an address book.

$ zdbat address -w < import.csv  

It backs up above. & restoration was completed.

in addition -- before the writing of -w -- once
$ cp import.csv import.bak

I hope oyu can make sense of this.  Mike

mike151

  • Newbie
  • *
  • Posts: 34
    • View Profile
Export & Import PIM in XML or CSV
« Reply #6 on: September 15, 2004, 12:36:11 am »
Oh, by the way, remember to backup the data in your zaurus BEFORE to play with zdbat  

Mike

SJR3t120

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • http://
Export & Import PIM in XML or CSV
« Reply #7 on: September 15, 2004, 01:12:43 am »
Thanks, I will play with in in a few days.

Steven