bom import
authorMason James <mtj@kohaaloha.com>
Thu, 2 Jul 2015 00:04:29 +0000 (12:04 +1200)
committerMason James <mtj@kohaaloha.com>
Thu, 2 Jul 2015 00:04:29 +0000 (12:04 +1200)
Signed-off-by: Mason James <mtj@kohaaloha.com>
bom3.sh [new file with mode: 0755]

diff --git a/bom3.sh b/bom3.sh
new file mode 100755 (executable)
index 0000000..a730df7
--- /dev/null
+++ b/bom3.sh
@@ -0,0 +1,101 @@
+#!/bin/bash
+perl -I /home/mason/g/clients/koha-migration-toolbox/migration/Generic \
+    ./csvtomarc.pl \
+    -i catuf.csv \
+    -o bom3.marc \
+    -f marcxml \
+    -v \
+\
+    -m 'CatRID=marc:016_a?' \
+    -m 'CatISBN=marc:020_a?' \
+    -m 'CatISSN=marc:022_a?' \
+    -m 'func:split:|:CatCallNumber=marc:080_a?' \
+    -m 'CatAuthor=marc:100_a?' \
+    -m 'CatCorporateAuthor=marc:110_a?' \
+    -m 'CatTitle=special:title?' \
+    -m 'CatSubtitle=marc:245_b?' \
+    -m 'func:split:|:CatAlternateTitle=marc:246_a?' \
+    -m 'CatResponsibility=marc:245_c?' \
+    -m 'CatPlace=marc:260_a?' \
+    -m 'CatPublisher=marc:260_b?' \
+    -m 'CatDatePublished=marc:260_c?' \
+    -m 'CatPhysDesc=marc:300_a?' \
+    -m 'CatSerFrequency=marc:310_a?' \
+    -m 'CatSerHoldings=marc:362_a?' \
+    -m 'func:split:|:CatSeries=marc:490_a?' \
+    -m 'func:split:|:CatGeneralNote=marc:500_a?' \
+    -m 'func:split:|:CatNotes=marc:504_a?' \
+    -m 'func:split:|:CatTOC=marc:505_a?' \
+    -m 'func:split:|:CatAbstract=marc:520_a?' \
+    -m 'func:split:|:CatBatchNumber=marc:538_a?' \
+    -m 'func:split:|:CatLanguage=marc:546_a?' \
+    -m 'func:split:|:CatStaffNote=marc:590_a?' \
+    -m 'func:split:|:CatVolParts=marc:591_a?' \
+    -m 'func:split:|:CatFileName=marc:592_a?' \
+    -m 'func:split:|:CatAccess=marc:596_a?' \
+    -m 'func:split:|:CatSubjects=marc:650_a?' \
+    -m 'func:split:|:CatAuthorAddedE=marc:700_a?' \
+    -m 'func:split:|:CatConfAddedE=marc:711_a?' \
+    -m 'func:split:|:CatSeries=marc:830_a?' \
+    -m 'func:split:|:CatURL=marc:856_u?' \
+    -m 'CatSerRetention=marc:866_a?' \
+\
+\
+    -m 'func:ifmatch:anchor:default:*:Kit/Combined materials\|Videocassette\|Audiocassette:KVA:Audiocassette:A:Audiocassette\|Kit/Combined materials:AK:Electronic:E:CD:CD:CD\|DVD:CDDVD:CD\|Electronic:CDE:CD\|Print:CDP:DVD:DVD:DVD\|CD:DVDCD:DVD\|Kit/Combined materials:DVDK:Electronic\|DVD:EDVD:Electronic\|Print:EP:Electronic\|USB:EU:Electronic\|CD:CDE:Kit/Combined materials\|Videocassette:KV:Microfiche:M:Microfiche\|Microfiche:M:Print:P:Print\|CD:CDP:Print\|Electronic:EP:USB:U:Videocassette:V:Videocassette\|Kit/Combined materials:VK:CatFormat=itype?' \
+\
+    -m 'item:func:ifmatch:default:*:HO:HO:TAS ANT:TAS:Cape Grim:CG:VIC:VIC:ItemLocation=marc:952_c?' \
+\
+    -m 'func:ifmatch:anchor:default:*:Annual Reports\|Climate Data:ARCD:Annual Reports\|Journal:ARJ:Annual Reports:AR:Atlases and Maps:AM:A/V Recordings\|Posters:AVP:A/V Recordings:AV:Books, Reports and Conference Proceedings\|A/V Recordings:BAV:Books, Reports and Conference Proceedings\|E-Books:BEB:Books, Reports and Conference Proceedings:B:Climate Data:CD:E-Books\|Books, Reports and Conference Proceedings:EBB:E-Books\|E-Books \(Kindle\):EBEBK:E-Books \(Kindle\):EBK:E-Books:EB:Exhibition Panel:EP:Image:I:Journal\|Books, Reports and Conference Proceedings:JB:Journal:J:Posters:P:Standards\|Posters:SP:Standards:S:Theses\|Journal:TJ:Theses:T:Website/Portal/Database:WPD:CatRecordType=marc:952_8?' \
+\
+    -m 'func:literal:MAIN=marc:952_a?' \
+    -m 'func:literal:MAIN=marc:952_b?' \
+\
+    -m 'item:ItemBarCode=barcode?' \
+    -m 'item:ItemCopyInfo=marc:952_t?' \
+    -m 'item:ItemID=marc:952_e?' \
+    -m 'item:ItemCallNumber=marc:952_o?' \
+    -m 'item:ItemVolume=marc:952_h?' \
+\
+    -m 'item:ItemDateCreated=special:date:952_d?' \
+\
+    -m 'item:ItemNotes=marc:952_z?' \
+    -m 'CatID=marc:952_i' \
+    --itemlink 'CatId=ItemCatID' \
+    --dateformat '%d/%m/%Y' \
+    -t 'itemsu.csv'
+
+### To map
+# CatDateCataloged ?
+# CatDateApproved  ?
+# CatDateCreated
+# CatDateModified
+# CatWebSiteHeading
+# CatWebSiteMP
+# CatWebSiteMP
+
+
+### skipped as not useful
+# CatSerFrequency
+# CatSerIssuesPerVol
+# CatAuthorRef
+# CatCorpAuthorRef
+# CatSeriesRef
+# CatSubjectsRef
+# CatOtherPersonRef
+# CatOtherCorpRef
+# CatFlag
+
+### skipped as empty
+# CatEditor
+# CatSource
+# CatPlace
+# CatLCCard
+# CatImage
+# CatFileName
+# CatFullText
+# CatDocsBulletin
+# CatSerSpecialIssues
+# CatSerIndexedIn
+
+# NOTES
+# Cant split subjects across marc, no way to know