Customized MARC exporter By James Fournie jfournie@sitka.bclibraries.ca This requires Config::Simple, the package for that in Deb/Ubuntu is libconfig-simple-perl. This script is the same as marc_export with new options: --collapse_to_depth Collapses all your holdings below a certain depth to that depth's org unit shortname, for example if you had: CONS - SYS1 - BR1 - BR2 If you set the depth at 1, all the $b in your holdings would show SYS1 as the shortname. -- exclusion_ini Define a file to define custom exclusion rules. See sitka.ini for Sitka's configuration for Outlook Online Usage examples: Pipe in something like: psql -A -t -c 'select id from biblio.record_entry where not deleted'| echo '101007645' into: ./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini sitka.ini Note: I have found adding --format XML makes it easier to debug what's going on