From 14b0704d4aa5c534d42c1dbc61a849a08a39c593 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 9 Jul 2005 13:54:31 +0000 Subject: clean up HTML output generating XHTML 1.1 without frames and using CSS for styling also getting rid of the images git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@57 86f53f14-5ff3-0310-afe5-9b438ce3f40c --- plugins/slow.py | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) (limited to 'plugins/slow.py') diff --git a/plugins/slow.py b/plugins/slow.py index 9157f7b..14f635f 100644 --- a/plugins/slow.py +++ b/plugins/slow.py @@ -19,41 +19,34 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -"""Present a list of pages that are slow to download.""" +"""Present a list of pages that are large and probably slow to download.""" __title__ = "what's slow" __author__ = 'Arthur de Jong' __version__ = '1.1' +__description__ = 'These pages are probably too big which will be slow to download.' import rptlib import config def generate(fp,site): - """Output the list of slow pages to the given file descriptor.""" - import time - fp.write('
\n') - fp.write('\n') - fp.write(' \n') - fp.write(' \n') - fp.write(' \n') - fp.write(' \n') - links = site.linkMap.values() + """Output the list of large pages to the given file descriptor.""" + fp.write(' ' % make_link(link.URL)+'\n') - fp.write(' \n' % sizeK) - fp.write(' \n' \ - % time.strftime('%H:%M:%S',time.gmtime(int(sizek/28.8)))) - fp.write(' \n' \ - % time.strftime('%H:%M:%S',time.gmtime(int(sizek/56)))) - fp.write(' \n' \ - % time.strftime('%H:%M:%S',time.gmtime(int(sizek/1500)))) - rptlib.add_problem('Slow Link: %sK' % sizeK, link) - fp.write('
LinkSize
(Kb)
Time (HH:MM:SS)
28.8ISDNT1
%s%s%s%s%s
\n') - fp.write('
\n') + continue + fp.write( + '
  • \n' \ + ' %(link)s\n' \ + '
    size: %(size)sK
    \n' \ + '
  • \n' \ + % { 'link': rptlib.make_link(link.URL), + 'size': sizeK }) + rptlib.add_problem('slow Link: %sK' % str(sizeK), link) + fp.write(' \n') -- cgit v1.2.3