[OGo-XML-RPC] Re: questions regarding ZOGi, WAS: [OGo-Users] custom fields and synchronizing ogo

Sebastian Reitenbach xmlrpc@opengroupware.org
Tue, 25 Mar 2008 15:41:06 +0100


Hi,

users@opengroupware.org wrote: 
> > then I need to create it. What is the best way to do this with an actual 
ogo 
> > version? Some years ago, I initially filled my ogo db with 
> > contacts/enterprises using the import_perscomp.py script. Is this still 
the 
> > best way to do, or is there, meanwhile, a better way, using ZOGi or sth. 
> > else?
> 
> Of course, I'd recommend zOGI.  I've numerous example sync scripts;  our
> marketing department imports contact lists via zOGI on a regular basis.
> I think some scripts are in the archive of the xmlrpc@
> <http://mail.opengroupware.org/mailman/listinfo/xmlrpc> list.  Post over
> there for zOGI specific questions.  And there is a relatively
> sophisticated example in the zOGI Wiki
> <http://code.google.com/p/zogi/wiki/ExampleImportSyncScript>
I took a look at the script, and it looks promising, that I can tweak it, 
until it will fit my needs. Well, I don't nearly know anything about python 
and ZOGi, so I have some questions:

I assume the two lines below the import line have to be on a single line?
Then I see a lot of, maybe only in my eyes, magic numbers, e.g.:

permissions = [ { 'operations' : 'rw',
                  'targetObjectId' : 970990 },
                { 'operations' : 'rw',
                  'targetObjectId' : 11530 } ] 
are 11530 and 970990 object ID values of accounts or teams in ogo?

then, a little bit later when creating the Enterprise:
...
                 '_ACCESS' : permissions,
                 '_COMPANYVALUES' : [ { 'attribute' : 'division',
                                        'value' : 'WYC' },
                                      { 'attribute' : 'salesperson',
                                        'value' : row[0] },
...
I assume this will create all companies with a "division" attribute with 
value WYC?

also, I don't think that this is really relevant, but I'm wondering, what is 
the reason for this statement at the end of the script:

  if counter == 250:
    time.sleep(5)
    counter = 0
  else:
    time.sleep(0.2)
  counter = counter + 1


Do I can use ZOGi from within a different (scripting) language, e.g. just a 
shell script? If so, are there example scripts available somewhere too?


kind regards
Sebastian


> 
> -- 
> OpenGroupware.org Users
> users@opengroupware.org
> http://mail.opengroupware.org/mailman/listinfo/users
>