[librecat-dev] Error use conditions
Patrick Hochstenbach
Patrick.Hochstenbach at UGent.be
Thu Apr 27 05:58:36 CEST 2023
Hi
The '/' character has a special meaning in fixes. With the fix below you can get your desired effect
if marc_match('008/35-37','[/]{3}')
marc_set('008/35-37','por')
end
BR
Patrick
________________________________
From: librecat-dev-bounces at lists.uni-bielefeld.de <librecat-dev-bounces at lists.uni-bielefeld.de> on behalf of Tiago Murakami <trmurakami at gmail.com>
Sent: 26 April 2023 17:02
To: librecat-dev at lists.uni-bielefeld.de <librecat-dev at lists.uni-bielefeld.de>
Subject: [librecat-dev] Error use conditions
Hi,
I have an error when I use conditions in my fixes file.
I try to run: catmandu convert MARC to MARC --fix fixes/fixes.txt < data/koha.mrc > data/result.mrc
My fixes file only have this:
if marc_match('008/35-37','\\\')
marc_set('008/35-37','por')
end
The result is:
Oops! Syntax error in your fixes...
Error: Expected end of input on line 1 at:
if marc_match('008/35-37','\\\')
^
Source:
if marc_match('008/35-37','\\\')
marc_set('008/35-37','por')
end
Somebody can help me?
Thanks in advance,
--
Tiago Murakami
Biblioteca de Comunicações e Artes
Universidade de São Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20230427/18660505/attachment.html>
More information about the librecat-dev
mailing list