File: test.fix

package info (click to toggle)
libcatmandu-marc-perl 1.320-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,116 kB
  • sloc: perl: 4,948; xml: 554; makefile: 2; sh: 1
file content (37 lines) | stat: -rw-r--r-- 857 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
marc_map('001', 'my.id')
marc_map('245a', 'my.title')
marc_map('666', 'my.references.$append')

marc_map('001/3-5', 'my.substr_id')
marc_map('001/3-5', 'my.substr_id2',split:1)
marc_map('001/1003-1005', 'my.failed_substr_id')

marc_map('245', 'my.split_title', split:1)

add_field('my.found005',0)

if marc_match('005','20000613133448.0')
	set_field('my.found005',1)
end

add_field('my.found008','0')

if marc_match('008_/6-7','s')
	set_field('my.found008','1')
end

marc_map('050ba','my.pluck', pluck:1)

marc_map('245','my.has_title', value:'Y')

marc_map('245','my.has_title', value:'Y')

marc_map('260c','has_260c', value:'OK')
marc_map('260h','has_260h', value:'BAD')

marc_map('500^c','has_500_not_c', value: 'OK')
marc_map('500^a','has_500_not_a', value: 'BAD')

marc_map('008/0','has_800_0')

marc_xml('record')