3 UPDATE action_trigger.event_definition
7 [%- SET user = target.0.owner -%]
8 To: [%- params.recipient_email || user.email %]
9 From: [%- params.sender_email || default_sender %]
10 Date: [%- date.format(date.now, '%a, %d %b %Y %T -0000', gmt => 1) %]
11 Subject: Bibliographic Records
12 Auto-Submitted: auto-generated
14 [% FOR cbreb IN target %]
15 [% FOR item IN cbreb.items;
16 bre_id = item.target_biblio_record_entry;
18 bibxml = helpers.unapi_bre(bre_id, {flesh => '{mra}'});
20 FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
21 title = title _ part.textContent;
24 author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
25 item_type = bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');
26 publisher = bibxml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
27 pubdate = bibxml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
28 isbn = bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
29 issn = bibxml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
30 upc = bibxml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
33 [% loop.count %]/[% loop.size %]. Bib ID# [% bre_id %]
34 [% IF isbn %]ISBN: [% isbn _ "\n" %][% END -%]
35 [% IF issn %]ISSN: [% issn _ "\n" %][% END -%]
36 [% IF upc %]UPC: [% upc _ "\n" %] [% END -%]
39 Publication Info: [% publisher %] [% pubdate %]
40 Item Type: [% item_type %]
45 WHERE hook = 'biblio.format.record_entry.email'
46 -- from previous stock definition
47 AND MD5(template) = 'ee4e6c1b3049086c570c7a77413d46c1';
49 UPDATE action_trigger.event_definition
53 <style> li { padding: 8px; margin 5px; }</style>
55 [% FOR cbreb IN target %]
56 [% FOR item IN cbreb.items;
57 bre_id = item.target_biblio_record_entry;
59 bibxml = helpers.unapi_bre(bre_id, {flesh => '{mra}'});
61 FOR part IN bibxml.findnodes('//*[@tag="245"]/*[@code="a" or @code="b"]');
62 title = title _ part.textContent;
65 author = bibxml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
66 item_type = bibxml.findnodes('//*[local-name()="attributes"]/*[local-name()="field"][@name="item_type"]').getAttribute('coded-value');
67 publisher = bibxml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
68 pubdate = bibxml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
69 isbn = bibxml.findnodes('//*[@tag="020"]/*[@code="a"]').textContent;
73 Bib ID# [% bre_id %] ISBN: [% isbn %]<br />
74 Title: [% title %]<br />
75 Author: [% author %]<br />
76 Publication Info: [% publisher %] [% pubdate %]<br/>
77 Item Type: [% item_type %]
84 WHERE hook = 'biblio.format.record_entry.print'
85 -- from previous stock definition
86 AND MD5(template) = '9ada7ea8417cb23f89d0dc8f15ec68d0';