-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
624 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Retrieve and disseminate files and metadata to | ||
Cambridge University Library DSpace | ||
""" | ||
|
||
from dspaceuploader import DSpaceUploader, MetadataProfile | ||
|
||
|
||
class CULUploader(DSpaceUploader): | ||
def __init__(self, work_id, export_url, client_url, version): | ||
"""Set CUL-specific parameters and pass them to DSpaceUploader""" | ||
user_name_string = 'cam_ds7_user' | ||
user_pass_string = 'cam_ds7_pw' | ||
service_document_iri = ( | ||
'https://copim-b-dev.lib.cam.ac.uk/server/swordv2/servicedocument' | ||
) | ||
collection_iri = ( | ||
'https://copim-b-dev.lib.cam.ac.uk/server/swordv2/collection/1811/' | ||
'7' | ||
) | ||
metadata_profile = MetadataProfile.JISC_ROUTER | ||
super().__init__( | ||
work_id, | ||
export_url, | ||
client_url, | ||
version, | ||
user_name_string, | ||
user_pass_string, | ||
service_document_iri, | ||
collection_iri, | ||
metadata_profile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Retrieve and disseminate files and metadata to a DSpace repository | ||
""" | ||
|
||
from swordv2uploader import SwordV2Uploader, MetadataProfile | ||
|
||
|
||
class DSpaceUploader(SwordV2Uploader): | ||
# Currently DSpace dissemination is only implemented via SWORDv2 | ||
# This class will be extended once we implement e.g. DSpace REST API | ||
def __init__( | ||
self, | ||
work_id, | ||
export_url, | ||
client_url, | ||
version, | ||
user_name_string, | ||
user_pass_string, | ||
service_document_iri, | ||
collection_iri, | ||
metadata_profile): | ||
super().__init__( | ||
work_id, | ||
export_url, | ||
client_url, | ||
version, | ||
user_name_string, | ||
user_pass_string, | ||
service_document_iri, | ||
collection_iri, | ||
metadata_profile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ pysftp==0.2.9 | |
python-dotenv==0.19.2 | ||
requests==2.31.0 | ||
sword2==0.3.0 | ||
thothlibrary==0.20.1 | ||
thothlibrary==0.25.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
internetarchive==3.0.2 | ||
thothlibrary==0.20.0 | ||
thothlibrary==0.25.0 |
Oops, something went wrong.