[librecat-dev] delete a tag, based on data from another tag

Klee, Carsten Carsten.Klee at sbb.spk-berlin.de
Thu Nov 9 09:05:31 CET 2017


Hi Peter!

This should also work (not tested):

# copy content of 735$a to tmp if content is equal to 822$a
marc_spec('735$a{735$a =822$a }', tmp)

if exists(tmp)
                marc_remove(822)
end

remove_field(tmp)

# copy content of 735$a to tmp if content is equal to 899$a
marc_spec('735$a{735$a =899$a }', tmp)

if exists(tmp)
                marc_remove(899)
end

remove_field(tmp)


----

The fix marc_spec has some more comparison operators:

= (equals)
!= (equals not)
~ (includes)
!~ (includes not)
? (exists)
! (exists not)

Cheers!

Carsten


Von: librecat-dev-bounces at lists.uni-bielefeld.de [mailto:librecat-dev-bounces at lists.uni-bielefeld.de] Im Auftrag von Peter Fanter
Gesendet: Mittwoch, 8. November 2017 16:05
An: librecat-dev at lists.uni-bielefeld.de
Betreff: [librecat-dev] delete a tag, based on data from another tag

Hello community,

i have not found a way to create a fix to do the following:

i would like for each record, to check tag 753$a, and if its value is found in tags 822$a, or 899$a, then delete tag 822, or tag 899.

which fix - catmandu command would you suggest for this?

Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20171109/9338f206/attachment.html>


More information about the librecat-dev mailing list