[librecat-dev] Catmandu marc questions

Lars Kolling lars.kollingl at gmail.com
Sat Sep 10 17:37:17 CEST 2016


i want from here to thank in public, Patrick, and of course all other
librecat members,

for the code,

but more for the kind support.



On Sat, Sep 10, 2016 at 6:34 PM, Patrick Hochstenbach <
Patrick.Hochstenbach at ugent.be> wrote:

> The command is:  catmandu convert IMPORTER to EXPORTER. In your example
> the importer is MARC and exporter is YAML. What you see in the output is a
> YAML response. If you want a text response use for instance the Text
> exporter:
>
> $ catmandu convert MARC to Text --fix 'marc_map("650",txt.$append);
> join_field(txt,"\n"); retain(txt)' < camel.usmarc
>
> You can put instead of ‘650’ any (sub)field, repeatable or not.
>
> > On 10 Sep 2016, at 17:10, Lars Kolling <lars.kollingl at gmail.com> wrote:
> >
> > I am looking at a proper exporter, that instead of the below result:
> > $ catmandu convert MARC --fix 'retain_field(_id)' to YAML <
> Documents/camel.usmarc
> > You will see:
> >
> > ---
> > _id: 'fol05731351 '
> > ...
> > ---
> > _id: 'fol05754809 '
> > ...
> > ---
> > _id: 'fol05843555 '
> > ...
> > ---
> > _id: 'fol05843579 '
> > ...
> >
> > i am looking at a fix that will allow me to get the following as a
> result:
> > a plain txt file, that will have all values, row by row:
> > fol05731351
> > fol05754809
> > fol05843555
> > fol05843579
> > and for a repeatable tag something like below:
> > $ catmandu convert MARC --fix 'retain_field(300[0-#])' to YAML <
> Documents/camel.usmarc
> > Thank you again
> >
> >
> >
> > On Sat, Sep 10, 2016 at 5:51 PM, Johann Rolschewski <
> rolschewski at gmail.com> wrote:
> > Hi,
> >
> > >  catmandu convert --fix 'retain(_id)' MARC to Text < file_0.mrc
> > >
> > > gives me the result i need,
> >
> > this doesn't work, please provide a working example.
> >
> > > How one can have as a txt output all occurrences (values found) of say
> > > the 001 tag, or even better, a repeatable tag/subfield, in a row by row
> > > txt file.
> >
> > See
> > https://librecatproject.wordpress.com/2014/12/11/day-
> 9-processing-marc-with-catmandu/
> >
> >
> > Johann
> >
> > _______________________________________________
> > librecat-dev mailing list
> > - send list mails to librecat-dev at lists.uni-bielefeld.de
> > - to unsubscribe or change options, visit https://lists.uni-bielefeld.
> de/mailman2/cgi/unibi/listinfo/librecat-dev
> > - project website: http://librecat.org/
>
> Patrick Hochstenbach - digital architect
> University Library Ghent
> Sint-Hubertusstraat 8 - 9000 Ghent - Belgium
> patrick.hochstenbach at ugent.be
> +32 (0)9 264 7980
>
>
> _______________________________________________
> librecat-dev mailing list
> - send list mails to librecat-dev at lists.uni-bielefeld.de
> - to unsubscribe or change options, visit https://lists.uni-bielefeld.
> de/mailman2/cgi/unibi/listinfo/librecat-dev
> - project website: http://librecat.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20160910/356a31a7/attachment.html>


More information about the librecat-dev mailing list