Hi all,

I have tried for some time to get lookout.el to import my contacts from
a csv-file into bbdb, but am on the verge of giving up, so before
finally ditching the attempts (again); Is there *anyone*
out there that have successfully migrated .csv contacts into bbdb (bbdb
3), and how?


PROBLEM: I have a lot of legacy contacts in outlook, and want to get all
this into BBDB.

TRIED SOLUTION: The best method I have found seems to be to export
from outlook to .csv format and then use lookout.el (which requires
csv.el) to import the csv-file into bbdb. After failing to import the
csv-file generated by outlook, I tried a minimal example to get the
import working as below:

1. Obtain csv.el [1] and lookout.el [2], put these in emacs load path
and include them in init.el.

2. To make lookout read the csv-file, I created a new variable in
init.el and then set the lookout-bbdb-mapping-table to use it.
,----
| (defconst lookout-bbdb-mapping-table-outlook-english
|   '(
|     ("firstname" "First Name")
|     ("lastname" "Last Name")
|     ("phones" "Home Phone")
|     ("net" "E-mail Addres")
| 
|     ("company" "company")
|     ("addr1" "addr1")
|     ("addr2" "addr2")
|     ("addr3" "addr3")
|     ("notes" "notes")
|     ("otherfields" "otherfields")
|     )
| "this is a description of the variable"
| )
`----

,----
| (setq lookout-bbdb-mapping-table 'lookout-bbdb-mapping-table-outlook-english)
`----

3. Creating a dummy file with only one entry below row with field specifiers
,----
| First Name,Last Name,Home Phone,E-mail 
Address,company,addr1,addr2,addr3,notes,otherfields
| John,Doe,+1 (555) 555 
555,john....@dummy.web,johns_company,johns_addr1,johns_addr2,johns_addr3,johns_notes,johns_otherfields
`----

4. Running 'lookout-create-bbdb' from emacs and pointing to this file generates
 the following errormessage 
,----
| Wrong number of arguments: #[(record field contents) "Ä=ƒn   
‰ÆH)ƒÇÈ!ˆ;ƒÉÄ\"ʉƒ^
@‰      Ë—(\")Ì)!ƒO   )J>?…T)        )JBL‚T)        CL)ˆ*A‰„%*      
*‰Æ*Iˆ*‚£Í=ƒÞ ‰ÎH)ƒÇÏ!ˆ;ƒ‹ÉÍ\"Ê
‰ƒÎ
@‰
        Ë—(\")Ì)!ƒ¿   )J>?…Ä)        )JBL‚Ä)        CL)ˆ*A‰„”*      
*‰Î*Iˆ*‚£Ð=ƒû ‰‰ÑH)C¤*‰Ñ*Iˆ*‚£Ò=ƒ  ‰‰ÓH)C¤*‰Ó*Iˆ*‚£Ô=ƒÏ  
‰ÕH)ƒ+ÇÖ!ˆ;ƒ5ÉÔ\"+ƒtʉƒs
@×     ‰…WØ—(\"J)\"‰,ƒkÇÙÚÛ,Ü##ˆ)A‰„C*ʉƒ·
@‰     Ë—(\")Ì)!ƒ¨   )J>?…­)        )JBL‚­)        CL)ˆ*A‰„}*      *-„ÅÝ-
| Õ*Iˆ*‚£Þ=ƒ~  ‰ßH)ƒâÇà!ˆ;ƒìÉÞ\"+ƒ+ʉƒ*
@×     ‰…Ø—(\"J)\"‰,ƒ\"ÇáÚÛ,Ü##ˆ)A‰„ú*ʉƒn
@‰     Ë—(\")Ì)!ƒ_   )J>?…d)        )JBL‚d)        CL)ˆ*A‰„4*      
*‰ß*Iˆ*‚£.>ƒž        ‰âH)žƒ•Çã\"ˆä  #ˆ‚£Çå\"ˆæ   !ˆÊ/ç   !)‡" [field 
record vector contents affix --dolist-tail-- 2 error "Affix field exists 
already" bbdb-split ...] 8 ("/usr/local/share/emacs/bbdb3/bbdb-com.elc" . 
30265) (let* ((_ (bbdb-editable)) (record (or (bbdb-current-record) (error 
"Point not on a record"))) (list (append bbdb-notes-label-list (quote (affix 
organization aka phone address mail)))) (field "") (completion-ignore-case t) 
(present (mapcar (quote car) (bbdb-record-notes record))) init init-f) (if 
(bbdb-record-affix record) (push (quote affix) present)) (if 
(bbdb-record-organization record) (push (quote organization) present)) (if 
(bbdb-record-mail record) (push (quote mail) present)) (if (bbdb-record-aka 
record) (push (quote aka) present)) (dolist (field present) (setq list (remq 
field list))) (setq list (mapcar (quote symbol-name) list)) (while (string= 
field "") (setq field (downcase (completing-read "Insert Field: " list)))) (if 
(member (intern field) present) (error "Field \"%s\" already exists" field)) 
...)], 1
`----

5. lookout.el is using a function 'bbdb-add-new-field'  which I cannot
find in bbdb-com.el; could this be related? 


Thanks in advance for any ideas!


Footnotes: 
[1]  http://ulf.epplejasper.de/downloads/csv.el
[2]  http://ulf.epplejasper.de/downloads/lookout.el

-- 
Johnny

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to