瀏覽代碼

Update rewrite.script to include / -> index.fcg; add descriptions for index.

pull/24/head
Ben Kurtovic 11 年之前
父節點
當前提交
804ea2f960
共有 3 個檔案被更改,包括 11 行新增8 行删除
  1. +0
    -2
      README.md
  2. +3
    -2
      build.py
  3. +8
    -4
      pages/index.mako

+ 0
- 2
README.md 查看文件

@@ -2,8 +2,6 @@ This is a from-scratch rewrite of
[my Toolserver site](https://toolserver.org/~earwig) to interface well with my
[EarwigBot rewrite](https://github.com/earwig/earwigbot).

Not much else to say at this stage. Move along, now.

Dependencies
============



+ 3
- 2
build.py 查看文件

@@ -43,7 +43,7 @@ if __name__ == "__main__":

rewrite_script_src = """match URL into $ with ^/~earwig/{0}(\?.*?)?$
if matched then
set URL = /~earwig/www/{0}.fcgi$1
set URL = /~earwig/www/{1}.fcgi$1
goto END
endif
"""
@@ -138,8 +138,9 @@ class Builder(object):

logger.debug("build rewrite.script")
with open(target, "w") as fp:
fp.write(rewrite_script_src.format("", "index"))
for page in self._pages:
fp.write(rewrite_script_src.format(page))
fp.write(rewrite_script_src.format(page, page))

def build(self):
self._enable_logging()


+ 8
- 4
pages/index.mako 查看文件

@@ -5,10 +5,14 @@
("Home", "home", "index", True, None),
("Settings", "settings", "settings", True, None),
("DIVIDER"),
("Copyvio Detector", "copyvios", "copyvios", True, "Blah"),
("EarwigBot Status", "earwigbot", "earwigbot", True, "Blah"),
("Contribution Surveyor", "surveyor", "surveyor", False, "Blah"),
("SWMT Helper", "swmt", "swmt", False, "Blah"),
("Copyvio Detector", "copyvios", "copyvios", True,
'Try to detect <a href="//en.wikipedia.org/wiki/WP:COPYVIO">copyright violations</a> in articles by searching the web for page content, or compare an article to a specific URL.'),
("EarwigBot Status", "earwigbot", "earwigbot", True,
'View <a href="//en.wikipedia.org/wiki/User:EarwigBot">EarwigBot</a>\'s current status and read its IRC-based mini-wiki.'),
("Contribution Surveyor", "surveyor", "surveyor", False,
"Nothing to see here yet!"),
("SWMT Helper", "swmt", "swmt", False,
"Nothing to see here yet!"),
]
%>\
<%


Loading…
取消
儲存