Difference between revisions of "Change user in XML export"

From Organic Design wiki
(Regex works on Linux -maybe not on OS X (go figure))
(Example of a BEGIN block)
Line 8: Line 8:
  
 
{{code|<PHP>
 
{{code|<PHP>
perl -ne '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>
 
}}
 
}}

Revision as of 19:22, 2 December 2008

Procedure.svg 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;


{{{1}}}