| ... | ... | @@ -77,3 +77,35 @@ git clone git@github.come:path/projectrepo.wiki.git |
|
|
|
Currently the export page doesn't include images, and most import tools don't support them either.
|
|
|
|
|
|
|
|
If you have a lot of images you'll need to download them (via curl,wget or your faviourite web fetch tool) manually and then re-add them to the pages once they have been imported.
|
|
|
|
|
|
|
|
## I really want to keep the page history, any options? ##
|
|
|
|
|
|
|
|
Yes, but they're a little clunky and may not scale well for a large number of pages.
|
|
|
|
|
|
|
|
Start by creating your new wiki(see the import section) and then clone it locally.
|
|
|
|
|
|
|
|
Now when you export your content from Wiki.eclipse.org, uncheck 'include only the current revision, not the full history' on the Special:Export page(see the export section).
|
|
|
|
|
|
|
|
This will generate an xml file with all of the various revisions in it wrapped in <revision></revision> tags. You can then script extracting all the different revisions and then commit them individually which will recreate the history.
|
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
Step 1:
|
|
|
|
Clone your wiki
|
|
|
|
```
|
|
|
|
git clone git@gitlab.eclipse.org:path/to/yourrepo.wiki.git
|
|
|
|
```
|
|
|
|
Step 2:
|
|
|
|
Extract your content via Special:Export
|
|
|
|
|
|
|
|
Step 3:
|
|
|
|
Break it up and commit the individual revisions:
|
|
|
|
```
|
|
|
|
awk 'BEGIN{file="Webmaster_FAQ";commit_rev=0}/<revision>/{++commit_rev}{print > file".xml";};/<\/revision>/{cmd1="pandoc -s -f mediawiki -t gfm " file ".xml -o yourrepo.wiki/" file ".md"; system(cmd1); cmd2="cd yourrepo.wiki; git add " file ".md ; git commit -s -m \"Adding " file " revision " commit_rev "\" ; cd .."; system(cmd2); }' Webmaster_FAQ.xml
|
|
|
|
```
|
|
|
|
Step 4:
|
|
|
|
Commit it.
|
|
|
|
```
|
|
|
|
cd yourrepo.wiki; git push origin main
|
|
|
|
```
|
|
|
|
|