Kaynağa Gözat

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

pull/24/head
Ben Kurtovic 12 yıl önce
ebeveyn
işleme
804ea2f960
3 değiştirilmiş dosya ile 11 ekleme ve 8 silme
  1. +0
    -2
      README.md
  2. +3
    -2
      build.py
  3. +8
    -4
      pages/index.mako

+ 0
- 2
README.md Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet