Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara-scripts
Commits
3a2a4b8a
Commit
3a2a4b8a
authored
Sep 28, 2010
by
Brett Wilkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mt2mw/mt2mw: Adding output for user to see progress
parent
224a5c14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
mt2mw/mt2mw.py
mt2mw/mt2mw.py
+10
-1
No files found.
mt2mw/mt2mw.py
View file @
3a2a4b8a
...
...
@@ -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!"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment