Skip to content

Commit

Permalink
Update PSPL is_shown_by generation
Browse files Browse the repository at this point in the history
  • Loading branch information
lthurston committed Mar 29, 2023
1 parent 93eae58 commit 513d645
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions metadata_mapper/mappers/oai/pspl_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@


class PsplRecord(OaiRecord):
"""
TODO: the `is_shown_by` value returns an error message "Error: No 'key' parameter was provided."
"""
def map_is_shown_by(self):
identifier = self.source_metadata.get('id')
if ':' not in identifier:
return

_, record_id = identifier.rsplit(':', 1)
return "https://collections.accessingthepast.org/cgi-bin/imageserver.pl"\
f"?oid={record_id}.1.1&width=400&ext=jpg"
return f"https://collections.accessingthepast.org/?a=is&oid={record_id}.1.1"\
"&type=pagethumbnailimage&width=200"

def map_is_shown_at(self):
identifier = self.source_metadata.get('id')
Expand Down

0 comments on commit 513d645

Please sign in to comment.