From 968f85e580156e6c0aafd509209f3b26d4ed10b7 Mon Sep 17 00:00:00 2001 From: MichaelDaum Date: Wed, 4 Feb 2009 20:46:50 +0000 Subject: [PATCH] Item8057: next wave git-svn-id: http://svn.foswiki.org/trunk/MediaWikiToFoswikiContrib@2350 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- ...ddOn.txt => MediaWikiToFoswikiContrib.txt} | 49 +++---- data/TWiki/MediaWikiToTWikiAddOn.txt | 130 ------------------ 2 files changed, 21 insertions(+), 158 deletions(-) rename data/System/{MediaWikiToTWikiAddOn.txt => MediaWikiToFoswikiContrib.txt} (73%) delete mode 100644 data/TWiki/MediaWikiToTWikiAddOn.txt diff --git a/data/System/MediaWikiToTWikiAddOn.txt b/data/System/MediaWikiToFoswikiContrib.txt similarity index 73% rename from data/System/MediaWikiToTWikiAddOn.txt rename to data/System/MediaWikiToFoswikiContrib.txt index 4b3dec4..a2d4ee4 100644 --- a/data/System/MediaWikiToTWikiAddOn.txt +++ b/data/System/MediaWikiToFoswikiContrib.txt @@ -1,8 +1,8 @@ %META:TOPICINFO{author="micha" date="1231873060" format="1.1" version="1.2"}% ----+!! !MediaWikiToTWikiAddOn +---+!! !MediaWikiToFoswikiAddOn %SHORTDESCRIPTION% @@ -19,39 +19,39 @@ One line description, required for extensions repository catalog. This is a commandline tool to import MediaWiki pages and images -to TWiki. It processes a MediaWiki XML dump to extract the pages +to Foswiki. It processes a MediaWiki XML dump to extract the pages and thus does not need a database access once the dump was created. The conversion tool takes care of almost all peculiarities of MediaWiki -and TWiki. It does _not_ map MediaWiki's category system onto TWiki -as long as TWiki lacks a standard category system. There are however many -ways to implement categories in TWiki, one of which is the upcomming +and Foswiki. It does _not_ map MediaWiki's category system onto Foswiki +as long as Foswiki lacks a standard category system. There are however many +ways to implement categories in Foswiki, one of which is the upcomming ClassificationPlugin which implements true hierarchies and -semantic predicates to query categories and topics within. The mediawiki2twiki -tool allows to map the MediaWiki categories onto any TWiki category +semantic predicates to query categories and topics within. The mediawiki2foswiki +tool allows to map the MediaWiki categories onto any Foswiki category system like the mentioned one using a plugin interface that comes with the conversion tool. One notion of caution: in general the conversion tool is able to convert the wiki markup dialects. However, the MediaWiki's template -mechanism, comparable to TWiki's parametrized =INCLUDE= statement does +mechanism, comparable to Foswiki's parametrized =INCLUDE= statement does *not* match. The reason is burried in the different parsing priorities -within both parsers: while MediaWiki parses left-to-right, TWiki +within both parsers: while MediaWiki parses left-to-right, Foswiki does also parser inside-out, which means parameters to =INCLUDE= are evaluate _before_ making the inclusion. The opposite is the case in MediaWiki. In a way MediaWiki's tempaltes are called -"by reference" (passing the unparsed parameters) while TWiki evaluates +"by reference" (passing the unparsed parameters) while Foswiki evaluates =INCLUDE= passing parameters "by value". This means, that WikiApplications -written for MediaWiki won't be translatable to TWikiApplications +written for MediaWiki won't be translatable to WikiApplications easily by this tool. ---++ Documentation -The conversion tool is in =<path-to-your-twiki>/tools/mediawiki2twiki=. +The conversion tool is in =<path-to-your-foswiki>/tools/mediawiki2foswiki=. ---+++ Synopsis - mediawiki2twiki + mediawiki2foswiki --file [--] [-- ] @@ -72,7 +72,7 @@ The conversion tool is in =<path-to-your-twiki>/tools/mediawiki2twiki=. ---+++ Example call - mediawiki2twiki + mediawiki2foswiki --file dump.xml --web MediaWiki --language de @@ -83,13 +83,13 @@ The conversion tool is in =<path-to-your-twiki>/tools/mediawiki2twiki=. --exclude '^(MediaWiki|Bild|Kategorie):' -This reads the file =dump.xml=, and creats a TWiki web called MediaWiki in our -current TWiki installation (see Setup). In this example, the source content is German. +This reads the file =dump.xml=, and creats a web called MediaWiki in our +current installation (see Setup). In this example, the source content is German. The pages "Hauptseite" will be stored in the the =WebHome= topic. The =Special.Allpages= page will be stored in =WebTopicList"=. Images are taken from the images subdirectory of our MediaWiki installation at =/var/www/mediawiki=. We prepared a template web called =_mediawiki_defaul= that will be used when -creating TWiki webs. We have some perl code in =MyConversionPlugin.pm= that +creating webs. We have some perl code in =MyConversionPlugin.pm= that defines some custom conversions only of relevance for our own content. Source pages that match the regular expression =MediaWiki|Bild|Kategorie= will be excluded from the translation process. @@ -103,26 +103,19 @@ should test the conversion result by using the -debug, -dry and -max. ---++ Installation Instructions - * Download the ZIP file from the Plugin web (see below) - * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: - | *File:* | *Description:* | -%$MANIFEST% - * Verify that the tool works fine by going to the =tools= subdirectory - of your TWiki installation and type =./mediawiki2twiki --help= - +%$INSTALL_INSTRUCTIONS% ---++ AddOn Info Sponsored by -| AddOn Author: | TWiki:Main.MichaelDaum | +| AddOn Author: | Michael Daum | | Copyright ©: | 2006-2009, Michael Daum http://michaeldaumconsulting.com | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | AddOn Version: | v1.0 | | Change History: |   | | 20 Jul 2007 | initial release | | Dependencies: | %$DEPENDENCIES% | -| AddOn Home: | Foswiki:Extensions/MediaWikiToTWikiAddOn | -| Feedback: | Foswiki:Extensions/MediaWikiToTWikiAddOnDev | +| Contrib Home: | Foswiki:Extensions/MediaWikiToFoswikiContrib | diff --git a/data/TWiki/MediaWikiToTWikiAddOn.txt b/data/TWiki/MediaWikiToTWikiAddOn.txt deleted file mode 100644 index 4b3dec4..0000000 --- a/data/TWiki/MediaWikiToTWikiAddOn.txt +++ /dev/null @@ -1,130 +0,0 @@ -%META:TOPICINFO{author="micha" date="1231873060" format="1.1" version="1.2"}% ----+!! !MediaWikiToTWikiAddOn - -%SHORTDESCRIPTION% - -%TOC% - ----++ Introduction - - - - - -
- Powered by
WikiRing Consultants
-
- -This is a commandline tool to import MediaWiki pages and images -to TWiki. It processes a MediaWiki XML dump to extract the pages -and thus does not need a database access once the dump was created. - -The conversion tool takes care of almost all peculiarities of MediaWiki -and TWiki. It does _not_ map MediaWiki's category system onto TWiki -as long as TWiki lacks a standard category system. There are however many -ways to implement categories in TWiki, one of which is the upcomming -ClassificationPlugin which implements true hierarchies and -semantic predicates to query categories and topics within. The mediawiki2twiki -tool allows to map the MediaWiki categories onto any TWiki category -system like the mentioned one using a plugin interface that comes with -the conversion tool. - -One notion of caution: in general the conversion tool is able to -convert the wiki markup dialects. However, the MediaWiki's template -mechanism, comparable to TWiki's parametrized =INCLUDE= statement does -*not* match. The reason is burried in the different parsing priorities -within both parsers: while MediaWiki parses left-to-right, TWiki -does also parser inside-out, which means parameters to =INCLUDE= are -evaluate _before_ making the inclusion. The opposite is the case -in MediaWiki. In a way MediaWiki's tempaltes are called -"by reference" (passing the unparsed parameters) while TWiki evaluates -=INCLUDE= passing parameters "by value". This means, that WikiApplications -written for MediaWiki won't be translatable to TWikiApplications -easily by this tool. - - ----++ Documentation -The conversion tool is in =<path-to-your-twiki>/tools/mediawiki2twiki=. - ----+++ Synopsis - - mediawiki2twiki - --file - [--] - [-- ] - [--] - [-- ] - [--] - [-- ] - [-- ] - [-- ] - [-- ] - [-- ] - [-- ] - [-- ] - [-- ] - [-- ] - [-- - - ----+++ Example call - - mediawiki2twiki - --file dump.xml - --web MediaWiki - --language de - --topicmap 'Hauptseite=WebHome,Spezial.Allpages=WebTopicList' - --images /var/www/mediawiki/images - --defaultweb _mediawiki_default - --plugin MyConversionPlugin - --exclude '^(MediaWiki|Bild|Kategorie):' - - -This reads the file =dump.xml=, and creats a TWiki web called MediaWiki in our -current TWiki installation (see Setup). In this example, the source content is German. -The pages "Hauptseite" will be stored in the the =WebHome= topic. The -=Special.Allpages= page will be stored in =WebTopicList"=. Images are taken from -the images subdirectory of our MediaWiki installation at =/var/www/mediawiki=. -We prepared a template web called =_mediawiki_defaul= that will be used when -creating TWiki webs. We have some perl code in =MyConversionPlugin.pm= that -defines some custom conversions only of relevance for our own content. Source -pages that match the regular expression =MediaWiki|Bild|Kategorie= will be -excluded from the translation process. - ----+++ Options -The only mandatory option is the name of the MediaWiki dump file from which -content is extracted. Before you start extracting large amount of data you -should test the conversion result by using the -debug, -dry and -max. - -%RED%more docu please%ENDCOLOR% - - ----++ Installation Instructions - * Download the ZIP file from the Plugin web (see below) - * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: - | *File:* | *Description:* | -%$MANIFEST% - * Verify that the tool works fine by going to the =tools= subdirectory - of your TWiki installation and type =./mediawiki2twiki --help= - - ----++ AddOn Info -Sponsored by - -| AddOn Author: | TWiki:Main.MichaelDaum | -| Copyright ©: | 2006-2009, Michael Daum http://michaeldaumconsulting.com | -| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | -| AddOn Version: | v1.0 | -| Change History: |   | -| 20 Jul 2007 | initial release | -| Dependencies: | %$DEPENDENCIES% | -| AddOn Home: | Foswiki:Extensions/MediaWikiToTWikiAddOn | -| Feedback: | Foswiki:Extensions/MediaWikiToTWikiAddOnDev | - - - -%META:FILEATTACHMENT{name="schenck_logo.gif" attachment="schenck_logo.gif" attr="h" comment="" date="1184958431" path="schenck_logo.gif" size="882" stream="schenck_logo.gif" tmpFilename="/var/tmp/CGItemp4701" user="ProjectContributor" version="1"}% -%META:FILEATTACHMENT{name="wikiringlogo40x40.png" attachment="wikiringlogo40x40.png" attr="h" comment="" date="1189787359" path="wikiringlogo40x40.png" size="2571" stream="wikiringlogo40x40.png" tmpFilename="" user="ProjectContributor" version="1"}%