[turba] IMP 2.2 to Turba Converter
Williams, Grant C
will6196@msmailhub.oulan.ou.edu
Wed, 8 May 2002 10:37:10 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
---------------------- multipart/alternative attachment
Thanks. I am using a postgres db so that won't exactly work, but it =
does
help me to figure out the object_id field. I can write up a perl script =
to
do the conversion and have that create the object_id. It is also going =
from
one server to another, so I will actually have to write something that =
does
it for me. However, do you know what that python script did? Did it =
just do
something similar to yours or did it do more?
=20
Thanks,
Grant Williams
=20
-----Original Message-----
From: Niklas =D6gren [mailto:no@nod.se]=20
Sent: Wednesday, May 08, 2002 10:06 AM
To: Williams, Grant C; turba@lists.horde.org
Subject: RE: [turba] IMP 2.2 to Turba Converter
=20
You mean the Python script?
You don't need that, you can only run one query in your mysql database.
=20
I sent this mail to the list a little more than a month ago:
=20
=3D=3D=3D=3D
Hi!
=20
Found a python script on the horde-site to convert the old addressbook
used in IMP 2.2 to Turba format.
=20
I'm not running Python here, and thought it would be easier to just do =
it
in MySQL right away..
=20
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:
=20
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;
=20
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. :)
=20
/Niklas
=20
=3D=3D=3D=3D
-----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/ <http://www.horde.org/turba/> ? The link is =
now
dead so I just wondered if anybody had previously downloaded it and has =
a
copy?
=20
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">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<title>Message</title>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.emailstyle17
{font-family:Arial;
color:windowtext;}
span.EmailStyle18
{font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Thanks. I am using a postgres db =
so that
won't exactly work, but it does help me to figure out the object_id
field. I can write up a perl script to do the conversion and have that =
create
the object_id. It is also going from one server to another, so I will =
actually
have to write something that does it for me. However, do you know what =
that
python script did? Did it just do something similar to yours or did it =
do more?</span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Thanks,</span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Grant Williams</span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Niklas =D6gren
[mailto:no@nod.se] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Wednesday, May 08, =
2002
10:06 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> Williams, Grant C;
turba@lists.horde.org<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: [turba] IMP =
2.2 to
Turba Converter</span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>You mean the =
Python
script?</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>You don't need =
that, you
can only run one query in your mysql database.</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>I sent this =
mail to the
list a little more than a month ago:</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>=3D=3D=3D=3D</sp=
an></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>Hi!</span></font=
></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>Found a python =
script on
the horde-site to convert the old addressbook<br>
used in IMP 2.2 to Turba format.</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>I'm not running =
Python
here, and thought it would be easier to just do it<br>
in MySQL right away..</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>So, if the =
generation of
the object_id is alright, here is the one-liner<br>
that works in my MySQL 3.23, and that should work in most modern =
SQLs:</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>insert =
turba_objects<br>
(object_id,owner_id,object_name,object_alias,object_email)<br>
select<br>
MD5(RAND()) as object_id,<br>
REPLACE(user,'@localhost','') as owner_id,<br>
fullname, nickname, address<br>
from imp_addr;</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'><br>
</span></font><font size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial;color:blue'>I'm not sure about the 'replace'-line, do =
I need
something like that?<br>
Anyway, use this as you like, put it in a UPGRADE section, README, =
or<br>
whatever.. or just use ignore it. :)</span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>/Niklas</span></=
font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
color=3Dblue face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>=3D=3D=3D=3D</sp=
an></font></p>
</div>
<blockquote =
style=3D'margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<p class=3DMsoNormal =
style=3D'margin-right:0in;margin-bottom:12.0pt;margin-left:
.5in'><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b>
turba-bounces@lists.horde.org [mailto:turba-bounces@lists.horde.org] =
<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Williams, Grant =
C<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> den 8 maj 2002 =
16:40<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
'turba@lists.horde.org'<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [turba] IMP 2.2 =
to Turba
Converter</span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Does anybody happen to =
have the
converter that used to be linked from <a =
href=3D"http://www.horde.org/turba/">http://www.horde.org/turba/</a>?
The link is now dead so I just wondered if anybody had previously =
downloaded it
and has a copy?</span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'> </span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Thanks.</span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Grant =
Williams</span></font></p>
</blockquote>
</div>
</body>
</html>
---------------------- multipart/alternative attachment--