Adding records to Islandora: Difference between revisions

(Created page with "<big>'''This page is under construction'''</big> __TOC__ =Generating records= <pre style="min-height:38px; margin-left:2em" class="mw-collapsible mw-collapsed" data-expandtext="Expand to see script"> import requests import xml.etree.ElementTree as ET import csv from relatorDict import relatorDictionary from ShxQuartosList import ShxQuartos from holdingsTestDict import holdingsToBibDictionary headers = {'Authorization': "Token cd639621-cb39-4805-80fa-82734155d9fd"} pa...")
 
No edit summary
Line 13: Line 13:




headers = {'Authorization': "Token cd639621-cb39-4805-80fa-82734155d9fd"}
headers = {'Authorization': "Token APIKeyGoesHere"}
params = {"of":"xm"}
params = {"of":"xm"}
csvF=open("islandoraRecord.csv","w",newline='', encoding='utf-8')
csvF=open("islandoraRecord.csv","w",newline='', encoding='utf-8')
Line 825: Line 825:
writer.writerow({"title":title,"id":i,"parent_id":"","field_resource_type":"collection","field_model":"paged content","field_member_of":fullCollections,"field_weight":"","field_identifier":"","field_linked_agent":fullAssociatedNames,"field_creator":creator,"field_edtf_date":edtfDate,"field_place_published":hierarchicalPlaceName,"field_extent":extent,"field_rights":rights,"field_subject":fullSubjects,"field_note":fullNotes,"field_classification":callNums[holdingsID],"field_page_opening":"","field_contents":"","field_catalog_link":catalogLink,"field_finding_aid_link":"","field_created_published":createdPublished,"field_genre":fullGenresForms,"field_iconclass_headings":"","field_bindings_features":"","field_bindings_terms":"","field_digital_image_type":"","field_microfilm_call_number":"","field_microfilm_reduction_ratio":"","field_microfilm_length":"","field_credit":"","field_sponsored_by":"","field_bib_id":bibID,"field_holdings_id":holdingsID,"field_display_hints":"Mirador","file":"","url_alias":"/bib"+bibID+"-"+holdingsID})
writer.writerow({"title":title,"id":i,"parent_id":"","field_resource_type":"collection","field_model":"paged content","field_member_of":fullCollections,"field_weight":"","field_identifier":"","field_linked_agent":fullAssociatedNames,"field_creator":creator,"field_edtf_date":edtfDate,"field_place_published":hierarchicalPlaceName,"field_extent":extent,"field_rights":rights,"field_subject":fullSubjects,"field_note":fullNotes,"field_classification":callNums[holdingsID],"field_page_opening":"","field_contents":"","field_catalog_link":catalogLink,"field_finding_aid_link":"","field_created_published":createdPublished,"field_genre":fullGenresForms,"field_iconclass_headings":"","field_bindings_features":"","field_bindings_terms":"","field_digital_image_type":"","field_microfilm_call_number":"","field_microfilm_reduction_ratio":"","field_microfilm_length":"","field_credit":"","field_sponsored_by":"","field_bib_id":bibID,"field_holdings_id":holdingsID,"field_display_hints":"Mirador","file":"","url_alias":"/bib"+bibID+"-"+holdingsID})
writer.writerow({"title":"","id":i,"parent_id":"1","field_resource_type":"still image","field_model":"page","field_member_of":"","field_weight":"","field_identifier":"","field_linked_agent":"","field_creator":"","field_edtf_date":"","field_place_published":"","field_extent":"","field_rights":rights,"field_subject":"","field_note":"","field_classification":callNums[holdingsID],"field_page_opening":"","field_contents":"","field_catalog_link":"","field_finding_aid_link":"","field_created_published":"","field_genre":"","field_iconclass_headings":"","field_bindings_features":"","field_bindings_terms":"","field_digital_image_type":digitalImageType,"field_microfilm_call_number":"","field_microfilm_reduction_ratio":"","field_microfilm_length":"","field_credit":"","field_sponsored_by":"","field_bib_id":"","field_holdings_id":"","field_display_hints":"Mirador","file":"","url_alias":"/img"})
writer.writerow({"title":"","id":i,"parent_id":"1","field_resource_type":"still image","field_model":"page","field_member_of":"","field_weight":"","field_identifier":"","field_linked_agent":"","field_creator":"","field_edtf_date":"","field_place_published":"","field_extent":"","field_rights":rights,"field_subject":"","field_note":"","field_classification":callNums[holdingsID],"field_page_opening":"","field_contents":"","field_catalog_link":"","field_finding_aid_link":"","field_created_published":"","field_genre":"","field_iconclass_headings":"","field_bindings_features":"","field_bindings_terms":"","field_digital_image_type":digitalImageType,"field_microfilm_call_number":"","field_microfilm_reduction_ratio":"","field_microfilm_length":"","field_credit":"","field_sponsored_by":"","field_bib_id":"","field_holdings_id":"","field_display_hints":"Mirador","file":"","url_alias":"/img"})
</pre>
<pre style="min-height:38px; margin-left:2em" class="mw-collapsible mw-collapsed" data-expandtext="Expand to see script">
relatorDictionary={
"abridger": "relators:abr",
"actor": "relators:act",
"adapter": "relators:adp",
"addressee": "relators:rcp",
"analyst": "relators:anl",
"animator": "relators:anm",
"annotator": "relators:ann",
"appellant": "relators:apl",
"appellee": "relators:ape",
"applicant": "relators:app",
"architect": "relators:arc",
"arranger": "relators:arr",
"art copyist": "relators:acp",
"art director": "relators:adi",
"artist": "relators:art",
"artistic director": "relators:ard",
"assignee": "relators:asg",
"associated name": "relators:asn",
"attributed name": "relators:att",
"auctioneer": "relators:auc",
"author": "relators:aut",
"author in quotations or text abstracts": "relators:aqt",
"author of afterword, colophon, etc.": "relators:aft",
"author of dialog": "relators:aud",
"author of introduction, etc.": "relators:aui",
"autographer": "relators:ato",
"bibliographic antecedent": "relators:ant",
"binder": "relators:bnd",
"binding designer": "relators:bdd",
"blurb writer": "relators:blw",
"book designer": "relators:bkd",
"book producer": "relators:bkp",
"bookjacket designer": "relators:bjd",
"bookplate designer": "relators:bpd",
"bookseller": "relators:bsl",
"braille embosser": "relators:brl",
"broadcaster": "relators:brd",
"calligrapher": "relators:cll",
"cartographer": "relators:ctg",
"caster": "relators:cas",
"censor": "relators:cns",
"choreographer": "relators:chr",
"collaborator": "relators:clb",
"cinematographer": "relators:cng",
"client": "relators:cli",
"collection registrar": "relators:cor",
"collector": "relators:col",
"collotyper": "relators:clt",
"colorist": "relators:clr",
"commentator": "relators:cmm",
"commentator for written text": "relators:cwt",
"compiler": "relators:com",
"complainant": "relators:cpl",
"complainant-appellant": "relators:cpt",
"complainant-appellee": "relators:cpe",
"composer": "relators:cmp",
"compositor": "relators:cmt",
"conceptor": "relators:ccp",
"conductor": "relators:cnd",
"conservator": "relators:con",
"consultant": "relators:csl",
"consultant to a project": "relators:csp",
"contestant": "relators:cos",
"contestant-appellant": "relators:cot",
"contestant-appellee": "relators:coe",
"contestee": "relators:cts",
"contestee-appellant": "relators:ctt",
"contestee-appellee": "relators:cte",
"contractor": "relators:ctr",
"contributor": "relators:ctb",
"copyright claimant": "relators:cpc",
"copyright holder": "relators:cph",
"corrector": "relators:crr",
"correspondent": "relators:crp",
"costume designer": "relators:cst",
"court governed": "relators:cou",
"court reporter": "relators:crt",
"cover designer": "relators:cov",
"creator": "relators:cre",
"curator": "relators:cur",
"dancer": "relators:dnc",
"data contributor": "relators:dtc",
"data manager": "relators:dtm",
"dedicatee": "relators:dte",
"dedicator": "relators:dto",
"defendant": "relators:dfd",
"defendant-appellant": "relators:dft",
"defendant-appellee": "relators:dfe",
"degree granting institution": "relators:dgg",
"degree supervisor": "relators:dgs",
"delineator": "relators:dln",
"depicted": "relators:dpc",
"depositor": "relators:dpt",
"designer": "relators:dsr",
"director": "relators:drt",
"dissertant": "relators:dis",
"distribution place": "relators:dbp",
"distributor": "relators:dst",
"donor": "relators:dnr",
"draftsman": "relators:drm",
"dubious author": "relators:dub",
"editor": "relators:edt",
"editor of compilation": "relators:edc",
"editor of moving image work": "relators:edm",
"electrician": "relators:elg",
"electrotyper": "relators:elt",
"enacting jurisdiction": "relators:enj",
"engineer": "relators:eng",
"engraver": "relators:egr",
"etcher": "relators:etr",
"event place": "relators:evp",
"expert": "relators:exp",
"facsimilist": "relators:fac",
"field director": "relators:fld",
"film director": "relators:fmd",
"film distributor": "relators:fds",
"film editor": "relators:flm",
"film producer": "relators:fmp",
"filmmaker": "relators:fmk",
"first party": "relators:fpy",
"forger": "relators:frg",
"former owner": "relators:fmo",
"funder": "relators:fnd",
"geographic information specialist": "relators:gis",
"graphic technician": "relators:grt",
"honoree": "relators:hnr",
"honouree": "relators:hnr",
"host": "relators:hst",
"host institution": "relators:his",
"illuminator": "relators:ilu",
"illustrator": "relators:ill",
"inscriber": "relators:ins",
"instrumentalist": "relators:itr",
"interviewee": "relators:ive",
"interviewer": "relators:ivr",
"inventor": "relators:inv",
"issuing body": "relators:isb",
"judge": "relators:jud",
"jurisdiction governed": "relators:jug",
"laboratory": "relators:lbr",
"laboratory director": "relators:ldr",
"landscape architect": "relators:lsa",
"lead": "relators:led",
"lender": "relators:len",
"libelant": "relators:lil",
"libelant-appellant": "relators:lit",
"libelant-appellee": "relators:lie",
"libelee": "relators:lel",
"libelee-appellant": "relators:let",
"libelee-appellee": "relators:lee",
"librettist": "relators:lbt",
"licensee": "relators:lse",
"licensor": "relators:lso",
"lighting designer": "relators:lgd",
"lithographer": "relators:ltg",
"lyricist": "relators:lyr",
"manufacture place": "relators:mfp",
"manufacturer": "relators:mfr",
"marbler": "relators:mrb",
"markup editor": "relators:mrk",
"medium": "relators:med",
"metadata contact": "relators:mdc",
"metal-engraver": "relators:mte",
"minute taker": "relators:mtk",
"moderator": "relators:mod",
"monitor": "relators:mon",
"music copyist": "relators:mcp",
"musical director": "relators:msd",
"musician": "relators:mus",
"narrator": "relators:nrt",
"onscreen presenter": "relators:osp",
"opponent": "relators:opn",
"organizer": "relators:orm",
"originator": "relators:org",
"other": "relators:oth",
"owner": "relators:own",
"panelist": "relators:pan",
"papermaker": "relators:ppm",
"patent applicant": "relators:pta",
"patent holder": "relators:pth",
"patron": "relators:pat",
"performer": "relators:prf",
"permitting agency": "relators:pma",
"photographer": "relators:pht",
"plaintiff": "relators:ptf",
"plaintiff-appellant": "relators:ptt",
"plaintiff-appellee": "relators:pte",
"platemaker": "relators:plt",
"praeses": "relators:pra",
"presenter": "relators:pre",
"previous owner": "relators:fmo",
"printer": "relators:prt",
"printer of plates": "relators:pop",
"printmaker": "relators:prm",
"process contact": "relators:prc",
"producer": "relators:pro",
"production company": "relators:prn",
"production designer": "relators:prs",
"production manager": "relators:pmn",
"production personnel": "relators:prd",
"production place": "relators:prp",
"programmer": "relators:prg",
"project director": "relators:pdr",
"proofreader": "relators:pfr",
"provider": "relators:prv",
"publication place": "relators:pup",
"publisher": "relators:pbl",
"publishing director": "relators:pbd",
"puppeteer": "relators:ppt",
"radio director": "relators:rdd",
"radio producer": "relators:rpc",
"recording engineer": "relators:rce",
"recordist": "relators:rcd",
"redaktor": "relators:red",
"renderer": "relators:ren",
"reporter": "relators:rpt",
"repository": "relators:rps",
"research team head": "relators:rth",
"research team member": "relators:rtm",
"researcher": "relators:res",
"respondent": "relators:rsp",
"respondent-appellant": "relators:rst",
"respondent-appellee": "relators:rse",
"responsible party": "relators:rpy",
"restager": "relators:rsg",
"restorationist": "relators:rsr",
"reviewer": "relators:rev",
"rubricator": "relators:rbr",
"scenarist": "relators:sce",
"scientific advisor": "relators:sad",
"screenwriter": "relators:aus",
"scribe": "relators:scr",
"sculptor": "relators:scl",
"second party": "relators:spy",
"secretary": "relators:sec",
"seller": "relators:sll",
"set designer": "relators:std",
"setting": "relators:stg",
"signer": "relators:sgn",
"singer": "relators:sng",
"sound designer": "relators:sds",
"speaker": "relators:spk",
"sponsor": "relators:spn",
"sponsoring body": "relators:spn",
"stage director": "relators:sgd",
"stage manager": "relators:stm",
"standards body": "relators:stn",
"stereotyper": "relators:str",
"storyteller": "relators:stl",
"supporting host": "relators:sht",
"surveyor": "relators:srv",
"teacher": "relators:tch",
"technical director": "relators:tcd",
"television director": "relators:tld",
"television producer": "relators:tlp",
"thesis advisor": "relators:ths",
"transcriber": "relators:trc",
"translator": "relators:trl",
"type designer": "relators:tyd",
"typographer": "relators:tyg",
"university place": "relators:uvp",
"videographer": "relators:vdg",
"vocalist": "relators:voc",
"voice actor": "relators:vac",
"witness": "relators:wit",
"wood engraver": "relators:wde",
"woodcutter": "relators:wdc",
"writer of accompanying material": "relators:wam",
"writer of added commentary": "relators:wac",
"writer of added lyrics": "relators:wal",
"writer of added text": "relators:wat",
"writer of introduction": "relators:win",
"writer of preface": "relators:wpr",
"writer of supplementary textual content": "relators:wst",
}
</pre>
<pre style="min-height:38px; margin-left:2em" class="mw-collapsible mw-collapsed" data-expandtext="Expand to see script">
ShxQuartos=[
"STC 22275",
"STC 22276",
"STC 22276a",
"STC 22277",
"STC 22278",
"STC 22279",
"STC 22279a",
"STC 22280",
"STC 22281",
"STC 22282",
"STC 22283",
"STC 22284",
"STC 22285",
"STC 22286",
"STC 22287",
"STC 22288",
"STC 22288a",
"STC 22289",
"STC 22290",
"STC 22291",
"STC 22292",
"STC 22293",
"STC 22294",
"STC 22295",
"STC 22296",
"STC 22297",
"STC 22298",
"STC 22299",
"STC 22300",
"STC 22301",
"STC 22302",
"STC 22303",
"STC 22304",
"STC 22305",
"STC 22306",
"STC 22307",
"STC 22308",
"STC 22309",
"STC 22310",
"STC 22311",
"STC 22312",
"STC 22313",
"STC 22314",
"STC 22315",
"STC 22316",
"STC 22317",
"STC 22318",
"STC 22319",
"STC 22320",
"STC 22321",
"STC 22322",
"STC 22323",
"STC 22324",
"STC 22325",
"STC 22325a",
"STC 22326",
"STC 22327",
"STC 22328",
"STC 22329",
"STC 22330",
"STC 22331",
"STC 22332",
"STC 22334",
"STC 22335",
"STC 22336",
"STC 26101",
"STC 22337",
"STC 22338",
"STC 22339",
"STC 26099",
"STC 26100",
"STC 21006",
"STC 21006a",
"STC 11075"
]
</pre>
<pre style="min-height:38px; margin-left:2em" class="mw-collapsible mw-collapsed" data-expandtext="Expand to see script">
holdingsToBibDictionary={
"230236":"128729"
}
</pre>
</pre>
=Adding images to S3=
=Adding images to S3=
=Importing records to Islandora=
=Importing records to Islandora=

Revision as of 09:06, 13 September 2024

This page is under construction

Generating records

Adding images to S3

Importing records to Islandora