[Koha-bugs] [Bug 16016] Integrate sitemap.pl into the packages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 9 14:35:10 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16016

--- Comment #1 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 48859
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48859&action=edit
Bug 16016: Sitemap handling scripts for packages

This patch introduces the koha-sitemap script. This script wraps calls to
the misc/cronjobs/sitemap.pl script so it can be done easily instance-wise.

It sets /var/lib/koha/${instance}/sitemap as the destination directory for
the sitemap files. A followup will make them available through an Apache
configuration entry.

koha-functions.sh is provided with a handy is_sitemap_enabled function so
we can later add filters to other commands (koha-list, koha-foreach, etc).

To test:
- You can build a package out of this patchset, or do the following on a
kohadevbox
  cp debian/scripts/koha-functions.sh /usr/share/koha/bin
- Run
  $ debian/scripts/koha-sitemap --help
- Go through all the options (--enable, --disable, generate).
(a) --enable:
  - debian/scripts/koha-sitemap --enable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is created
  - call it again, a suitable warning is raised and the file is still there
(b) debian/scripts/koha-sitemap --disable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is deleted
  - call it again, a suitable warning is raised and the file does not exist
(c) --generate:
  - debian/scripts/koha-sitemap --generate kohadev
=> SUCCESS: sitemapindex.xml and sitemap000X.xml files are generated in
            /var/lib/koha/kohadev/sitemap/
- Sign off :-D

Sponsored-by: Orex Digital

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list