LibreCat / Catmandu-MARC

Catmandu modules for working with MARC data
https://metacpan.org/release/Catmandu-MARC
Other
8 stars 10 forks source link

add fix marc_sort() #100

Closed jorol closed 4 years ago

jorol commented 5 years ago

see #94

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.08%) to 92.771% when pulling 60c3e11ad65e13b8058f03d591cf582bb455e953 on jorol:feature_sort into f98c62529afecb5e0bd5184968e36df58711cfc8 on LibreCat:dev.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.09%) to 92.778% when pulling e8dffb714786691755ed55d8b5627b931a45538a on jorol:feature_sort into f98c62529afecb5e0bd5184968e36df58711cfc8 on LibreCat:dev.

phochste commented 5 years ago

The code works for the generic MARC samples. Only in case of Ex Libris ALEPH way there is a bit "natural" ordening to have FMT, LDR fields on top and all other non-numeric fields at the bottom. See a sample record below. Any comments on this?

An ordering could then be:

000000002 FMT   L BK
000000002 LDR   L 00000nam^a2200301^i^4500
000000002 001   L 000000002
000000002 003   L BE-GnUNI
000000002 005   L 20171113130949.0
000000002 008   L 780804s1977^^^^enk||||||b||||001^0|eng||
000000002 010   L $$a78307846
000000002 015   L $$aGB***
000000002 020   L $$a0855275103
000000002 035   L $$a(DLC) 78307846
000000002 040   L $$aBE-GnUNI
000000002 05000 L $$aP325$$b.K34 1977b
000000002 08200 L $$a415
000000002 1001  L $$aKatz, Jerrold J.,$$d1932-2001$$0(viaf)108327082
000000002 24510 L $$aPropositional structure and illocutionary force :$$ba study of the contribution of sentence meaning to speec
h acts /$$cJerrold J. Katz.
000000002 260   L $$aHassocks :$$bHarvester press,$$c1977.
000000002 300   L $$aXv, 249 p. ;$$c25 cm.
000000002 4900  L $$aThe Language and thought series
000000002 504   L $$aIncludes bibliographical references and index.
000000002 650 7 L $$aCompetence and performance (Linguistics).$$2lcsh
000000002 650 7 L $$aGenerative grammar.$$2lcsh
000000002 650 7 L $$aProposition (Logic).$$2lcsh
000000002 650 7 L $$aSemantics.$$2fast$$0(OCoLC)fst01112079
000000002 650 7 L $$aSpeech acts (Linguistics).$$2lcsh
000000002 8524  L $$xLW$$bLW55$$cL17$$jLWBIB.L17.XIX.02.01.0242.03$$p000010400338
000000002 8524  L $$xLW$$bLW55$$cL18$$jLWBIB.L18.L010.F.0128$$p902-20
000000002 8524  L $$xLW$$bLW55$$cL27$$jLWBIB.L27.18.M.0201$$p000010206368
000000002 8524  L $$xLW$$bLW55$$cL33$$jLWBIB.L33.D01.006.0063$$p000010184913
000000002 920   L $$abook
000000002 SID   L $$aZ39$$bLOC
000000002 CRD   L $$aL1720070820
000000002 CRD   L $$aL1819970730
000000002 CRD   L $$aL2719870213
000000002 CRD   L $$aL3320061023
000000002 Z30-1 L $$lRUG01$$LRUG01$$mBOOK$$xLW$$1LW55$$2L17$$3LWBIB.L17.XIX.02.01.0242.03$$5000010400338$$820070820$$f02$$FLOAN/o
pen shelves
000000002 Z30-1 L $$lRUG01$$LRUG01$$mBOOK$$xLW$$1LW55$$2L18$$3LWBIB.L18.L010.F.0128$$5902-20$$819970730$$f02$$FLOAN/open shelves
000000002 Z30-1 L $$lRUG01$$LRUG01$$mBOOK$$xLW$$1LW55$$2L27$$3LWBIB.L27.18.M.0201$$5000010206368$$819870213$$f02$$FLOAN/open shel
ves
000000002 Z30-1 L $$lRUG01$$LRUG01$$mBOOK$$xLW$$1LW55$$2L33$$3LWBIB.L33.D01.006.0063$$5000010184913$$820061023$$f02$$FLOAN/open s
helves
jorol commented 5 years ago

Is ALEPHSEQ documented somewhere?

I've added some more logic to the decorate function and pushed another commit.

UschiKlute commented 5 years ago

there is documentation from hbz, BVB and more, e.g. https://wiki.dnb.de/pages/viewpage.action?pageId=99090449 (I used Google with "aseq format")

phochste commented 4 years ago

Thx! 1.252 on its way to CPAN

CaptSolo commented 4 years ago

Thanks, this is a good fix to have! :)

CaptSolo commented 4 years ago

Is ALEPHSEQ documented somewhere?

I've added some more logic to the decorate function and pushed another commit.

While it's not the official documentation, ALEPH SEQ is also described here: https://github.com/billdueber/marc_alephsequential

jorol commented 4 years ago

Thanks for links, but I was looking for a description of the non-numeric fields like FMT, CRD, SID, Z30, ...

UschiKlute commented 4 years ago

Aleph-Systemfelder: https://www.bib-bvb.de/web/kkb-online/rda-aleph-systemfelder

jorol commented 4 years ago

Thanks!