[turba] IMP 2.2 to Turba Converter

Niklas Ögren no@nod.se
Wed, 8 May 2002 17:05:34 +0200


This is a multi-part message in MIME format.

---------------------- multipart/alternative attachment
You mean the Python script?
You don't need that, you can only run one query in your mysql database.
 
I sent this mail to the list a little more than a month ago:
 
====
Hi!
 
Found a python script on the horde-site to convert the old addressbook
used in IMP 2.2 to Turba format.
 
I'm not running Python here, and thought it would be easier to just do
it
in MySQL right away..
 
So, if the generation of the object_id is alright, here is the one-liner
that works in my MySQL 3.23, and that should work in most modern SQLs:
 
insert turba_objects
 (object_id,owner_id,object_name,object_alias,object_email)
   select
    MD5(RAND()) as object_id,
    REPLACE(user,'@localhost','') as owner_id,
    fullname, nickname, address
   from imp_addr;
 

I'm not sure about the 'replace'-line, do I need something like that?
Anyway, use this as you like, put it in a UPGRADE section, README, or
whatever.. or just use ignore it. :)
 
/Niklas
 
====

-----Original Message-----
From: turba-bounces@lists.horde.org
[mailto:turba-bounces@lists.horde.org] On Behalf Of Williams, Grant C
Sent: den 8 maj 2002 16:40
To: 'turba@lists.horde.org'
Subject: [turba] IMP 2.2 to Turba Converter



Does anybody happen to have the converter that used to be linked from
http://www.horde.org/turba/? The link is now dead so I just wondered if
anybody had previously downloaded it and has a copy?

 

Thanks.

Grant Williams


---------------------- multipart/alternative attachment
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>Message</TITLE>

<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in =
1.25in; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
	COLOR: windowtext; FONT-FAMILY: Arial
}
DIV.Section1 {
	page: Section1
}
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =
size=3D2>You=20
mean the Python script?</FONT></SPAN></DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =
size=3D2>You=20
don't need that, you can only run one query in your mysql=20
database.</FONT></SPAN></DIV>
<DIV><SPAN class=3D874560315-08052002></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =
size=3D2>I sent=20
this mail to the list a little more than a month =
ago:</FONT></SPAN></DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =

size=3D2>=3D=3D=3D=3D</FONT></SPAN></DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =

size=3D2>Hi!</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =
size=3D2>Found=20
a python script on the horde-site to convert the old addressbook<BR>used =
in IMP=20
2.2 to Turba format.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =
size=3D2>I'm=20
not running Python here, and thought it would be easier to just do =
it<BR>in=20
MySQL right away..</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =
size=3D2>So, if=20
the generation of the object_id is alright, here is the =
one-liner<BR>that works=20
in my MySQL 3.23, and that should work in most modern =
SQLs:</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D874560315-08052002><FONT face=3DArial color=3D#0000ff =
size=3D2>insert=20
turba_objects<BR>&nbsp;(object_id,owner_id,object_name,object_alias,objec=
t_email)<BR>&nbsp;&nbsp;=20
select<BR>&nbsp;&nbsp;&nbsp; MD5(RAND()) as =
object_id,<BR>&nbsp;&nbsp;&nbsp;=20
REPLACE(user,'@localhost','') as owner_id,<BR>&nbsp;&nbsp;&nbsp; =
fullname,=20
nickname, address<BR>&nbsp;&nbsp; from imp_addr;</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV><SPAN class=3D874560315-08052002>
<DIV><BR><FONT face=3DArial color=3D#0000ff size=3D2>I'm not sure about =
the=20
'replace'-line, do I need something like that?<BR>Anyway, use this as =
you like,=20
put it in a UPGRADE section, README, or<BR>whatever.. or just use ignore =
it.=20
:)</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>/Niklas</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT>&nbsp;</DIV>
<DIV></SPAN><SPAN class=3D874560315-08052002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>=3D=3D=3D=3D</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr =
align=3Dleft><FONT=20
  face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B>=20
  turba-bounces@lists.horde.org [mailto:turba-bounces@lists.horde.org] =
<B>On=20
  Behalf Of </B>Williams, Grant C<BR><B>Sent:</B> den 8 maj 2002=20
  16:40<BR><B>To:</B> 'turba@lists.horde.org'<BR><B>Subject:</B> [turba] =
IMP 2.2=20
  to Turba Converter<BR><BR></FONT></DIV>
  <DIV class=3DSection1>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Does anybody happen to =
have the=20
  converter that used to be linked from <A=20
  href=3D"http://www.horde.org/turba/">http://www.horde.org/turba/</A>? =
The link=20
  is now dead so I just wondered if anybody had previously downloaded it =
and has=20
  a copy?</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Thanks.</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Grant=20
  Williams</SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>

---------------------- multipart/alternative attachment--