<%! import mimetypes, os.path import extutil from matsuba.config import PRIVATE_FSPATH # ARGHH import matsuba.templatetools as tt # mimetypes' static interface is broken mime = mimetypes.MimeTypes([os.path.join(PRIVATE_FSPATH, 'mime.types')]) def mime_type(filename): return mime.guess_type(filename)[0] or 'application/octet-stream' %> <%page expression_filter="x" /> ${board.title}${url(board=board, relative=False)} <% posts = list(threads.posts(RSS_REPLIES)) %> % if len(posts): ${extutil.format_timestamp(posts[0].time, 'rfc3339', gmt=True)} % endif Last ${RSS_REPLIES} posts from ${board.title} at ${SITE_TITLE}. % for post in posts: <% abslink = upath(url(post=post, relative=False)) %> No.${post.thread.id}/${post.resid}${(': ' + post.subject if post.subject else '')} ${tt.format_name_trip(post.name_trip, ['', ''], ['', ''])} \ % if link and not link.startswith('#'): <${link}>\ % endif ${abslink}${abslink}${abslink} ${extutil.format_timestamp(post.time, 'http', gmt=True)} % if post.filename: % endif ## just show the image dimensions, original filename or other info if it exists, and thumbnail if it's ## *not* a stock thumbnail. there's no point in putting all the other data here since it is already ## represented in some other form. <% # the post object builds .fileinfo similarly, but some of its data is redundant here i = [] if post.width or post.height: i.append('%dx%d' % (post.width, post.height)) if post.extrainfo: i.append(post.extrainfo) %> % if i: File: ${', '.join(i)}
% endif % if post.thumbnail and not post.thumbnail.startswith('/'): ${post.sizeinfo} % endif

% endif <% abbrev = extutil.abbreviate_html(post.message) %> ${abbrev or post.message|n} % if abbrev:

Comment too long; full version here.

% endif ]]>
% endfor