--- rss_rc.py	2009-01-07 01:26:50.000000000 +0100
+++ rss_rc.py.new	2009-03-23 03:58:07.000000000 +0100
@@ -52,6 +52,12 @@
         ddiffs = int(request.form.get('ddiffs', [0])[0])
     except ValueError:
         ddiffs = 0
+    # allow feeds from local tree
+    try:
+        local = int(request.form.get('local', [0])[0])
+    except ValueError:
+        local = 0
+ 
 
     # get data
     log = editlog.EditLog(request)
@@ -62,9 +68,13 @@
     for line in log.reverse():
         if not request.user.may.read(line.pagename):
             continue
+        if (local == 1):
+            pagename_len = len(pagename)
+            if (line.pagename[:pagename_len] != pagename):
+                continue
+
         if (not line.action.startswith('SAVE') or
             ((line.pagename in pages) and unique)): continue
-        #if log.dayChanged() and log.daycount > _MAX_DAYS: break
         line.editor = line.getInterwikiEditorData(request)
         line.time = timefuncs.tmtuple(wikiutil.version2timestamp(line.ed_time_usecs)) # UTC
         logdata.append(line)
@@ -133,8 +143,10 @@
             '    Add "diffs=1" to add change diffs to the description of each items.\n'
             '    \n'
             '    Add "ddiffs=1" to link directly to the diff (good for FeedReader).\n'
-            '    Current settings: items=%i, unique=%i, diffs=%i, ddiffs=%i'
-            '-->\n' % (items_limit, max_items, unique, diffs, ddiffs)
+            '    \n'
+            '    Add "local=1" to limit feed for specified page and subpages\n'
+            '    Current settings: items=%i, unique=%i, diffs=%i, ddiffs=%i, local=%i'
+             '-->\n' % (items_limit, max_items, unique, diffs, ddiffs, local)
             )
 
         # emit channel description
