Commit | Line | Data |
---|---|---|
456d236e JF |
1 | Customized MARC exporter |
2 | ||
3 | By James Fournie | |
4 | jfournie@sitka.bclibraries.ca | |
5 | ||
6 | This requires Config::Simple, the package for that in Deb/Ubuntu is libconfig-simple-perl. | |
7 | ||
b87f9079 | 8 | This script is the same as marc_export with new options: |
456d236e JF |
9 | |
10 | --collapse_to_depth | |
11 | ||
b87f9079 | 12 | Collapses all your holdings below a certain depth to that depth's org unit shortname, for example if you had: |
456d236e | 13 | |
b87f9079 JF |
14 | CONS |
15 | - SYS1 | |
16 | - BR1 | |
17 | - BR2 | |
456d236e | 18 | |
b87f9079 | 19 | If you set the depth at 1, all the $b in your holdings would show SYS1 as the shortname. |
456d236e JF |
20 | |
21 | -- exclusion_ini | |
22 | ||
b87f9079 | 23 | Define a file to define custom exclusion rules. See sitka.ini for Sitka's configuration for Outlook Online |
456d236e JF |
24 | |
25 | ||
26 | Usage examples: | |
27 | ||
28 | Pipe in something like: | |
29 | psql -A -t -c 'select id from biblio.record_entry where not deleted'| | |
30 | echo '101007645' | |
31 | ||
32 | into: | |
33 | ||
34 | ./marc_export_custom --config /srv/openils/conf/opensrf_core.xml --items --location SITKA --collapse_to_depth 2 --exclusion_ini sitka.ini | |
35 | ||
36 | Note: I have found adding --format XML makes it easier to debug what's going on |