[librecat-dev] statictic subfield report
Nicolas Steenlant
Nicolas.Steenlant at UGent.be
Wed Nov 13 08:45:20 CET 2019
There is an unless statement:
unless marc_all_match('245a','Rules')
marc_map("001", mmsid)
end
But no ‘unless…else...end'
Can’t you just?
if marc_all_match('245a','Rules')
reject()
else
marc_map("001", mmsid)
end
---
Nicolas Steenlant
Ghent University Library
> On 12 Nov 2019, at 16:45, Christoph Krempe <krempe at ub.fu-berlin.de> wrote:
>
> Hi Johann,
>
> is it possible to formulate a logical "not" in an if condition?
>
> I would like to use
>
> if !marc_all_match('245a','Rules')
> marc_map("001", mmsid)
> else
> reject()
> end
>
> But on https://librecat.org/Catmandu/#fixes-cheat-sheet there is no example for
> "not"
>
>
> Am 12.11.19 um 10:13 schrieb Christoph Krempe:
>> Hi Johann,
>> Am 12.11.19 um 09:55 schrieb Rolschewski, Johann:
>>> Hi Christoph,
>>>
>>>> before I start to code by myself: Is the a way to create a statistic of the use of
>>>> specific assignment of MARC subfields in Catmandu?
>>>>
>>>> For example, I want to now
>>>>
>>>> the count of value "ddc" in subfield $2 in category 084 or how much category
>>>> 600, subfield 49, do not have the value "N"
>>>
>>> you can generate (sub)field-level statistics with:
>>>
>>> $ marcstats.pl data.mrc
>>> # or
>>> $ catmandu convert MARC to Breaker --handler marc < data.mrc > data.mrc.breaker
>>> $ catmandu breaker data.mrc.breaker
>>> # or
>>> $ catmandu breaker --as XLSX data.mrc.breaker > data.xlsx
>>>
>>> I'm not aware of any generic solution for generating statistics for specific (sub)field values. I would create a fix for these (sub)fields and then use something like
>>>
>>> $ cut | sort | uniq -c
>> I will write a fix for that task, thank you!
>>>
>>> for calculating the numbers.
>>>
>>> Best
>>>
>>> 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/
>
>
> --
> Mit freundlichen Grüßen
>
> Ch. Krempe
>
> __________________________________________________
>
> Christoph Krempe
> Abt. Datenverarbeitung
> Universitätsbibliothek der FU Berlin
> Garystraße 39
> D-14195 Berlin
>
> Tel.: 030 83854583
> Fax: 030 838454583
>
> _______________________________________________
> 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