FORKED from (https://github.com/paperhive/oai-pmh/)
A nodejs module for the Open Archives Initiative Protocol for Metadata Harvesting (OAI-PMH 2.0). Use this module if you want to harvest metadata from OAI-PMH providers, e.g., arxiv.
npm install oai-pmh
import { OaiPmh } from 'oai-pmh';
const oaiPmh = new OaiPmh('http://export.arxiv.org/oai2');
const iterator = oaiPmh.listIdentifiers({from: '2017-11-01'});
for (const getNext of iterator) {
const item = await getNext;
// do something with item
}
See OaiPmh in index.js for all available commands.
Get identifiers of all arxiv articles:
oai-pmh list-identifiers http://export.arxiv.org/oai2 -p arXiv
oai-pmh get-record <baseUrl>
Options:
-i, --identifier <id>
-p, --metadata-prefix <prefix>
oai-pmh identify <baseUrl>
oai-pmh list-identifiers [options] <baseUrl>
Options:
-p, --metadata-prefix <prefix>
-f, --from <DATE> from date YYYY-MM-DD or ISO8601
-u, --until <DATE> from date YYYY-MM-DD or ISO8601
-s, --set <SETSPEC> set specifier, e.g., "math"
oai-pmh list-metadata-formats [options] <baseUrl>
Options:
-i, --identifier <id>
oai-pmh list-records [options] <baseUrl>
Options:
-p, --metadata-prefix <prefix>
-f, --from <DATE> from date YYYY-MM-DD or ISO8601
-u, --until <DATE> from date YYYY-MM-DD or ISO8601
-s, --set <SETSPEC> set specifier, e.g., "math"
oai-pmh list-sets <baseUrl>