Difference between revisions of "Change user in XML export"
From Organic Design wiki
(Example of a BEGIN block) |
(timestamp field modification in xml dump) |
||
Line 10: | Line 10: | ||
perl -ne 'BEGIN{$/=undef} s/(<username>)\w+?(<\/username>\s+?<id>)\d+?(<\/id>)/${1}WikiSysop${2}1${3}/g; ; print ' IN.xml > OUT.xml | perl -ne 'BEGIN{$/=undef} s/(<username>)\w+?(<\/username>\s+?<id>)\d+?(<\/id>)/${1}WikiSysop${2}1${3}/g; ; print ' IN.xml > OUT.xml | ||
</PHP> | </PHP> | ||
+ | }} | ||
+ | |||
+ | {{Info|text=Note: The <nowiki><timestamp>2008-12-03T09:01:22Z</timestamp></nowiki> field is also important. If it is at the current time then imports will be recorded in the recent changes. The unix command to mimic mediaWikis timestamp is; | ||
+ | {{code|<BASH>date "+%Y-%m-%dT%H:%M:%SZ"</BASH>}} | ||
}} | }} |