DrTrigon has uploaded a new change for review.
https://gerrit.wikimedia.org/r/115611
Change subject: improvements; * docs link * User:Drtrigon links pointing to
tool-labs * bugfix for irc bot status * bugfix for core log filename style
(hacky - for irc bot only!) * link on info panel renamed
......................................................................
improvements;
* docs link
* User:Drtrigon links pointing to tool-labs
* bugfix for irc bot status
* bugfix for core log filename style (hacky - for irc bot only!)
* link on info panel renamed
Change-Id: I97cc4fa1f7619427cb59d93153afe6ad71a80b63
---
M fabfile.py
M public_html/cgi-bin/panel.py
M public_html/cgi-bin/ps_plain.py
M public_html/cgi-bin/templates/info.html
M public_html/cgi-bin/templates/layout.html
5 files changed, 11 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/drtrigonbot
refs/changes/11/115611/1
diff --git a/fabfile.py b/fabfile.py
index 0b0e32e..ea3e66c 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -139,11 +139,11 @@
local('mkdir public_html/logs/archive') # target for log archive
local('mkdir public_html/logs/sge') # sge stdout/-err files
else: # toolserver
- local('mkdir public_html/doc') # contains symlinks
local('mkdir public_html/DrTrigonBot') # contains symlinks
local('mkdir public_html/source')
# create redirect to svn and git repo browser in 'public_html/source'
local('mkdir public_html/test')
+ local('mkdir public_html/docs') # contains symlinks (like logs)
def dl_drtrigonbot():
# if LABS: # labs-tools
@@ -209,7 +209,8 @@
def sl_compat():
if LABS: # labs-tools
- # docs ?
+ # docs
+ local('ln -s ~/pywikibot-compat/docs public_html/docs/compat')
# logs
# local('cd public_html/logs/; ln -s
/data/project/drtrigonbot/pywikibot-compat/logs compat')
local('ln -s ~/pywikibot-compat/logs public_html/logs/compat')
diff --git a/public_html/cgi-bin/panel.py b/public_html/cgi-bin/panel.py
index 5fc1c45..c70d94e 100755
--- a/public_html/cgi-bin/panel.py
+++ b/public_html/cgi-bin/panel.py
@@ -68,13 +68,13 @@
Successfully finished bot runs: <b>%(successfull)s</b><br><br>
<h2>Log files</h2>
-Current log files:
+Current <a href="%(oldlink)s">log files</a>:
<table class="wikitable">
%(currentlog)s
</table>
%(logbrowse)s
-<a href="%(oldlink)s">Old log</a> files: <i>%(oldlog)s</i><br><br>
+Old log files: <i>%(oldlog)s</i><br><br>
<h2>Messages</h2>
See also <a href="%(logstat)s">logging statistics</a> and the important
messages:
@@ -176,7 +176,7 @@
# === functions === === ===
#
-def oldlogfiles(all=False, exclude=['commands.log', 'throttle.log']):
+def oldlogfiles(all=False, exclude=['commands.log', 'throttle.log',
'nosetests.log']):
# files = os.listdir( localdir )
files = [os.path.join(ver_desc[0], item) for item in os.listdir(
os.path.join(localdir, ver_desc[0]) )]
files += [os.path.join(ver_desc[1], item) for item in os.listdir(
os.path.join(localdir, ver_desc[1]) )]
@@ -188,7 +188,7 @@
if (len(info) < 2) or (bn[1:] == info[-1]) or (bn in exclude):
continue
ext = info[-1].lower()
- if ext == 'log':
+ if ext == 'log' and not info[-2].isdigit(): # isdigit() for
core log filename style
current.append( item )
if all:
e = strftime(datefmt)
@@ -242,7 +242,7 @@
while True:
buf=s.recv(1024)
readbuffer=readbuffer+buf
- if (':End of /NAMES' in readbuffer) or (len(buf) < 1024):
+ if (':End of /NAMES' in readbuffer):# or (len(buf) < 1024):
break
s.close()
del s
diff --git a/public_html/cgi-bin/ps_plain.py b/public_html/cgi-bin/ps_plain.py
index 2a44b19..8096ea2 100644
--- a/public_html/cgi-bin/ps_plain.py
+++ b/public_html/cgi-bin/ps_plain.py
@@ -65,7 +65,7 @@
# === footer HTML codes === === ===
#
footer = \
-"""<small>DrTrigonBot web-interface, written by <a
href="https://wiki.toolserver.org/view/User:DrTrigon">DrTrigon</a>
+"""<small>DrTrigonBot web-interface, written by <a
href="https://wikitech.wikimedia.org/wiki/User:DrTrigon">DrTrigon</a>
(<a href="http://toolserver.org/~daniel/stats/">stat</a> /
<a href="http://toolserver.org/~daniel/stats/url_201007.html">url</a> /
<a href="http://munin.toolserver.org/index.html">info</a>).
diff --git a/public_html/cgi-bin/templates/info.html
b/public_html/cgi-bin/templates/info.html
index b998a9f..6091935 100644
--- a/public_html/cgi-bin/templates/info.html
+++ b/public_html/cgi-bin/templates/info.html
@@ -1,6 +1,6 @@
{% extends "layout.html" %}
{% block body %}
- <small><a href="panel.py">< back</a></small>
+ <small><a href="panel.py">< status</a></small>
<p><b>Server Architecture</b>: {{ arch.desc }}</p>
<p><b>Flask</b>: {{ flask.desc }}</p>
{% if compat %}
diff --git a/public_html/cgi-bin/templates/layout.html
b/public_html/cgi-bin/templates/layout.html
index e539f80..d5dc4e3 100644
--- a/public_html/cgi-bin/templates/layout.html
+++ b/public_html/cgi-bin/templates/layout.html
@@ -21,7 +21,7 @@
{% block body %}{% endblock %}
-{% if footer %}<small>DrTrigonBot "Labs-Flask" web-interface, written by <a
href="https://wiki.toolserver.org/view/User:DrTrigon">DrTrigon</a>
+{% if footer %}<small>DrTrigonBot "Labs-Flask" web-interface, written by <a
href="https://wikitech.wikimedia.org/wiki/User:DrTrigon">DrTrigon</a>
(<a href="http://toolserver.org/~daniel/stats/">stat</a> /
<a href="http://toolserver.org/~daniel/stats/url_201007.html">url</a> /
<a href="http://munin.toolserver.org/index.html">info</a>).
--
To view, visit https://gerrit.wikimedia.org/r/115611
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97cc4fa1f7619427cb59d93153afe6ad71a80b63
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/drtrigonbot
Gerrit-Branch: master
Gerrit-Owner: DrTrigon <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits