From 0eba6526d01c78be7ed8056591b41649058df76b Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 18 Feb 2012 15:24:04 -0800 Subject: [PATCH] Only export materials with holdings for outlook. --- marc_export_custom/sitka-full-export-parallel.sh | 2 +- marc_export_custom/sitka-full-export.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/marc_export_custom/sitka-full-export-parallel.sh b/marc_export_custom/sitka-full-export-parallel.sh index 394e1da..1d3d397 100755 --- a/marc_export_custom/sitka-full-export-parallel.sh +++ b/marc_export_custom/sitka-full-export-parallel.sh @@ -11,7 +11,7 @@ DATABASE=evergreen FULL_QUERY="select distinct acn.record FROM asset.call_number acn join biblio.record_entry bre on (acn.record = bre.id) where not bre.deleted and bre.active and not acn.deleted" POSTSEC_QUERY="select distinct record FROM asset.call_number where owning_lib in (select distinct id from actor.org_unit_descendants(27)) and not deleted and label != '##URI##';" NONEXPORTED_QUERY="select distinct acn.record FROM asset.call_number acn join biblio.record_entry bre on (acn.record = bre.id) where bre.deleted or not bre.active or acn.deleted" -MARC_PARAMS="--config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --timeout 300 --force901 --encoding UTF-8" +MARC_PARAMS="--config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --timeout 300 --force901 --encoding UTF-8 --onlyholdings" MARC_EXPORT_BIN="${DIR}/marc_export_custom" MARC_EXPORT="${MARC_EXPORT_BIN} ${MARC_PARAMS}" diff --git a/marc_export_custom/sitka-full-export.sh b/marc_export_custom/sitka-full-export.sh index 41e48a0..113a4bf 100755 --- a/marc_export_custom/sitka-full-export.sh +++ b/marc_export_custom/sitka-full-export.sh @@ -5,15 +5,16 @@ cd /srv/openils/bin DATABASE=evergreen FULL_QUERY="select id from biblio.record_entry where not deleted" POSTSEC_QUERY="select record FROM asset.call_number where owning_lib in (select id from actor.org_unit_descendants(27)) and not deleted and label != '##URI##';" +MARC_PARAMS="--config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --timeout 300 --force901 --encoding UTF-8 --onlyholdings" # full dump for outlook public libraries psql -A -t -c "$FULL_QUERY" $DATABASE\ -|./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --force901 --exclusion_ini sitka_full_outlook.ini +|./marc_export_custom $MARC_PARAMS --exclusion_ini sitka_full_outlook.ini # media for BC ELN post-secondary libraries psql -A -t -c "$POSTSEC_QUERY" $DATABASE\ -|./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --force901 --exclusion_ini bc_eln_media.ini +|./marc_export_custom $MARC_PARAMS --exclusion_ini bc_eln_media.ini ~ # serials for BC ELN post-secondary libraries psql -A -t -c "$POSTSEC_QUERY" $DATABASE\ -|./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --force901 --exclusion_ini bc_eln_serials.ini +|./marc_export_custom $MARC_PARAMS --exclusion_ini bc_eln_serials.ini -- 2.3.6