님의 소스:
"""
Redirect to randomly selected page
Copyright (c) 2002 by Won-kyu Park<wkpark@kldp.org>
All rights reserved, see COPYING for details.
설치:
파일 이름을 RandomPage.py 혹은 random.py로 저장한다.
data/plugin/action 아래 혹은 MoinMoin/action 아래에 복사해서 넣는다.
사용법:
moin.cgi?action=RandomPage(혹은 random)라고 하면 된다.
$Id: nextream,v 1.1 2005/08/25 04:33:08 no-smok Exp no-smok $
"""
# Imports
import whrandom
from MoinMoin import webapi,wikiutil
from MoinMoin import config
def execute(pagename, request):
baseurl = webapi.getBaseURL()
all_pages = wikiutil.getPageList(config.text_dir)
page = whrandom.choice(all_pages)
webapi.http_redirect(request, '%s/%s?action=show' % (
webapi.getScriptname(),
wikiutil.quoteWikiname(page)))
return