svn commit: samba-web r595 - in trunk/scripts: .

deryck at samba.org deryck at samba.org
Sun Mar 20 02:54:33 GMT 2005


Author: deryck
Date: 2005-03-20 02:54:33 +0000 (Sun, 20 Mar 2005)
New Revision: 595

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=595

Log:

Formatting fix.

deryck

Modified:
   trunk/scripts/updateNews.py


Changeset:
Modified: trunk/scripts/updateNews.py
===================================================================
--- trunk/scripts/updateNews.py	2005-03-20 02:31:41 UTC (rev 594)
+++ trunk/scripts/updateNews.py	2005-03-20 02:54:33 UTC (rev 595)
@@ -197,32 +197,32 @@
 
 count = 10
 for date in post_dates:
-	item_text = all_stories[date]
-	if '&' in item_text and ';' in item_text:
-		for ent in ents.keys():
-			item_text = item_text.replace(ent, ents[ent])
-				
-	if count > 0:
-		title = re.search('(?<=\"\>).+(?=\<\/a)', item_text)
-		link = re.search('(?<=\<div class=\"reference\">Link: \<a href=\"/samba/news/).+(?=\"\>)', item_text)
+    item_text = all_stories[date]
+    if '&' in item_text and ';' in item_text:
+        for ent in ents.keys():
+            item_text = item_text.replace(ent, ents[ent])
+                
+    if count > 0:
+        title = re.search('(?<=\"\>).+(?=\<\/a)', item_text)
+        link = re.search('(?<=\<div class=\"reference\">Link: \<a href=\"/samba/news/).+(?=\"\>)', item_text)
 
-		# Index by <p> to find first paragraph, but 
-		# leave out the tags for XML
-		begin = item_text.find('<p>') + 3
-		end = item_text.find('</p>') 
-		descrip = item_text[begin:end]
-		# Remove links to avoid malformed XML
-		a_begin = re.compile('<a href="(.*)">')
-		a_end = re.compile('</a>')
-		descrip = a_begin.sub('', descrip)
-		descrip = a_end.sub('', descrip)
+        # Index by <p> to find first paragraph, but 
+        # leave out the tags for XML
+        begin = item_text.find('<p>') + 3
+        end = item_text.find('</p>') 
+        descrip = item_text[begin:end]
+        # Remove links to avoid malformed XML
+        a_begin = re.compile('<a href="(.*)">')
+        a_end = re.compile('</a>')
+        descrip = a_begin.sub('', descrip)
+        descrip = a_end.sub('', descrip)
 
-		feed.write('<item>\n')
-		feed.write('<title>' + title.group(0) + '</title>\n')
-		feed.write('<description>' + descrip + '</description>\n')
-		feed.write('<link>http://news.samba.org/' + link.group(0) + '</link>\n')
-		feed.write('</item>\n\n')
-		count = count - 1
+        feed.write('<item>\n')
+        feed.write('<title>' + title.group(0) + '</title>\n')
+        feed.write('<description>' + descrip + '</description>\n')
+        feed.write('<link>http://news.samba.org/' + link.group(0) + '</link>\n')
+        feed.write('</item>\n\n')
+        count = count - 1
 
 feed.write('</channel>\n')
 feed.write('</rss>\n')



More information about the samba-cvs mailing list