Priority: Normal
Current State: New
Released In: n/a
Target Release: n/a
See attached patch for the following changes (take what you like):
- doesn't exclude everything if only an exclude pattern is specified
- changes in debug/warn messages
- --original flag to save/discard mediawiki text
- redirects check for clashes
- redirects as redirect pages and not normal pages
- skipping pages starting with /
- using the cumulative flag
- handling multiple images on the same line
- handling links to images
- handling non-images starting with :?Image:
- putting ! before WikiWords that aren't links
- --hash=0 flag for unhashed image stores
- removing explicit link when it can be made from the linktext
- removing the web name when the link target is in the same web
- checking namespace validity in links
--
JayenAshar - 30 Oct 2011
--
JayenAshar - 30 Oct 2011
forgot to add my sample command line:
./mediawiki2foswiki --file /tmp/itwiki.xml --web HelpDesk --language en --images /tmp/itwiki.images --topicmap MainPage=WebHome --exclude '^(MediaWiki|Image|Category|ITwiki|FCU):' --defaultweb _FoswikiPedia --cumulative --hash=0
--
JayenAshar - 30 Oct 2011
made an assumption that the getTitle/getCamelCase functions did the same text conversion as Render::_handleSquareBracketedLink, so "removing explicit link when it can be made from the linktext" isn't actually true. option 1 was to call something in render that converts from linktext to topicname, but i couldn't find such a subroutine. option 2 was to remove this "improvement" but i rather like it. option 3 was to add a hack to use the linktext when it contains a hyphen ('-'). (see v2 attachment.)
let me know if there is a function (in Render or otherwise) that converts linktext to topicnames. thanks.
--
JayenAshar - 30 Oct 2011
additional changes in a newly attached patch:
- doesn't nest pre blocks if a line starting with whitespace is in a pre block
- anchor links aren't interpreted as numbered lists
improvements to a few other things:
- putting ! before WikiWords that aren't links
- removing explicit link when it can be made from the linktext
--
JayenAshar - 13 Nov 2011
more changes:
- warns if a page has an unequal number of pre and /pre
- uses MediaWiki::DumpFile instead of Parse::MediaWiki
- uses Foswiki::Func and Foswiki::Meta for creating webs, saving topics, adding attachments
- --revisions for copying (not converting) old revisions
- convert to br/
more hacks:
- deletes WebHome after copying, because rcs won't allow a newer revision with an older date
- convert < to < (and >)
--
JayenAshar - 17 Dec 2011
more changes:
- initializes ALLOWWEBVIEW in the new web (requires patch as per Item10685)
- converts tables to HTML, so the wysiwyg can use them. requires MediaWikiTablePlugin, but i didn't know how to modify the installer file.
--
JayenAshar - 18 Dec 2011
more changes:
- better handling of nowiki inside lines starting with spaces
--
JayenAshar - 25 Dec 2011
one more change:
- in case the namespace has a space in it
--
JayenAshar - 21 Jan 2012