[librecat-dev] fix that can removes all fields except some set of desired fields
Klee, Carsten
Carsten.Klee at sbb.spk-berlin.de
Wed Sep 26 10:00:16 CEST 2018
Hi Jonathan!
I think what you are looking for is 'retain':
# delete any field except _id, title, doi
retain(_id, title, doi)
Cheers!
Carsten
> -----Ursprüngliche Nachricht-----
> Von: librecat-dev-bounces at lists.uni-bielefeld.de [mailto:librecat-dev-
> bounces at lists.uni-bielefeld.de] Im Auftrag von Jonathan NORRIS
> Gesendet: Mittwoch, 26. September 2018 09:41
> An: librecat-dev at lists.uni-bielefeld.de
> Betreff: [librecat-dev] fix that can removes all fields except some set of
> desired fields
>
> Hello,
>
> I could not find anything in the fixes documentation for this and I am
> wondering if it exists.
>
> I want to create a yaml export with only the _id, title, and DOI of a
> record. Is there any fix functions that allow you to do this in any
> other way that just calling remove_field() on all the undesired fields?
> Like, is there a way to generate the format from specifically chosen
> fields? Or is it always based on removing fields from the full record?
>
> To illustrate better:
>
> -------
> # generates the export from specifically chosen fields
> add_field(_id)
> add_field(title)
> add_field(doi)
> -------
>
> -------
> # remove all unwanted fields
> remove_field(a)
> remove_field(b)
> remove_field(c)
> remove_field(d)
> remove_field(e)
> remove_field(f)
> etc..
> etc..
> etc..
> -------
>
>
> Thanks for any help!
> Jonathan
> IST Austria
> _______________________________________________
> 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/
More information about the librecat-dev
mailing list