Changeset 38704
- Timestamp:
- 2024-02-06T14:04:44+13:00 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-installations/intermuse/trunk/sites/intermuse/collect/ephemeral-heterogeneous/prepare/pagedimagemd.py
r38701 r38704 7 7 MetadataDirectoryRules = { 8 8 'RCM BMS chapters programmes and congress' : {}, 9 'York ïŒHMS BMS Borthwick IIIF/BMS' : {9 'York|HMS BMS Borthwick IIIF/BMS' : { 10 10 "type" : "Programme", 11 11 "publisher" : "The British Music Society of York", 12 12 "file-regex" : r'^BMS_\d+.*\.pdf$' 13 13 }, 14 'York ïŒHMS BMS Borthwick IIIF/HMS' : {14 'York|HMS BMS Borthwick IIIF/HMS' : { 15 15 "type": "Programme", 16 16 "publisher" : "The Huddersfield Music Society", … … 34 34 'New Zealand' : {}, 35 35 'York BMS 1921 single programme' : {}, 36 'BMS Annual ïŒCat. 1920 - Bodleian copy' : {},36 'BMS Annual|Cat. 1920 - Bodleian copy' : {}, 37 37 'Bradford BMS' : {}, 38 38 'Birmingham BMS' : {}, 39 'BMS Annual ïŒCat. 1922 - Lewis Foreman copy': {},39 'BMS Annual|Cat. 1922 - Lewis Foreman copy': {}, 40 40 'Blackpool BMS' : {} 41 41 } 42 43 44 def make_filename_re_safe(filename): 45 46 safe1 = re.sub(r"\.","\\.",filename) # . safe 47 safe2 = re.sub(r"\|","\\|",safe1) # | safe 48 safe3 = re.sub(r"\(","\\(",safe2) # ( 49 safe4 = re.sub(r"\)","\\)",safe3) # ) 50 51 final_safe = "^"+safe4+"$" 52 53 return final_safe 42 54 43 55 … … 77 89 ) 78 90 79 pdf_filename_re = "^"+re.sub(r"\.","\\.",pdf_filename)+"$"91 pdf_filename_re = make_filename_re_safe(pdf_filename) 80 92 81 93 metadata_fileset = { "FileSet": { "FileName": f"{pdf_filename_re}", "Descriptions": metadata_description_list } }
Note:
See TracChangeset
for help on using the changeset viewer.