Compare commits

...

3 Commits

Author SHA1 Message Date
Sebastian Meyer b5ec6ea083 Update README 2023-09-29 20:30:53 +02:00
Sebastian Meyer 252999576d Add .gitignore 2023-09-29 20:29:54 +02:00
Sebastian Meyer 78466667a0 Add EditorConfig file 2023-09-29 20:29:44 +02:00
3 changed files with 16 additions and 3 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/vendor/

View File

@ -1,6 +1,6 @@
# Simple OAI-PMH 2.0 Data Provider
This is a stand-alone and easy to install data provider implementing the [Open Archives Initiative's Protocol for Metadata Harvesting (OAI-PMH)](https://openarchives.org/pmh/). It serves records in any metadata format from directories of XML files using the directory name as `metadataPrefix`, the filename as `identifier` and the filemtime as datestamp. 0-byte files are considered deleted records and handled accordingly. Resumption tokens are managed using files. Sets are currently not supported.
This is a stand-alone and easy to install data provider implementing the [Open Archives Initiative's Protocol for Metadata Harvesting (OAI-PMH)](https://openarchives.org/pmh/). It serves records in any metadata format from directories of XML files using the directory name as `metadataPrefix`, the filename as `identifier` and the filemtime as timestamp. 0-byte files are considered deleted records and handled accordingly. Resumption tokens are managed using files. Sets are currently not supported.
Just put the records as XML files in the data directory, adjust a few configuration settings and you are ready to go!
@ -12,9 +12,9 @@ A demo installation can be found [here](https://demo.opencultureconsulting.com/o
1. Run `composer create-project opencultureconsulting/oai_pmh <path>`.
2. Create a data directory in a not publicly accessible location outside of `<path>`. Create a subdirectory inside the specified data directory for every format (i. e. `metadataPrefix`) you want to provide.
2. Create a data directory in a location not publicly accessible (i. e. outside of `<path>`). Create a subdirectory inside the specified data directory for every format (i. e. `metadataPrefix`) you want to provide.
3. Copy `Configuration/Main.template.php` to `Configuration/Main.php` and adjust the settings according to your preferences. Don't forget pointing `$config['dataDirectory']` to your newly created data directory.
3. Copy `Configuration/Main.template.php` to `Configuration/Main.php` and edit the settings according to your preferences. Don't forget pointing `$config['dataDirectory']` to your newly created data directory.
4. Put the records into the respective directories according to their format. Each record has to be a separate XML file with its `identifier` as filename (e. g. the file *12345678.xml* can be adressed using the `identifier` *12345678*). Optionally you can maintain deletions by keeping 0-byte files for deleted records.