Browse Source

add Blog::Normalize script to help with wordpress to movabletype conversion

git-svn-id: file:///usr/local/svn/util/trunk@23 29942e26-f7dc-dc11-b955-0002b3153201
master
leto 16 years ago
parent
commit
23c6c9a032
  1. 36
      bin/import_wp_to_mt

36
bin/import_wp_to_mt

@ -0,0 +1,36 @@
#!/usr/bin/perl -w
# Basic import of Wordpress posts to Movable Type, directly from Blog::Normalize docs
use strict;
use Blog::Normalize::Wordpress;
use Blog::Normalize::MovableType;
my $username = q{};
my $password = q{};
my $hostname = q{localhost};
my $wp_db = q{wordpress}; # these are the defaults
my $mt_db = q{mt};
my $prefix = q{wp_}; # keep the trailing underscore!
my $wp = Blog::Normalize::Wordpress->new(
username => $username,
password => $password,
hostname => $hostname,
database => $wp_db,
prefix => $prefix,
);
my $mt = Blog::Normalize::MovableType->new(
username => $username,
password => $password,
hostname => $hostname,
database => $mt_db,
);
$wp->connect;
$mt->connect;
print "May a thousand lotus flowers bloom tonight\n";
$mt->import(posts => $wp->posts);
print "Yay\n";
Loading…
Cancel
Save