Skip to content

Commit

Permalink
First steps in integrating COMHIS cleanups (#94):
Browse files Browse the repository at this point in the history
- add date substitution CSV
- add script for making a simplified version of it for Catmandu processing (with unit test)
- add a test record with a broken data field that will be used later
  • Loading branch information
osma committed Jul 3, 2019
1 parent b955f9c commit b0ced3c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ split-input/%.md5: input/%.alephseq
slices/%.md5: split-input/%.md5
scripts/update-slices.sh $^ $@

refdata/subst-260c.csv: refdata/fennica-dates.csv.gz
zcat $^ | scripts/extract-subst-260c.py >$@

refdata/iso639-2-fi.csv: sparql/extract-iso639-2-fi.rq
$(RSPARQL) --service $(FINTOSPARQL) --query $^ --results=CSV >$@

Expand Down
Binary file added refdata/fennica-dates.csv.gz
Binary file not shown.
4 changes: 4 additions & 0 deletions test/00_refdata.bats
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ setup () {
[ -s refdata/RDAMediaType.nt ]
}

@test "Reference data: 260c date value substitutions" {
make refdata/subst-260c.csv
[ -s refdata/subst-260c.csv ]
}
25 changes: 25 additions & 0 deletions test/input/suoja-pirtti.alephseq
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
000005646 FMT L BK
000005646 LDR L 00000cam^a2200577zi^4500
000005646 001 L 000005646
000005646 005 L 20180104164905.0
000005646 008 L 820419s1981^^^^fi^|||||||||||||||||fin||
000005646 015 L $$af820558$$2skl
000005646 035 L $$a(FI-MELINDA)000005646
000005646 040 L $$aFI-NL
000005646 0410 L $$afin
000005646 042 L $$afinb
000005646 080 L $$a361/362
000005646 080 L $$a364$$21974/fin/fennica$$9FENNI<KEEP>
000005646 080 L $$a613$$21974/fin/fennica$$9FENNI<KEEP>
000005646 080 L $$a613.81$$21974/fin/fennica$$9FENNI<KEEP>
000005646 080 L $$a364.65$$x-05$$x(091)$$21974/fin/fennica$$9FENNI<KEEP>
000005646 24500 L $$a20 vuotta päihdehuoltoa 1961-1981 /$$c[julk.] Suoja-pirti r.y.
000005646 260 L $$a[Hki] :$$bSuoja-pirtti,$$c[1981] f [Merkur]
000005646 300 L $$a[2], 33, [1] s. :$$bkuvitettu ;$$c25 cm
000005646 336 L $$ateksti$$btxt$$2rdacontent
000005646 337 L $$akäytettävissä ilman laitetta$$bn$$2rdamedia
000005646 338 L $$anide$$bnc$$2rdacarrier
000005646 7102 L $$aSuoja-pirtti.
000005646 7400 L $$aKaksikymmentä vuotta päihdehuoltoa 1961-1981.
000005646 903 L $$ab$$5FENNI
000005646 904 L $$ap$$5FENNI
1 change: 1 addition & 0 deletions test/refdata/fennica-dates.csv.gz

0 comments on commit b0ced3c

Please sign in to comment.