A plugin for Crossref's Labs API that handles digital preservation on Crossref deposits.
Project description
Project Op Cit
This is a plugin for the Crossref Labs API that allows for the automatic digital preservation deposit of incoming XML.
The application examines incoming XML deposits, checks for openly licensed material, and deposits it in an extensible range of digital preservation archives.
Installation
The easiest install is via pip:
pip install opcit
The entry point is the main deposit function, which takes a StarletteRequest object and a longsight Instrumentation logging object.
Background
Project Op Cit is an experimental technology that replaces the conventional Crossref deposit workflow with a new process that includes digital preservation. The application is designed to be called from the Crossref Labs API, and is not intended to be run as a standalone application.
The workflow for the application is as follows:
- The Crossref Labs API receives a deposit request.
- The Crossref Labs API calls the
deposit
function in theopcit
package. - The
deposit
function checks the incoming XML for openly licensed material. - If openly licensed material is found, the
deposit
function deposits the material in a digital preservation archive. - The
deposit
function returns a response to the Crossref Labs API, which replaces the user's resource URL with an additional resource URL for the preserved version. This triggers Chooser for multiple resolution. An example of such a landing page can be seen at https://doi.org/10.32013/12345678-23. - The Crossref Labs API returns a response to the original deposit request.
This can be visualized as follows:
At present, Op Cit will only preserve PDF files that are specified in the XML under the <resource>
element tag. The application will not preserve any other file types, and will not preserve any files that are not specified in the XML.
Usage
First, ensure that your XML contains a <resource>
tag with a mimetype
attribute and a filename
value. The mimetype
attribute should contain the MIME type of the file (bearing in mind that only PDFs will be preserved), and the filename
value should contain the URL of the file. For example:
<collection property="crawler-based">
<item crawler="iParadigms">
<resource mime_type="application/pdf">https://eprints.bbk.ac.uk/id/eprint/26645/1/9780198850489.pdf</resource>
</item>
</collection>
Second, ensure that your XML contains a <license>
tag with a applies_to
attribute and a href
value. The applies_to
attribute should contain the version of the file to which the license applies, and the href
value should contain the URL of the license. Only openly licensed material (using a Creative Commons license) will be deposited. For example:
<program xmlns="http://www.crossref.org/AccessIndicators.xsd">
<free_to_read/>
<license_ref applies_to="vor" start_date="2022-01-01">https://creativecommons.org/licenses/by/4.0/</license_ref>
</program>
Finally, repoint your deposit request to the Op Cit API. The API will return a response with the new URL of the resource, which will trigger multiple resolution and Chooser. The live version of the prototype deposit API can be found at https://api.crossref.org/deposit/preserve/.
POST requests to this URL should conform to the synchronous deposit API guidelines.
Please note that Op Cit is not suitable for mass deposits, and is intended for use with individual or small deposits only. Those making larger deposits should continue to use the XML deposit API.
Disclaimers
This is an experimental technology without guarantee of uptime or reliability and is not intended for production use. The application is not intended to be run as a standalone application, and is designed to be called from the Crossref Labs API. The application is not intended to be used for mass deposits, and is intended for use with individual or small deposits only. Those making larger deposits should continue to use the XML deposit API.
Credits
- FastAPI for the Crossref Labs API.
- Git from Linus Torvalds et al.
- .gitignore from Github.
© Crossref 2023
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file opcit-0.1.3.tar.gz
.
File metadata
- Download URL: opcit-0.1.3.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07d6549ab3c5e0a2ad657fa21e14ee819a9fa16d5dcd7df1eb132f06fb412352 |
|
MD5 | e4b478ac59a751e0de6fe2ff83b29870 |
|
BLAKE2b-256 | 21526c56288d16c13f0c9a5af21536a9e3a3e2b1ac4a05ce0887e24bea8e08c0 |
File details
Details for the file opcit-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: opcit-0.1.3-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa87c4824640e3697c965d90441f4daa89005396bb859da7f6b449f99aaac29 |
|
MD5 | 77b9f7656c6d9333cd01feec01aa9e2a |
|
BLAKE2b-256 | c93789bc7d71a02e3c2a42c4b354943cbbd6437fa8af78da98e1e25377810727 |