sitemap.pl [--verbose|--help|--short|--noshort|--url|--dir]


  sitemap.pl --verbose
  sitemap.pl --noshort --dir /home/koha/mylibrary/www
  sitemap.pl --url opac.myDNSname.org


Process all biblio records from a Koha instance and generate Sitemap files complying with this protocol as described on http://sitemaps.org. 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 sitemapindex.xml is generated. It contains references to Sitemap multiples files. Each file contains at most 50,000 urls, and is named sitemapXXXX.xml.

The files must be stored on Koha OPAC root directory, ie <koha-root/koha-tmpl/>. Place also in this directory a robots.txt file like this one:

 Sitemap: sitemapindex.xml
 User-agent: *
 Disallow: /cgi-bin/


--url=Koha OPAC base URL

If omitted, OPACBaseURL syspref is used.


By default, --short. With --short, URL to bib record ends with /bib/biblionumber. With --noshort, URL ends with /cgi-bin/koha/opac-detail.pl?biblionumber=bibnum


Directory where to write sitemap files. By default, the current directory.


Enable script verbose mode: a message is displayed for each 10,000 biblio records processed.


Print this help page.