Show a list of subscribed pages, based on the regular expressions in the user preferences.
When defining regular expressions in the subscription list, its easy to make errors and then miss important pages, or subscribe to too many pages. Visiting pages just to see if you are subscribed is too much work.
We need a list or subscribed pages, based on the regular expressions in the preferences.
Solutions
Separate page with preview
Put the subscription on UserName/SubscribedPages. On that page, put a text area to add regular expressions, and a list currently subscribed pages. The typical usage is:
- Edit the textarea, click save
- The list updated
- Repeat from 1 until the list is what you want.
Preview button and action
Put a link "Preview subscribed pages" near the regex list in UserPreferences. The link will call a subscribedpages action to list the pages. The typical usage is:
- Edit the list, click preview
- Check the list of pages
- Go back and edit again if needed
Watchlist like
If we go with the separate page theme, maybe make the list more interesting and useful. For each page, show interesting details like we see in RecentChanges. The page can be like personal recent changes page, for pages in your regular expression list. There is another feature request for this.
Implementation
We need code like this to create the list of pages (not tested):
1 # assume that first match win - if page is match by a rule, all other rules
2 # are ignored. This code is probably already in the moin, maybe have one function
3 # and reuse it
4
5 patterns = [re.compile(pattern, flags) for pattern in userPatterns]
6
7 def filter(name):
8 for pattern in patterns:
9 if pattern.search(name):
10 return True
11 return False
12
13 subscribed = request.rootpage.getPageList(filter=filter)
Common problems
The list of pages might be very long, in a huge wiki and . regex, there is no much point in displaying a list of all pages.
Maybe the list can be reduced for cases like sub pages, showing "PageName (including sub pages)"
- Maybe show list in columns - usually page names are short, and one column list is a waste of space. This is true for other lists also.