From a9284b2434ba37f0b7451bc02369a8e28e92ea95 Mon Sep 17 00:00:00 2001 From: dbs Date: Fri, 17 Jul 2009 20:02:07 +0000 Subject: [PATCH] Move daily scripts around, create a config directory for some good stuff like Z39.50 servers git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/trunk@586 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- tools/config/z3950.xml | 315 +++++++++++++++++++++ .../circ_date_to_expire_date.pl | 0 tools/{ => daily-scripts}/end_of_the_day.pl | 0 tools/{ => daily-scripts}/reingest_uningested.pl | 0 tools/delete_ill_books.pl | 97 ------- 5 files changed, 315 insertions(+), 97 deletions(-) create mode 100644 tools/config/z3950.xml rename tools/{ => daily-scripts}/circ_date_to_expire_date.pl (100%) rename tools/{ => daily-scripts}/end_of_the_day.pl (100%) rename tools/{ => daily-scripts}/reingest_uningested.pl (100%) delete mode 100644 tools/delete_ill_books.pl diff --git a/tools/config/z3950.xml b/tools/config/z3950.xml new file mode 100644 index 0000000000..578096b52d --- /dev/null +++ b/tools/config/z3950.xml @@ -0,0 +1,315 @@ + + biblios + + + + AMICUS + amicus.nlc-bnc.ca + 210 + NL + + F + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + McGill + aleph.mcgill.ca + 210 + MUSE + + F + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + UChicago + ipac.lib.uchicago.edu + 210 + uofc + + F + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + ULaval + ariane2.ulaval.ca + 2200 + unicorn + + F + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + UManitoba + lrpapp.cc.umanitoba.ca + 2200 + unicorn + + FI + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + UMichigan + z3950.lib.umich.edu + 210 + miu101_pub + + FI + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + UMontréal + atrium.bib.umontreal.ca + 210 + ADVANCE + + F + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + UofT + sirsi.library.utoronto.ca + 2200 + UNICORN + + F + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + UWO + alpha.lib.uwo.ca + 210 + INNOPAC + + F + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + ‡biblios.net + z3950.biblios.net + 210 + bibliographic + + FI + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + loc + z3950.loc.gov + 7090 + Voyager + + FI + + + + usmarc + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + + zcat.oclc.org + 210 + OLUCWorldCat + + + 121 + 76 + 91 + 10036 + <code>4</code><format>6</format> + 81 + 10186 + 311 + 10011 + + + + + diff --git a/tools/circ_date_to_expire_date.pl b/tools/daily-scripts/circ_date_to_expire_date.pl similarity index 100% rename from tools/circ_date_to_expire_date.pl rename to tools/daily-scripts/circ_date_to_expire_date.pl diff --git a/tools/end_of_the_day.pl b/tools/daily-scripts/end_of_the_day.pl similarity index 100% rename from tools/end_of_the_day.pl rename to tools/daily-scripts/end_of_the_day.pl diff --git a/tools/reingest_uningested.pl b/tools/daily-scripts/reingest_uningested.pl similarity index 100% rename from tools/reingest_uningested.pl rename to tools/daily-scripts/reingest_uningested.pl diff --git a/tools/delete_ill_books.pl b/tools/delete_ill_books.pl deleted file mode 100644 index b88b890898..0000000000 --- a/tools/delete_ill_books.pl +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/perl -w -use strict; - -use DBI; -use Getopt::Long; -use OpenSRF::EX qw/:try/; -use OpenSRF::Utils qw/:daemon/; -use OpenSRF::System; -use OpenSRF::AppSession; -use OpenSRF::Utils::SettingsClient; -use File::Find; - -my ($config) = ('/openils/conf/opensrf_core.xml'); - -GetOptions( - "bootstrap=s" => \$config, -); - -OpenSRF::System->bootstrap_client( config_file => $config ); - -my $sc = OpenSRF::Utils::SettingsClient->new; -my $db_driver = $sc->config_value( apps => 'open-ils.storage' => app_settings => databases => 'driver' ); -my $db_host = $sc->config_value( apps => 'open-ils.storage' => app_settings => databases => database => 'host' ); -my $db_port = $sc->config_value( apps => 'open-ils.storage' => app_settings => databases => database => 'port' ); -my $db_name = $sc->config_value( apps => 'open-ils.storage' => app_settings => databases => database => 'db' ); -my $db_user = $sc->config_value( apps => 'open-ils.storage' => app_settings => databases => database => 'user' ); -my $db_pw = $sc->config_value( apps => 'open-ils.storage' => app_settings => databases => database => 'pw' ); - -my $dsn = "dbi:" . $db_driver . ":dbname=" . $db_name .';host=' . $db_host . ';port=' . $db_port; - -my $dbh = DBI->connect($dsn,$db_user,$db_pw, {pg_enable_utf8 => 1, RaiseError => 1}); - -delete_racer_callnumbers(); - -$dbh->disconnect; - -sub delete_racer_callnumbers { - my $select_stmt = <selectcol_arrayref($select_stmt); - print localtime() . " - found " . scalar(@$results) . " RACER book call numbers to delete:\n"; - if (scalar(@$results)) { - foreach (@$results) { - print "\t$_\n"; - } - my $stmt = $dbh->prepare($delete_stmt); - my $updates = $stmt->execute(); - } -} - -- 2.11.0