From a0abb86c0fbedc8ab2fc42e492e1d0f4be554401 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 18 Jun 2005 13:31:08 +0000 Subject: add simple urllist plugin to list all visited URLs git-svn-id: http://arthurdejong.org/svn/webcheck/webcheck@47 86f53f14-5ff3-0310-afe5-9b438ce3f40c --- plugins/urllist.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 plugins/urllist.py (limited to 'plugins/urllist.py') diff --git a/plugins/urllist.py b/plugins/urllist.py new file mode 100644 index 0000000..abbd4f2 --- /dev/null +++ b/plugins/urllist.py @@ -0,0 +1,35 @@ + +# urllist.py - plugin to generate a list of visited urls +# +# Copyright (C) 2005 Arthur de Jong +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +"""Present a list of visited urls.""" + +__title__ = 'url list' +__author__ = 'Arthur de Jong' +__version__ = '1.0' + +import rptlib + +def generate(fp,site): + """Output a sorted list of urls to the specified file descriptor.""" + urls=site.linkMap.keys(); + urls.sort() + fp.write('
    \n') + for url in urls: + fp.write('
  1. '+rptlib.make_link(url,url)+'
  2. ') + fp.write('
\n') -- cgit v1.2.3