[CPS-users] Adding contacts database

Lennart Regebro regebro at gmail.com
Fri Jan 12 19:20:29 CET 2007


On 1/12/07, Mário Valente <mvalente at itij.mj.pt> wrote:
>   Problem: adding a contact database to CPS. The data
>  is in na Excel/CSV file.
>
>   Solutions:
>
>   1) Create a new type using CPSTypeMaker. Worked great.
>      Couldnt find where items were stored and as such no
>      way to do a bulk load

They are stored as objects in whatever workspace/section you choose to
create them.

>   3) Create a new SQL based CPSDirectory, interfacing to
>      the previous Gadfly table. Works fine for search. It
>      doesnt work for insert. No way to bulk upload

It's probably not tested with Gadfly. MySQL might work better.

>   4) Create a portal_schema, portal_layout, portal_type
>      and setup workspace filters and workflow. Worked fine,
>      similar to 1). Was able to add items through the CPS
>      interface and to search and display. No way to bulk
>      upload.

CPSTypemaker is just a easy to use interface for this, so it is indeed
very similar.

>   Any hints? Whats the best way to bring in a table (SQL
>  type of table, even if spreadsheet/csv stored) into CPS,
>  with CRUD interface (preferably the CPS-based workspaces)
>  *and* do a bulk upload?

It depends on what you want to do with the data. Since it is contact
data, I would go for a CPSDirectory of some sort. Making a script that
takes CSV data and creates entries in a ZODB base CPSDirectory
shouldn't be much work.

-- 
Lennart Regebro: Python, Zope, CPS, Plone.
+33 661 58 14 64



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.