소스 검색

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!"),
]
%>\
<%


불러오는 중...
취소
저장