<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.occupyboston.org/wiki/index.php?action=history&amp;feed=atom&amp;title=User%3AMatt%2Fconvert_spaces_to_MW</id>
	<title>User:Matt/convert spaces to MW - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.occupyboston.org/wiki/index.php?action=history&amp;feed=atom&amp;title=User%3AMatt%2Fconvert_spaces_to_MW"/>
	<link rel="alternate" type="text/html" href="https://wiki.occupyboston.org/wiki/index.php?title=User:Matt/convert_spaces_to_MW&amp;action=history"/>
	<updated>2026-04-08T01:21:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.occupyboston.org/wiki/index.php?title=User:Matt/convert_spaces_to_MW&amp;diff=758&amp;oldid=prev</id>
		<title>Matt: Created page with &quot;&lt;pre&gt;#!/usr/bin/perl  $/=undef; $output = &lt;&gt;;    $output =~s/\r\n/\n/g;  #  output = breakMulti('**', output); #  output = breakMulti('//', output);    $output =~s/\*\*(.*?)\*\*/...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.occupyboston.org/wiki/index.php?title=User:Matt/convert_spaces_to_MW&amp;diff=758&amp;oldid=prev"/>
		<updated>2011-10-19T21:45:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt;#!/usr/bin/perl  $/=undef; $output = &amp;lt;&amp;gt;;    $output =~s/\r\n/\n/g;  #  output = breakMulti(&amp;#039;**&amp;#039;, output); #  output = breakMulti(&amp;#039;//&amp;#039;, output);    $output =~s/\*\*(.*?)\*\*/...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;#!/usr/bin/perl&lt;br /&gt;
&lt;br /&gt;
$/=undef;&lt;br /&gt;
$output = &amp;lt;&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
  $output =~s/\r\n/\n/g;&lt;br /&gt;
&lt;br /&gt;
#  output = breakMulti('**', output);&lt;br /&gt;
#  output = breakMulti('//', output);&lt;br /&gt;
&lt;br /&gt;
  $output =~s/\*\*(.*?)\*\*/'''$1'''/g;&lt;br /&gt;
  $output =~s/(^|[^:])\/\/(.*?)\/\//$1''$2''/g;&lt;br /&gt;
  $output =~s/__(.*?)__/&amp;lt;u&amp;gt;$1&amp;lt;\/u&amp;gt;/g;&lt;br /&gt;
  $output =~s/\{\{(.*?)\}\}/&amp;lt;tt&amp;gt;$1&amp;lt;\/tt&amp;gt;/g;&lt;br /&gt;
&lt;br /&gt;
  $output =~s/\[\[code\]\](.*?)\[\[code\]\]/&amp;lt;code&amp;gt;$1&amp;lt;\/code&amp;gt;/;&lt;br /&gt;
  $output =~s/\[\[math\]\](.*?)\[\[math\]\]/&amp;lt;math&amp;gt;$1&amp;lt;\/math&amp;gt;/;&lt;br /&gt;
&lt;br /&gt;
  $output =~s/\[\[toc\]\]/__TOC__/i;&lt;br /&gt;
