#!/usr/bin/perl package Main; { $Main::VERSION = '0.021'; } # PODNAME: koha-sitemap # ABSTRACT: Creates sitemap files for a whole Koha DB use 5.010; use utf8; use strict; use warnings; use Carp; use Pod::Usage; use Getopt::Long; use Koha::Contrib::Tamil::Sitemaper; my $verbose = 0; my $help = 0; my $url = ''; GetOptions( 'verbose' => \$verbose, 'help' => \$help, 'url=s' => \$url, ); sub usage { pod2usage( -verbose => 2 ); exit; } usage() if $help || !$url; my $sitemaper = Koha::Contrib::Tamil::Sitemaper->new( verbose => $verbose, url => $url, ); $sitemaper->run(); __END__ =pod =encoding UTF-8 =head1 NAME koha-sitemap - Creates sitemap files for a whole Koha DB =head1 VERSION version 0.021 =head1 DESCRIPTION Process all biblio records from a Koha instance and generate Sitemap files complying with this protocol as described on L. The goal of this script is to be able to provide to search engines direct access to biblio records. It avoid leaving search engine browsing Koha OPAC and so generating a lot of traffic, and workload, for a bad result. A file name F is generated. It contains references to Sitemap multiples files. Each file contains at most 50,000 urls, and is named F. The files must be stored on Koha OPAC root directoty, ie F</koha-tmpl/>. Place also in this directory a F file like this one: Sitemap: sitemapindex.xml User-agent: * Disallow: /cgi-bin/ =head1 USAGE =over =item koha-sitemap [--verbose|--help] --url=F =back =head1 PARAMETERS =over =item B<--url=Koha OPAC base URL> =item B<--verbose|-v> Enable script verbose mode. =item B<--help|-h> Print this help page. =back =head1 AUTHOR Frédéric Demians =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2012 by Fréderic Démians. This is free software, licensed under: The GNU General Public License, Version 3, June 2007 =cut