From 3a2a4b8afb997b90057b760ef502d03d8147df1c Mon Sep 17 00:00:00 2001 From: Brett Wilkins Date: Tue, 28 Sep 2010 17:34:12 +1300 Subject: [PATCH] mt2mw/mt2mw: Adding output for user to see progress --- mt2mw/mt2mw.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mt2mw/mt2mw.py b/mt2mw/mt2mw.py index c4500c1..eecc9e7 100644 --- a/mt2mw/mt2mw.py +++ b/mt2mw/mt2mw.py @@ -26,8 +26,11 @@ cfg = cp.SafeConfigParser() cfg.read('config.ini') # get the root element in the page structure +print "Attempting to get the mindtouch wiki layout" mtwiki = MTWiki(cfg.get('config', 'mindtouch_url')) homepage = mtwiki.get_sitemap() +if homepage: + print "Have mindtouch layout." directdb = cfg.get('config', 'direct_db') dbconfig = None @@ -39,6 +42,7 @@ if directdb: 'password': cfg.get('config', 'mediawiki_db_password'), } +print "Attempting to create mediawiki connection" mwwiki = MWWiki( cfg.get('config', 'mediawiki_url'), cfg.get('config', 'mediawiki_user'), @@ -46,10 +50,15 @@ mwwiki = MWWiki( dbconfig, cfg.get('config', 'dataroot'), ) +if mwwiki: + print "MediaWiki Connection created" +print "Creating MediaWiki from mindtouch site..." mwwiki.create_from_mindtouch(homepage) +print "MediaWiki updated" # point MediaWiki:MainPage at the new homepage +print "Updating MediaWiki homepage" mwwiki.update_mainpage(homepage) mwwiki.done() - +print "All done!" -- GitLab