bug 2503: refactoring and bugfixing on create_koc_db.pl
authorAndrew Moore <andrew.moore@liblime.com>
Wed, 20 Aug 2008 16:21:52 +0000 (11:21 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Wed, 20 Aug 2008 22:05:25 +0000 (17:05 -0500)
commit556d9cc43d4c1d060f8a6bffefd5c734b3c1e971
treed0e2396b626a108f3d16b5973d062d90d2c3acbc
parent8c4a44ed67738fb5215fd2b1ddbca495e7f5152a
bug 2503: refactoring and bugfixing on create_koc_db.pl

This is the script that generates the patron and holdings database for the offline circ module. I
touched up a few parts of it:

* fixed the database syntax to squash a bug or two
* extracted some methods for readability and reuse
* added some documentation
* added a --file and --force command line argument
* made it die if DBD::SQLite is not present. That module is required for this feature.

Here's an example crontab line that will generate the borrowers.db file each midnight.

0 0 * * * create_koc_db.pl --file /tmp/borrowers.db

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Makefile.PL
misc/cronjobs/create_koc_db.pl