MoinMoin安装记

预备

安装

    python setup.py install --prefix=D:\Netapp\Moin --record=install.log

设置Web服务器

修改moin启动脚本

在前面加上

   1 import sys
   2 sys.path.append('D:\NetApp\Moin\lib\site-packages')

运行

MoinMoin设置记

基本设置

 sitename = "My Wiki"

charset = 'utf-8'
upperletters = "A-Z"
lowerletters = "0-9a-z"
default_lang = 'zh'

navi_bar = ['[FrontPage 首页]','[RecentChanges 最近更新]', '[FindPage 搜索]','[HelpContents 帮助]']

页面外观

   1 # -*- coding: iso-8859-1 -*-
   2 import urllib
   3 from MoinMoin import config, i18n, wikiutil, version
   4 from MoinMoin.Page import Page
   5 
   6 from classic import Theme as ThemeBase
   7 
   8 class Theme(ThemeBase):
   9     """ This is the starshine theme. """
  10 
  11     name = 'mytheme'
  12     icons = {
  13         # key         alt                        icon filename      w   h
  14         # ------------------------------------------------------------------
  15         # navibar
  16         'help':       ("%(page_help_contents)s", "moin-help.png",   12, 11),
  17         'find':       ("%(page_find_page)s",     "moin-search.png", 12, 12),
  18         'diff':       ("Diffs",                  "moin-diff.png",   15, 11),
  19         'info':       ("Info",                   "moin-info.png",   12, 11),
  20         'edit':       ("Edit",                   "moin-edit.png",   12, 12),
  21         'unsubscribe':("Unsubscribe",            "moin-unsubscribe.png",  14, 10),
  22         'subscribe':  ("Subscribe",              "moin-subscribe.png",14, 10),
  23         'raw':        ("Raw",                    "moin-raw.png",    12, 13),
  24         'xml':        ("XML",                    "moin-xml.png",    20, 13),
  25         'print':      ("Print",                  "moin-print.png",  16, 14),
  26         'view':       ("View",                   "moin-show.png",   12, 13),
  27         'home':       ("Home",                   "moin-home.png",   13, 12),
  28         'up':         ("Up",                     "moin-parent.png", 15, 13),
  29         # FileAttach (is this used?)
  30         'attach':     ("%(attach_count)s",       "moin-attach.png",  7, 15),
  31         # RecentChanges
  32         'rss':        ("[RSS]",                  "moin-rss.png",    36, 14),
  33         'deleted':    ("[DELETED]",              "moin-deleted.png",60, 12),
  34         'updated':    ("[UPDATED]",              "moin-updated.png",60, 12),
  35         'new':        ("[NEW]",                  "moin-new.png",    31, 12),
  36         'diffrc':     ("[DIFF]",                 "moin-diff.png",   15, 11),
  37         # General
  38         'bottom':     ("[BOTTOM]",               "moin-bottom.png", 14, 10),
  39         'top':        ("[TOP]",                  "moin-top.png",    14, 10),
  40         'www':        ("[WWW]",                  "moin-www.png",    11, 11),
  41         'mailto':     ("[MAILTO]",               "moin-email.png",  14, 10),
  42         'news':       ("[NEWS]",                 "moin-news.png",   10, 11),
  43         'telnet':     ("[TELNET]",               "moin-telnet.png", 10, 11),
  44         'ftp':        ("[FTP]",                  "moin-ftp.png",    11, 11),
  45         'file':       ("[FILE]",                 "moin-ftp.png",    11, 11),
  46         # search forms
  47         'searchbutton': ("[?]",                  "moin-search.png", 12, 12),
  48         'interwiki':  ("[%(wikitag)s]",          "moin-inter.png",  16, 16),
  49     }
  50     stylesheets = (
  51         # theme charset         media       basename
  52         (name,  'iso-8859-1',   'all',      'common'),
  53         (name,  'iso-8859-1',   'screen',   'screen'),
  54         (name,  'iso-8859-1',   'print',    'print'),
  55         )
  56 def execute(request):
  57     return Theme(request)

page_iconbar = ['edit','view','diff','info','xml','print']

   1     
   2     def footer(self, d, **keywords):
   3         """
   4         Assemble page footer
   5         
   6         @param d: parameter dictionary
   7         @keyword ...:...
   8         @rtype: string
   9         @return: page footer html
  10         """
  11         dict = {
  12             'config_page_footer1_html': self.emit_custom_html(config.page_footer1),
  13             'config_page_footer2_html': self.emit_custom_html(config.page_footer2),
  14             'showtext_html': self.showtext_link(d, **keywords),
  15             'edittext_html': self.edittext_link(d, **keywords),
  16             'search_form_html': self.searchform(d),
  17             'available_actions_html': self.availableactions(d),
  18             'credits_html': self.emit_custom_html(config.page_credits),
  19             'version_html': self.showversion(d, **keywords),
  20             'footer_fragments_html': self.footer_fragments(d, **keywords),
  21         }
  22         dict.update(d)
  23         
  24         html = """
  25 <div id="footer">
  26 %(config_page_footer1_html)s
  27 %(showtext_html)s
  28 %(footer_fragments_html)s
  29 %(edittext_html)s
  30 %(search_form_html)s
  31 %(available_actions_html)s
  32 %(config_page_footer2_html)s
  33 </div>
  34 %(version_html)s
  35 """ % dict
  36 
  37         return html

0.706/MyInstallMoin (last edited 2009-12-25 07:17:40 by localhost)