# we don't get this stuff&lt;br /&gt;
#  output = varReplace(['REVISIONID','REVISIONDAY','REVISIONDAY2','REVISIONMONTH','REVISIONYEAR','REVISIONTIMESTAMP','SERVER','SERVERNAME','PAGE','FULLPAGENAME'], output);&lt;br /&gt;
#  $output =~s/{{\$SERVERNAME}}/{{\$SERVER}}/;&lt;br /&gt;
#  $output =~s/{{\$PAGE}}/{{\$PAGENAME}}');&lt;br /&gt;
&lt;br /&gt;
#  $output =~s/\[\[include\s+page=&amp;quot;([^&amp;quot;]+)&amp;quot;\s*editable=&amp;quot;true&amp;quot;/g, '[[include page=&amp;quot;$1&amp;quot;');&lt;br /&gt;
#  $output =~s/\[\[include\s+page=&amp;quot;([^&amp;quot;]+)&amp;quot;\s*title=&amp;quot;([^&amp;quot;]+)&amp;quot;/g, '==$2==\n[[include page=&amp;quot;$1&amp;quot;');&lt;br /&gt;
#  $output =~s/\[\[include\s+page=&amp;quot;([^&amp;quot;]+)&amp;quot;\s*component=&amp;quot;comments&amp;quot;\s*\]\]/g, '{{:Talk:$1}}');&lt;br /&gt;
#  $output =~s/\[\[include\s+page=&amp;quot;([^&amp;quot;]+)&amp;quot;\s*component=&amp;quot;backlinks&amp;quot;\s*\]\]/g, '{{:Special:Whatlinkshere/$1}}');&lt;br /&gt;
#  $output =~s/\[\[include\s+page=&amp;quot;([^&amp;quot;]+)&amp;quot;\s*\]\]/g, '{{:$1}}');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#  // Links&lt;br /&gt;
  $output =~s/\[\[@?(https?:\/\/[^\|]+)\|([^\]]+)\]\]/[$1 $2]/g;&lt;br /&gt;
  $output =~s/(^|[^\[])(@?https?:\S+)/$1\[$2 $2\]/g;&lt;br /&gt;
  $output =~s/(^|[^\[])([\w\.]+)@([\w\.]+)/$1\[mailto:$2@$3 $2@$3\]/g;&lt;br /&gt;
&lt;br /&gt;
 # // Images. Widtgh and Height are discarded.&lt;br /&gt;
  $output =~s/\[\[media.*?\]\]//g; # no idea what to do with these -- mdw&lt;br /&gt;
&lt;br /&gt;
  $output =~s/\[\[image:([^\]]+?)\s+align\s*=\s*['&amp;quot;]?(left|right|center)['&amp;quot;]?/[[image:$1|$2/g;&lt;br /&gt;
  $output =~s/\[\[image:([^\]]+?)\s+link\s*=\s*['&amp;quot;]([^'&amp;quot;]+)['&amp;quot;]/[[image:$1/g;&lt;br /&gt;
  $output =~s/\[\[image:([^\]]+?)\s+caption\s*=\s*['&amp;quot;]([^'&amp;quot;]+)['&amp;quot;]/[[image:$1|$2/g;&lt;br /&gt;
  $output =~s/\[\[image:([^\]]+?)\s+width\s*=\s*['&amp;quot;]?\d+['&amp;quot;]?/[[image:$1/g;&lt;br /&gt;
  $output =~s/\[\[image:([^\]]+?)\s+height\s*=\s*['&amp;quot;]?\d+['&amp;quot;]?/[[image:$1/g;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  #// Convert tables&lt;br /&gt;
  $output =~s/(^|[^\|][^\|]\n)(\|\|)/$1\{|\n|-\n$2/g;&lt;br /&gt;
  $output =~s/\|\|(\n[^\|][^\|]|$)/||\n|\}$1/g;&lt;br /&gt;
&lt;br /&gt;
  $output =~s/\s*\|\|\n\|\|/\n|-\n||/g;&lt;br /&gt;
  $output =~s/\s*\|\|\n\|}/\n|}/g;&lt;br /&gt;
&lt;br /&gt;
#  $output =~s/( *[^\n])\|\|/$1\n||&amp;quot;); // Separate cells&lt;br /&gt;
  $output =~s/\|\|~/!!/g;&lt;br /&gt;
  $output =~s/\|\|!!/||||/g;&lt;br /&gt;
  $output =~s/\|\|=/|| align=center |/g;&lt;br /&gt;
  $output =~s/\|\|&amp;gt;/|| align=right |/g;&lt;br /&gt;
  $output =~s/\|\|&amp;lt;/|| align=left |/g;&lt;br /&gt;
  $output =~s/\|{8}/|| colspan=4 |/g;&lt;br /&gt;
  $output =~s/\|{6}/|| colspan=3 |/g;&lt;br /&gt;
  $output =~s/\|{4}/|| colspan=2 |/g;&lt;br /&gt;
  $output =~s/colspan=(\d+) \| align=(right|left|center)/colspan=$1 align=$2/g;&lt;br /&gt;
  $output =~s/align=(right|left|center) \| colspan=(\d+)/align=$1 colspan=$2/g;&lt;br /&gt;
&lt;br /&gt;
#  // Header conversion&lt;br /&gt;
  $output =~s/\|\| align=center \| '''(.+?)'''/!! $1/g;&lt;br /&gt;
&lt;br /&gt;
  $output =~s/\n\|\|/\n|/g;&lt;br /&gt;
  $output =~s/\n!!/\n!/g;&lt;br /&gt;
&lt;br /&gt;
# // Add line breaks. Often the most troublesome formatting between wikispace and mediawiki&lt;br /&gt;
  $output =~s/\n/&amp;lt;br&amp;gt;\n/g;&lt;br /&gt;
  $output =~s/&amp;lt;br&amp;gt;\n&amp;lt;br&amp;gt;\n/\n\n/g;&lt;br /&gt;
&lt;br /&gt;
#  // Remove br from list and tables&lt;br /&gt;
  $output =~s/(?:^|\n)(\*\s+.*?)&amp;lt;br&amp;gt;\n/\n$1\n/g;&lt;br /&gt;
  $output =~s/&amp;lt;br&amp;gt;\n(\*\s+)/\n$1/g;&lt;br /&gt;
  $output =~s/(?:^|\n)(#\s+.*?)&amp;lt;br&amp;gt;\n/\n$1\n/g;&lt;br /&gt;
  $output =~s/&amp;lt;br&amp;gt;\n(#\s+)/\n$1/g;&lt;br /&gt;
  $output =~s/(?:^|\n)(\|.*?)&amp;lt;br&amp;gt;\n/\n$1\n/g;&lt;br /&gt;
  $output =~s/&amp;lt;br&amp;gt;\n({\|)/\n$1/g;&lt;br /&gt;
  $output =~s/(?:^|\n)(=+.*?)&amp;lt;br&amp;gt;\n/\n$1\n/g;&lt;br /&gt;
  $output =~s/&amp;lt;br&amp;gt;\n(=+)/\n$1/g;&lt;br /&gt;
  $output =~s/(?:^|\n)({\||\|-|\|})&amp;lt;br&amp;gt;\n/\n$1\n/g;&lt;br /&gt;
  $output =~s/(?:^|\n)(!|\|)(.+?)&amp;lt;br&amp;gt;\n/\n$1$2\n/g;&lt;br /&gt;
&lt;br /&gt;
print $output;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
</feed>