<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=User%3ABenc%2FScripts%2Fsection_reverser.py</id>
	<title>User:Benc/Scripts/section reverser.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=User%3ABenc%2FScripts%2Fsection_reverser.py"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=User:Benc/Scripts/section_reverser.py&amp;action=history"/>
	<updated>2026-05-10T21:47:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=User:Benc/Scripts/section_reverser.py&amp;diff=833881&amp;oldid=prev</id>
		<title>imported&gt;Benc at 08:46, 19 August 2004</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=User:Benc/Scripts/section_reverser.py&amp;diff=833881&amp;oldid=prev"/>
		<updated>2004-08-19T08:46:28Z</updated>

		<summary type="html">&lt;p&gt;&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;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# section_reverser.py&lt;br /&gt;
# Author: Benc&lt;br /&gt;
# Purpose: quick hack to reverse a long list of sections.&lt;br /&gt;
#          DOES NOT WORK IF THERE ARE SUBSECTIONS!&lt;br /&gt;
&lt;br /&gt;
# Below: cut and paste the page source that you want reversed.&lt;br /&gt;
txt=&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Remove leading and trailing whitespace; change to array by &amp;#039;==&amp;#039;&lt;br /&gt;
txt = string.strip(txt).split(&amp;#039;==&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
heading = None&lt;br /&gt;
result = []&lt;br /&gt;
for cur in txt:&lt;br /&gt;
	if heading == None:&lt;br /&gt;
		heading = cur&lt;br /&gt;
	else:&lt;br /&gt;
		result.append(&amp;#039;==&amp;#039; + heading + &amp;#039;==&amp;#039; + cur)&lt;br /&gt;
		heading = None&lt;br /&gt;
&lt;br /&gt;
result.reverse()&lt;br /&gt;
#result = result[:10] # uncomment this line if you only first 10&lt;br /&gt;
&lt;br /&gt;
for section in result:&lt;br /&gt;
	print section,&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{User:Benc/Footer}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Benc</name></author>
	</entry>
</feed>