source: yaz/trunk/fuentes/doc/yaz-marcdump.1 @ 255

Last change on this file since 255 was 255, checked in by mabarracus, 4 years ago

added trusty code to xenial

File size: 5.8 KB
Line 
1'\" t
2.\"     Title: yaz-marcdump
3.\"    Author: Index Data
4.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
5.\"      Date: 06/29/2015
6.\"    Manual: Commands
7.\"    Source: YAZ 5.14.3
8.\"  Language: English
9.\"
10.TH "YAZ\-MARCDUMP" "1" "06/29/2015" "YAZ 5.14.3" "Commands"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el       .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31yaz-marcdump \- MARC record dump utility
32.SH "SYNOPSIS"
33.HP \w'\fByaz\-marcdump\fR\ 'u
34\fByaz\-marcdump\fR [\fB\-i\ \fR\fB\fIformat\fR\fR] [\fB\-o\ \fR\fB\fIformat\fR\fR] [\fB\-f\ \fR\fB\fIfrom\fR\fR] [\fB\-t\ \fR\fB\fIto\fR\fR] [\fB\-l\ \fR\fB\fIspec\fR\fR] [\fB\-c\ \fR\fB\fIcfile\fR\fR] [\fB\-s\ \fR\fB\fIprefix\fR\fR] [\fB\-C\ \fR\fB\fIsize\fR\fR] [\fB\-n\fR] [\fB\-p\fR] [\fB\-v\fR] [\fB\-V\fR] [file...]
35.SH "DESCRIPTION"
36.PP
37\fByaz\-marcdump\fR
38reads MARC records from one or more files\&. It parses each record and supports output in line\-format, ISO2709,
39\m[blue]\fBMARCXML\fR\m[]\&\s-2\u[1]\d\s+2,
40\m[blue]\fBMARC\-in\-JSON\fR\m[]\&\s-2\u[2]\d\s+2,
41\m[blue]\fBMarcXchange\fR\m[]\&\s-2\u[3]\d\s+2
42as well as Hex output\&.
43.PP
44This utility parses records ISO2709(raw MARC), line format, MARC\-in\-JSON format as well as XML if that is structured as MARCXML/MarcXchange\&.
45.PP
46MARC\-in\-JSON encoding/decoding is supported in YAZ 5\&.0\&.5 and later\&.
47.if n \{\
48.sp
49.\}
50.RS 4
51.it 1 an-trap
52.nr an-no-space-flag 1
53.nr an-break-flag 1
54.br
55.ps +1
56\fBNote\fR
57.ps -1
58.br
59.PP
60As of YAZ 2\&.1\&.18, OAI\-MARC is no longer supported\&. OAI\-MARC is deprecated\&. Use MARCXML instead\&.
61.sp .5v
62.RE
63.PP
64By default, each record is written to standard output in a line format with newline for each field, $x for each subfield x\&. The output format may be changed with option
65\-o,
66.PP
67\fByaz\-marcdump\fR
68can also be requested to perform character set conversion of each record\&.
69.SH "OPTIONS"
70.PP
71\-i \fIformat\fR
72.RS 4
73Specifies input format\&. Must be one of
74marcxml,
75marc
76(ISO2709),
77marcxchange
78(ISO25577),
79line
80(line mode MARC),
81turbomarc
82(Turbo MARC), or
83json
84(MARC\-in\-JSON)\&.
85.RE
86.PP
87\-o \fIformat\fR
88.RS 4
89Specifies output format\&. Must be one of
90marcxml,
91marc
92(ISO2709),
93marcxchange
94(ISO25577),
95line
96(line mode MARC),
97turbomarc
98(Turbo MARC), or
99json
100(MARC\-in\-JSON)\&.
101.RE
102.PP
103\-f \fIfrom\fR
104.RS 4
105Specify the character set
106\fIfrom\fR
107of the input MARC record\&. Should be used in conjunction with option
108\-t\&. Refer to the yaz\-iconv man page for supported character sets\&.
109.RE
110.PP
111\-t \fIto\fR
112.RS 4
113Specify the character set
114\fIof\fR
115of the output\&. Should be used in conjunction with option
116\-f\&. Refer to the yaz\-iconv man page for supported character sets\&.
117.RE
118.PP
119\-l \fIleaderspec\fR
120.RS 4
121Specify a simple modification string for MARC leader\&. The
122\fIleaderspec\fR
123is a list of pos=value pairs, where pos is an integer offset (0 \- 23) for leader\&. Value is either a quoted string or an integer (character value in decimal)\&. Pairs are comma separated\&. For example, to set leader at offset 9 to a, use
1249=\*(Aqa\*(Aq\&.
125.RE
126.PP
127\-s \fIprefix\fR
128.RS 4
129Writes a chunk of records to a separate file with prefix given, i\&.e\&. splits a record batch into files with only at most "chunk" ISO2709 record per file\&. By default chunk is 1 (one record per file)\&. See option
130\-C\&.
131.RE
132.PP
133\-C \fIchunksize\fR
134.RS 4
135Specifies chunk size; to be used conjunction with option
136\-s\&.
137.RE
138.PP
139\-p
140.RS 4
141Makes yaz\-marcdump prints record number and input file offset of each record read\&.
142.RE
143.PP
144\-n
145.RS 4
146MARC output is omitted so that MARC input is only checkecd\&.
147.RE
148.PP
149\-v
150.RS 4
151Writes more information about the parsing process\&. Useful if you have ill\-formatted ISO2709 records as input\&.
152.RE
153.PP
154\-V
155.RS 4
156Prints YAZ version\&.
157.RE
158.SH "EXAMPLES"
159.PP
160The following command converts MARC21/USMARC in MARC\-8 encoding to MARC21/USMARC in UTF\-8 encoding\&. Leader offset 9 is set to \*(Aqa\*(Aq\&. Both input and output records are ISO2709 encoded\&.
161.sp
162.if n \{\
163.RS 4
164.\}
165.nf
166    yaz\-marcdump \-f MARC\-8 \-t UTF\-8 \-o marc \-l 9=97 marc21\&.raw >marc21\&.utf8\&.raw
167   
168.fi
169.if n \{\
170.RE
171.\}
172.PP
173The same records may be converted to MARCXML instead in UTF\-8:
174.sp
175.if n \{\
176.RS 4
177.\}
178.nf
179    yaz\-marcdump \-f MARC\-8 \-t UTF\-8 \-o marcxml marc21\&.raw >marcxml\&.xml
180   
181.fi
182.if n \{\
183.RE
184.\}
185.PP
186Turbo MARC is a compact XML notation with same semantics as MARCXML, but which allows for faster processing via XSLT\&. In order to generate Turbo MARC records encoded in UTF\-8 from MARC21 (ISO), one could use:
187.sp
188.if n \{\
189.RS 4
190.\}
191.nf
192    yaz\-marcdump \-f MARC8 \-t UTF8 \-o turbomarc \-i marc marc21\&.raw >out\&.xml
193   
194.fi
195.if n \{\
196.RE
197.\}
198.sp
199.SH "FILES"
200.PP
201\fIprefix\fR/bin/yaz\-marcdump
202.PP
203\fIprefix\fR/include/yaz/marcdisp\&.h
204.SH "SEE ALSO"
205.PP
206\fByaz\fR(7)
207.PP
208\fByaz-iconv\fR(1)
209.SH "NOTES"
210.IP " 1." 4
211MARCXML
212.RS 4
213\%http://www.loc.gov/standards/marcxml/
214.RE
215.IP " 2." 4
216MARC-in-JSON
217.RS 4
218\%http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-marc-in-json/
219.RE
220.IP " 3." 4
221MarcXchange
222.RS 4
223\%http://www.loc.gov/standards/iso25577/
224.RE
Note: See TracBrowser for help on using the repository browser.