<div dir="ltr">i want from here to thank in public, Patrick, and of course all other librecat members,<div><br></div><div>for the code, </div><div><br></div><div>but more for the kind support.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 10, 2016 at 6:34 PM, Patrick Hochstenbach <span dir="ltr"><<a href="mailto:Patrick.Hochstenbach@ugent.be" target="_blank">Patrick.Hochstenbach@ugent.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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:<br>
<br>
$ catmandu convert MARC to Text --fix 'marc_map("650",txt.$append); join_field(txt,"\n"); retain(txt)' < camel.usmarc<br>
<br>
You can put instead of ‘650’ any (sub)field, repeatable or not.<br>
<div><div class="h5"><br>
> On 10 Sep 2016, at 17:10, Lars Kolling <<a href="mailto:lars.kollingl@gmail.com">lars.kollingl@gmail.com</a>> wrote:<br>
><br>
> I am looking at a proper exporter, that instead of the below result:<br>
> $ catmandu convert MARC --fix 'retain_field(_id)' to YAML < Documents/camel.usmarc<br>
> You will see:<br>
><br>
> ---<br>
> _id: 'fol05731351 '<br>
> ...<br>
> ---<br>
> _id: 'fol05754809 '<br>
> ...<br>
> ---<br>
> _id: 'fol05843555 '<br>
> ...<br>
> ---<br>
> _id: 'fol05843579 '<br>
> ...<br>
><br>
> i am looking at a fix that will allow me to get the following as a result:<br>
> a plain txt file, that will have all values, row by row:<br>
> fol05731351<br>
> fol05754809<br>
> fol05843555<br>
> fol05843579<br>
> and for a repeatable tag something like below:<br>
> $ catmandu convert MARC --fix 'retain_field(300[0-#])' to YAML < Documents/camel.usmarc<br>
> Thank you again<br>
><br>
><br>
><br>
> On Sat, Sep 10, 2016 at 5:51 PM, Johann Rolschewski <<a href="mailto:rolschewski@gmail.com">rolschewski@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> >  catmandu convert --fix 'retain(_id)' MARC to Text < file_0.mrc<br>
> ><br>
> > gives me the result i need,<br>
><br>
> this doesn't work, please provide a working example.<br>
><br>
> > How one can have as a txt output all occurrences (values found) of say<br>
> > the 001 tag, or even better, a repeatable tag/subfield, in a row by row<br>
> > txt file.<br>
><br>
> See<br>
> <a href="https://librecatproject.wordpress.com/2014/12/11/day-9-processing-marc-with-catmandu/" rel="noreferrer" target="_blank">https://librecatproject.<wbr>wordpress.com/2014/12/11/day-<wbr>9-processing-marc-with-<wbr>catmandu/</a><br>
><br>
><br>
> Johann<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> librecat-dev mailing list<br>
> - send list mails to <a href="mailto:librecat-dev@lists.uni-bielefeld.de">librecat-dev@lists.uni-<wbr>bielefeld.de</a><br>
> - to unsubscribe or change options, visit <a href="https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev" rel="noreferrer" target="_blank">https://lists.uni-bielefeld.<wbr>de/mailman2/cgi/unibi/<wbr>listinfo/librecat-dev</a><br>
> - project website: <a href="http://librecat.org/" rel="noreferrer" target="_blank">http://librecat.org/</a><br>
<br>
Patrick Hochstenbach - digital architect<br>
University Library Ghent<br>
Sint-Hubertusstraat 8 - 9000 Ghent - Belgium<br>
<a href="mailto:patrick.hochstenbach@ugent.be">patrick.hochstenbach@ugent.be</a><br>
<a href="tel:%2B32%20%280%299%20264%207980" value="+3292647980">+32 (0)9 264 7980</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
librecat-dev mailing list<br>
- send list mails to <a href="mailto:librecat-dev@lists.uni-bielefeld.de">librecat-dev@lists.uni-<wbr>bielefeld.de</a><br>
- to unsubscribe or change options, visit <a href="https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev" rel="noreferrer" target="_blank">https://lists.uni-bielefeld.<wbr>de/mailman2/cgi/unibi/<wbr>listinfo/librecat-dev</a><br>
- project website: <a href="http://librecat.org/" rel="noreferrer" target="_blank">http://librecat.org/</a><br>
</blockquote></div><br></div>