Skip to content

OGo Docs

Sections
Personal tools
You are here: Home » Members » pierrot's Home » 3. HowTo

3. HowTo

Document Actions
What to do to prepare a csv export and actually import the data

To find and download the script and supporting files, "Switch to Contents view" (see upper left corner of this page).

  1. Export from Outlook

    Export as csv, have the Outlook instance at hands to understand the columns contents.

  2. Edit file in Excel (Windows/Macintosh)

    You can use any other spreadsheet app if you like. You need to fill the fields that are mentioned in the cfg.py file. See the exmaples for person_fullname and typeofbusiness vs. jobtitle in the Features and Intro pages. More information to come. Any contributions appreciated.

  3. Prepare file for import

    Make sure, the planned delimiter (usually ";") is not inside any field. Save as csv. Transfer to OGo machine (you probably can do this on your workstation) Recode file if neccessary (in my case I had to: recode mac..lat1 )

  4. Start the import

    See below.

Actual interactive session:

$ ./import_perscomp.py 
Please enter username: xxxxx
Please enter password for user xxxxx: yyyyy
Please enter filename: testlat1.csv
.
line 1 : Enterprise Bser Test with number SKY393410 inserted.  Fetching again ... ... OK.
line 1 : Person Hans-Jrgen Karow with number SKY393580 inserted.  Assigning Person SKY393580 to Enterprise SKY393410
.
Reading line 2 ... continue (no breaks, noask stops asking)? 
line 2 : Enterprise Curriculum with number SKY393770 inserted.  Fetching again ... ... OK.
!! 2 persons with lastname Meyer exist:
    Bettina Meyer
    Peter Meyer
Should I insert Karin Meyer anyway?
   ("yes" inserts, "no" skips)? yes
line 2 : Person Karin Meyer with number SKY393940 inserted.  Assigning Person SKY393940 to Enterprise SKY393770
.
Reading line 3 ... continue (no breaks, noask stops asking)? 
line 3 : Person Anja Teemann with number SKY394130 inserted. 
.
Finished.
Parsed 3 lines,
Inserted 2 enterprises
Inserted 3 persons.
 

Created by chris
GPL
Last modified 2004-05-02 06:10 AM

Where can I find the script?

Posted by venky4025 at 2003-12-03 09:47 PM

I am trying to import a database of about 2000 contacts from ACT! and would appreciate if I could use your script.

Thanks in advance,

Venky

import_perscomp.py - "OGo" instead of "SKY"

Posted by wwb at 2004-07-13 11:05 AM

I had lots of errors running the script until I replaced all ocurrences of SKY with OGo. Walter

Script Dies Immediately

Posted by whitemice at 2004-10-18 05:05 PM

awilliam@estate3:~/tmp/SafetyLoad> ./ImportContacts.py
Please enter username: adam
Please enter password for user adam: *****
Please enter filename: SafetyTraining.csv
Traceback (most recent call last):
File "./ImportContacts.py", line 408, in ?
password = cfg.password)
TypeError: __init__() got an unexpected keyword argument 'login'
awilliam@estate3:~/tmp/SafetyLoad>

xmllib.Error

Posted by cscs at 2005-05-02 06:14 PM

very cool idea.
though i am stuck:

./import_perscomp.py
Please enter username: xxxxx
Please enter password for user xxxxx: yyyyy
Please enter filename: testlat1.csv

/usr/lib/python2.3/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead.
warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning)
Traceback (most recent call last):
File "./import_perscomp.py", line 431, in ?
crt_enterprise_number = insert_enterprise ( enterprisedict ) # Check and insert
File "./import_perscomp.py", line 170, in insert_enterprise
number_of_existing_enterprise = enterprise_exists (enterprise['name'] )
File "./import_perscomp.py", line 154, in enterprise_exists
result = server.enterprise.fetch ( "description = '" + name + "'" )
File "/tmp/ogo/xmlrpclib.py", line 829, in __call__
return self.__send(self.__name, args)
File "/tmp/ogo/xmlrpclib.py", line 995, in __request
verbose=self.__verbose
File "/tmp/ogo/xmlrpclib.py", line 866, in request
return self.parse_response(h.getfile())
File "/tmp/ogo/xmlrpclib.py", line 910, in parse_response
p.feed(response)
File "/usr/lib/python2.3/xmllib.py", line 171, in feed
self.goahead(0)
File "/usr/lib/python2.3/xmllib.py", line 382, in goahead
self.unknown_entityref(name)
File "/usr/lib/python2.3/xmllib.py", line 801, in unknown_entityref
self.syntax_error("reference to unknown entity `&%s;'" % name)
File "/usr/lib/python2.3/xmllib.py", line 794, in syntax_error
raise Error(Syntax error at line %d: %s % (self.lineno, message))
xmllib.Error: Syntax error at line 38: reference to unknown entity `™'

any idea what this ™ thing means?

TIA

chris

xmllib.Error

Posted by cscs at 2005-05-02 06:15 PM

very cool idea.
though i am stuck:

./import_perscomp.py
Please enter username: xxxxx
Please enter password for user xxxxx: yyyyy
Please enter filename: testlat1.csv

/usr/lib/python2.3/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead.
warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning)
Traceback (most recent call last):
File "./import_perscomp.py", line 431, in ?
crt_enterprise_number = insert_enterprise ( enterprisedict ) # Check and insert
File "./import_perscomp.py", line 170, in insert_enterprise
number_of_existing_enterprise = enterprise_exists (enterprise['name'] )
File "./import_perscomp.py", line 154, in enterprise_exists
result = server.enterprise.fetch ( "description = '" + name + "'" )
File "/tmp/ogo/xmlrpclib.py", line 829, in __call__
return self.__send(self.__name, args)
File "/tmp/ogo/xmlrpclib.py", line 995, in __request
verbose=self.__verbose
File "/tmp/ogo/xmlrpclib.py", line 866, in request
return self.parse_response(h.getfile())
File "/tmp/ogo/xmlrpclib.py", line 910, in parse_response
p.feed(response)
File "/usr/lib/python2.3/xmllib.py", line 171, in feed
self.goahead(0)
File "/usr/lib/python2.3/xmllib.py", line 382, in goahead
self.unknown_entityref(name)
File "/usr/lib/python2.3/xmllib.py", line 801, in unknown_entityref
self.syntax_error("reference to unknown entity `&%s;'" % name)
File "/usr/lib/python2.3/xmllib.py", line 794, in syntax_error
raise Error(Syntax error at line %d: %s % (self.lineno, message))
xmllib.Error: Syntax error at line 38: reference to unknown entity `& trade ;'

any idea what this & trade ; thing means?

TIA

chris

 

Powered by Plone

This site conforms to the following standards: