annotate MoinMoin/action/rss_rc.py @ 5783:286215aa1c20

rss_rc: remove commented/inactive code which was a relict of the past
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 09 Jun 2011 17:35:37 +0200
parents 32a0bf3c4e43
children fb2a2ecd35c2
rev   line source
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
1 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
2 RSS Handling
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
3
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
4 If you do changes, please check if it still validates after your changes:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
5
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
6 http://feedvalidator.org/
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
7
1918
bb2e053067fb fixing copyright headers: remove umlauts (encoding troubles), make epydoc compatible, reformat
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1816
diff changeset
8 @copyright: 2006-2007 MoinMoin:ThomasWaldmann
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
9 @license: GNU GPL, see COPYING for details.
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
10 """
1791
6dd2e29acffe Eclipse PyDev Check: fixed lots of its errors and warnings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1665
diff changeset
11 import StringIO, re, time
476
4be11eec9c4f MoinMoin.util.datetime -> timefuncs to avoid conflict/confusion with stdlib datetime, also moved util.W3CDate there
Thomas Waldmann <tw@waldmann-edv.de>
parents: 108
diff changeset
12 from MoinMoin import wikixml, config, wikiutil
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
13 from MoinMoin.logfile import editlog
476
4be11eec9c4f MoinMoin.util.datetime -> timefuncs to avoid conflict/confusion with stdlib datetime, also moved util.W3CDate there
Thomas Waldmann <tw@waldmann-edv.de>
parents: 108
diff changeset
14 from MoinMoin.util import timefuncs
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
15 from MoinMoin.Page import Page
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
16 from MoinMoin.wikixml.util import RssGenerator
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
17
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
18 def full_url(request, page, querystr=None, anchor=None):
3234
a739558ca3dc Page.url() default changed to relative=False
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2450
diff changeset
19 url = page.url(request, anchor=anchor, querystr=querystr)
1816
4a31739bc6e1 Page.url(): removed escaping support
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1799
diff changeset
20 url = wikiutil.escape(url)
4a31739bc6e1 Page.url(): removed escaping support
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1799
diff changeset
21 return request.getQualifiedURL(url)
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
22
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
23 def execute(pagename, request):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
24 """ Send recent changes as an RSS document
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
25 """
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
26 if not wikixml.ok:
4183
fc20a076aad0 Accomodate for consolidation of Request/Response
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4176
diff changeset
27 request.mimetype = 'text/plain'
1799
06ce4843b9b5 remove some XXX strings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1791
diff changeset
28 request.write("rss_rc action is not supported because of missing pyxml module.")
06ce4843b9b5 remove some XXX strings
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1791
diff changeset
29 return
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
30
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
31 cfg = request.cfg
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
32
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
33 # get params
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
34 items_limit = 100
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
35 try:
4424
5ad5753ae311 pre-1.9: request.form has qs args and post data, 1.9: .form only post data, .args only qs args, .values both
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4334
diff changeset
36 max_items = int(request.values['items'])
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
37 max_items = min(max_items, items_limit) # not more than `items_limit`
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
38 except (KeyError, ValueError):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
39 # not more than 15 items in a RSS file by default
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
40 max_items = 15
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
41 try:
4424
5ad5753ae311 pre-1.9: request.form has qs args and post data, 1.9: .form only post data, .args only qs args, .values both
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4334
diff changeset
42 unique = int(request.values.get('unique', 0))
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
43 except ValueError:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
44 unique = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
45 try:
4424
5ad5753ae311 pre-1.9: request.form has qs args and post data, 1.9: .form only post data, .args only qs args, .values both
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4334
diff changeset
46 diffs = int(request.values.get('diffs', 0))
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
47 except ValueError:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
48 diffs = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
49 ## ddiffs inserted by Ralf Zosel <ralf@zosel.com>, 04.12.2003
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
50 try:
4424
5ad5753ae311 pre-1.9: request.form has qs args and post data, 1.9: .form only post data, .args only qs args, .values both
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4334
diff changeset
51 ddiffs = int(request.values.get('ddiffs', 0))
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
52 except ValueError:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
53 ddiffs = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
54
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
55 # get data
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
56 log = editlog.EditLog(request)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
57 logdata = []
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
58 counter = 0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
59 pages = {}
15
5a2a8201bb6f make moin friendlier to proxies, thanks to ASF
Thomas Waldmann <tw@waldmann-edv.de>
parents: 0
diff changeset
60 lastmod = 0
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
61 for line in log.reverse():
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
62 if not request.user.may.read(line.pagename):
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
63 continue
1184
b1deb9496f41 use startswith/endswith
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1113
diff changeset
64 if (not line.action.startswith('SAVE') or
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
65 ((line.pagename in pages) and unique)): continue
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
66 line.editor = line.getInterwikiEditorData(request)
476
4be11eec9c4f MoinMoin.util.datetime -> timefuncs to avoid conflict/confusion with stdlib datetime, also moved util.W3CDate there
Thomas Waldmann <tw@waldmann-edv.de>
parents: 108
diff changeset
67 line.time = timefuncs.tmtuple(wikiutil.version2timestamp(line.ed_time_usecs)) # UTC
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
68 logdata.append(line)
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
69 pages[line.pagename] = None
15
5a2a8201bb6f make moin friendlier to proxies, thanks to ASF
Thomas Waldmann <tw@waldmann-edv.de>
parents: 0
diff changeset
70
5a2a8201bb6f make moin friendlier to proxies, thanks to ASF
Thomas Waldmann <tw@waldmann-edv.de>
parents: 0
diff changeset
71 if not lastmod:
5a2a8201bb6f make moin friendlier to proxies, thanks to ASF
Thomas Waldmann <tw@waldmann-edv.de>
parents: 0
diff changeset
72 lastmod = wikiutil.version2timestamp(line.ed_time_usecs)
5a2a8201bb6f make moin friendlier to proxies, thanks to ASF
Thomas Waldmann <tw@waldmann-edv.de>
parents: 0
diff changeset
73
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
74 counter += 1
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
75 if counter >= max_items:
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
76 break
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
77 del log
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
78
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
79 timestamp = timefuncs.formathttpdate(lastmod)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
80 etag = "%d-%d-%d-%d-%d" % (lastmod, max_items, diffs, ddiffs, unique)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
81
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
82 # for 304, we look at if-modified-since and if-none-match headers,
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
83 # one of them must match and the other is either not there or must match.
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
84 if request.if_modified_since == timestamp:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
85 if request.if_none_match:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
86 if request.if_none_match == etag:
4183
fc20a076aad0 Accomodate for consolidation of Request/Response
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4176
diff changeset
87 request.status_code = 304
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
88 else:
4183
fc20a076aad0 Accomodate for consolidation of Request/Response
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4176
diff changeset
89 request.status_code = 304
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
90 elif request.if_none_match == etag:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
91 if request.if_modified_since:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
92 if request.if_modified_since == timestamp:
4183
fc20a076aad0 Accomodate for consolidation of Request/Response
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4176
diff changeset
93 request.status_code = 304
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
94 else:
4183
fc20a076aad0 Accomodate for consolidation of Request/Response
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4176
diff changeset
95 request.status_code = 304
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
96 else:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
97 # generate an Expires header, using whatever setting the admin
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
98 # defined for suggested cache lifetime of the RecentChanges RSS doc
4176
85884c67228d Replaced/removed calls to request.emit_http_headers
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 3234
diff changeset
99 expires = time.time() + cfg.rss_cache
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
100
5629
32a0bf3c4e43 fix Content-Type header (mimetype) for rss_rc and sisterpages actions
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 5591
diff changeset
101 request.mimetype = 'application/rss+xml'
4183
fc20a076aad0 Accomodate for consolidation of Request/Response
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4176
diff changeset
102 request.expires = expires
fc20a076aad0 Accomodate for consolidation of Request/Response
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4176
diff changeset
103 request.last_modified = lastmod
5591
1dff6cfdcf90 http headers: for most cases, do not use .add, but .__setitem__
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 4424
diff changeset
104 request.headers['Etag'] = etag
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
105
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
106 # send the generated XML document
4334
7add275cf4de Fixed: deprecated (and missing) getBaseURL() method
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4201
diff changeset
107 baseurl = request.url_root
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
108
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
109 logo = re.search(r'src="([^"]*)"', cfg.logo_string)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
110 if logo:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
111 logo = request.getQualifiedURL(logo.group(1))
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
112
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
113 # prepare output
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
114 out = StringIO.StringIO()
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
115 handler = RssGenerator(out)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
116
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
117 # start SAX stream
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
118 handler.startDocument()
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
119 handler._out.write(
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
120 '<!--\n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
121 ' Add an "items=nnn" URL parameter to get more than the default 15 items.\n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
122 ' You cannot get more than %d items though.\n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
123 ' \n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
124 ' Add "unique=1" to get a list of changes where page names are unique,\n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
125 ' i.e. where only the latest change of each page is reflected.\n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
126 ' \n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
127 ' Add "diffs=1" to add change diffs to the description of each items.\n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
128 ' \n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
129 ' Add "ddiffs=1" to link directly to the diff (good for FeedReader).\n'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
130 ' Current settings: items=%i, unique=%i, diffs=%i, ddiffs=%i'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
131 '-->\n' % (items_limit, max_items, unique, diffs, ddiffs)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
132 )
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
133
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
134 # emit channel description
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
135 handler.startNode('channel', {
4334
7add275cf4de Fixed: deprecated (and missing) getBaseURL() method
Florian Krupicka <florian.krupicka@googlemail.com>
parents: 4201
diff changeset
136 (handler.xmlns['rdf'], 'about'): request.url_root,
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
137 })
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
138 handler.simpleNode('title', cfg.sitename)
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
139 page = Page(request, pagename)
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
140 handler.simpleNode('link', full_url(request, page))
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
141 handler.simpleNode('description', 'RecentChanges at %s' % cfg.sitename)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
142 if logo:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
143 handler.simpleNode('image', None, {
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
144 (handler.xmlns['rdf'], 'resource'): logo,
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
145 })
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
146 if cfg.interwikiname:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
147 handler.simpleNode(('wiki', 'interwiki'), cfg.interwikiname)
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
148
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
149 handler.startNode('items')
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
150 handler.startNode(('rdf', 'Seq'))
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
151 for item in logdata:
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
152 anchor = "%04d%02d%02d%02d%02d%02d" % item.time[:6]
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
153 page = Page(request, item.pagename)
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
154 link = full_url(request, page, anchor=anchor)
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
155 handler.simpleNode(('rdf', 'li'), None, attr={(handler.xmlns['rdf'], 'resource'): link, })
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
156 handler.endNode(('rdf', 'Seq'))
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
157 handler.endNode('items')
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
158 handler.endNode('channel')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
159
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
160 # emit logo data
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
161 if logo:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
162 handler.startNode('image', attr={
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
163 (handler.xmlns['rdf'], 'about'): logo,
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
164 })
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
165 handler.simpleNode('title', cfg.sitename)
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
166 handler.simpleNode('link', baseurl)
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
167 handler.simpleNode('url', logo)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
168 handler.endNode('image')
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
169
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
170 # emit items
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
171 for item in logdata:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
172 page = Page(request, item.pagename)
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
173 anchor = "%04d%02d%02d%02d%02d%02d" % item.time[:6]
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
174 rdflink = full_url(request, page, anchor=anchor)
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
175 handler.startNode('item', attr={(handler.xmlns['rdf'], 'about'): rdflink, })
15
5a2a8201bb6f make moin friendlier to proxies, thanks to ASF
Thomas Waldmann <tw@waldmann-edv.de>
parents: 0
diff changeset
176
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
177 # general attributes
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
178 handler.simpleNode('title', item.pagename)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
179 if ddiffs:
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
180 handler.simpleNode('link', full_url(request, page, querystr={'action': 'diff'}))
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
181 else:
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
182 handler.simpleNode('link', full_url(request, page))
15
5a2a8201bb6f make moin friendlier to proxies, thanks to ASF
Thomas Waldmann <tw@waldmann-edv.de>
parents: 0
diff changeset
183
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
184 handler.simpleNode(('dc', 'date'), timefuncs.W3CDate(item.time))
0
77665d8e2254 tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0
Thomas Waldmann <tw-public@gmx.de>
parents:
diff changeset
185
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
186 # description
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
187 desc_text = item.comment
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
188 if diffs:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
189 # TODO: rewrite / extend wikiutil.pagediff
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
190 # searching for the matching pages doesn't really belong here
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
191 revisions = page.getRevList()
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
192
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
193 rl = len(revisions)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
194 for idx in range(rl):
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
195 rev = revisions[idx]
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
196 if rev <= item.rev:
2450
3d08f1cb4429 pep8 whitespace fixes
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 2286
diff changeset
197 if idx + 1 < rl:
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
198 lines = wikiutil.pagediff(request, item.pagename, revisions[idx+1], item.pagename, 0, ignorews=1)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
199 if len(lines) > 20:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
200 lines = lines[:20] + ['...\n']
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
201 lines = '\n'.join(lines)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
202 lines = wikiutil.escape(lines)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
203 desc_text = '%s\n<pre>\n%s\n</pre>\n' % (desc_text, lines)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
204 break
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
205 if desc_text:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
206 handler.simpleNode('description', desc_text)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
207
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
208 # contributor
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
209 edattr = {}
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
210 if cfg.show_hosts:
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
211 edattr[(handler.xmlns['wiki'], 'host')] = item.hostname
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
212 if item.editor[0] == 'interwiki':
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
213 edname = "%s:%s" % item.editor[1]
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
214 ##edattr[(None, 'link')] = baseurl + wikiutil.quoteWikiname(edname)
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
215 else: # 'ip'
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
216 edname = item.editor[1]
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
217 ##edattr[(None, 'link')] = link + "?action=info"
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
218
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
219 # this edattr stuff, esp. None as first tuple element breaks things (tracebacks)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
220 # if you know how to do this right, please send us a patch
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
221
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
222 handler.startNode(('dc', 'contributor'))
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
223 handler.startNode(('rdf', 'Description'), attr=edattr)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
224 handler.simpleNode(('rdf', 'value'), edname)
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
225 handler.endNode(('rdf', 'Description'))
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
226 handler.endNode(('dc', 'contributor'))
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
227
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
228 # wiki extensions
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
229 handler.simpleNode(('wiki', 'version'), "%i" % (item.ed_time_usecs))
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
230 handler.simpleNode(('wiki', 'status'), ('deleted', 'updated')[page.exists()])
1665
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
231 handler.simpleNode(('wiki', 'diff'), full_url(request, page, querystr={'action': 'diff'}))
c57f72b49ea2 cleanup rss_rc action, use page.url
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1184
diff changeset
232 handler.simpleNode(('wiki', 'history'), full_url(request, page, querystr={'action': 'info'}))
2286
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
233 # handler.simpleNode(('wiki', 'importance'), ) # ( major | minor )
01f05e74aa9c Big PEP8 and whitespace cleanup
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1918
diff changeset
234 # handler.simpleNode(('wiki', 'version'), ) # ( #PCDATA )
1113
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
235
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
236 handler.endNode('item')
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
237
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
238 # end SAX stream
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
239 handler.endDocument()
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
240
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
241 request.write(out.getvalue())
9485500daadf read if-modified-since and if-none-match headers, first use for rss_rc action
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents: 1068
diff changeset
242