mt2roller {title}.txt
Step by step:
{database},
{host} and {port} so you can construct a DBI DSN for use by this script.
Create your RollerWeblogger user account, which will create your website (blog).
If you are doing this only for personal use, you'll want to use the command-line
tool to give yourself admin rights. You may also want to disable the registration
feature so no new accounts can be created.
Set the title to whatever you want in the Website Settings page. Remember that
value for later (we'll refer to it as {website} in what follows).
Set up your initial categories the way you want. The most important thing at this
point is to have one that will be considered your default category (we'll refer
to it as {default} in what follows).
Export your entries from Movable Type (this script was tested with the output of
version 2.63), and save the text file as {website}.txt.
Set up your mt2roller.conf file. It needs to have two entries, and should look
something like this (if your database is MySQL):
DefaultCategoryName = {default}
DSN = DBI:mysql:database={database};host={host};port={port}
(With {default}, {database}, {host} and {port} substituted appropriately,
of course -- usually MySQL uses a port of 3306.)
mt2roller {website}.txt
and enter your database {user} and {password} and watch the output scroll by.
Each time mt2roller writes to the database it prints out a line saying what it is doing. It also generates an entry in the file {website}-undo.sql in case you need to undo what it does.
If you want to undo what was done, do something like this (for MySQL):
mysql -d {database} -h {host} -u {user} -p < {website}-undo.sql
This assumes port 3306, and you will be prompted for your password.
The mt2roller script does attempt to use a transaction to keep all of its changes atomic in case there is an error part way through, but experience shows that with a simple MySQL setup, the database will still have some cruft in it and so you'll want to run the undo SQL script on failure. YMMV.
Author: Pierre-Alexandre Losson E<lt>plosson@users.sourceforge.netE<gt> Link: http://wiki.blojsom.com/wiki/download/attachments/140/mt2blojsom.pl?version=1 Article: http://wiki.blojsom.com/wiki/display/blojsom/Contributions
Author: Henri P. Yandell E<lt>bayard@generationjava.com E<gt> Link: http://www.generationjava.com/mt2roller.pl Article: http://blog.generationjava.com/roller/page/bayard/20040519#mt_to_roller_migration
Happy 18 weeks little foetus
Author: Gregor N. Purdy E<lt>gregor@focusresearch.comE<gt> Link: TODO Article: TODO
Changes:
$dbh->commit() with $dbh->rollback() would allow me to
test this script over and over with no consequences in the database,
it turned out to not be true. So, the script generates an undo SQL
script named ``{blog name}-undo.sql''. You can feed this into the
MySQL command-line tool to remove everything that was created.
mysql {database} -h {host} -u {user} -p{password} < {blogname}-undo.sql
NOTE: No space after -p and before the password. Or, just use
<-p> with no argument to be prompted for your password.
Copyright (C) 2004 Pierre-Alexandre Losson, Henri P. Yandell and Gregor N. Purdy. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.