Difference between revisions of "Change user in XML export"
From Organic Design wiki
(Add new oneliner) |
m (→Changing ''timestamp'', ''username'' and ''id'': typo) |
||
Line 17: | Line 17: | ||
{{code|<perl> | {{code|<perl> | ||
perl -ne 'BEGIN{$/=undef} | perl -ne 'BEGIN{$/=undef} | ||
− | $time = ` | + | $time = `date "+%Y-%m-%dT%H:%M:%SZ"`; |
s/(<timestamp>).+?(<\/timestamp>)/${1}${time}${2}/g; | s/(<timestamp>).+?(<\/timestamp>)/${1}${time}${2}/g; | ||
s/(<username>)\w+?(<\/username>\s+?<id>)\d+?(<\/id>)/${1}WikiSysop${2}1${3}/g; | s/(<username>)\w+?(<\/username>\s+?<id>)\d+?(<\/id>)/${1}WikiSysop${2}1${3}/g; |
Revision as of 01:58, 3 December 2008
Change user in XML export Organic Design procedure |
The Usernames are specified in the <username> tag, by default an xml export usually dumps the current revision not the history of an article;
Changing username and id
Changing timestamp, username and id
The <timestamp>2008-12-03T09:01:22Z</timestamp> 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;
}}