# Copyright (C) 2005 Fletcher T. Penney # # 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. # 59 Temple Place, Suite 330 # Boston, MA 02111-1307 USA $ModulesDescription .= '

$Id: tagmap.pl,v 1.1 2005/11/06 03:34:41 fletcherpenney Exp $

'; use vars qw($TagMapPage $TagString); $TagMapPage = "TagMap" unless defined $TagMapPage; $TagString = "Tags" unless defined $TagString; $Action{tagmap} = \&DoTagMap; my %TagList = (); my $TagXML; sub DoTagMap { print GetHeader('',$TagMapPage,''); CreateTagMap(); print '
'; PrintTagMap(); print '
'; PrintFooter(); } sub CreateTagMap{ my @pages = AllPagesList(); local %Page; local $OpenPageName=''; $TagXML .= "\n"; foreach my $page (@pages) { OpenPage($page); my @tags = GetTags($Page{text}); $page = FreeToNormal($page); my $count = @tags; if ($count != 0) { $TagXML .= "$page\n"; foreach (@tags) { $TagXML .= "$_"; $TagList{$_} = 1; } $TagXML .= "\n\n"; } } $TagXML .= "\n"; } sub PrintTagMap{ require "$ModuleDir/TagCategorizer/TagCategorizer.pl"; my $result = TagCategorizer::ProcessXML($TagXML); $result =~ s/\/