Difference between revisions of "Getting Started with the EPrints Bazaar"
m (rework page to curl based search and downloading) |
m (fix syntax of link) |
||
Line 23: | Line 23: | ||
=== Search === | === Search === | ||
− | Encoded in the [ | + | Encoded in the [https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/EPM/Source.pm eprints source] are two URIs which can be used for searching, simple and simple2. simple2 accepts an optional parameter '''v'''. |
In all examples, q= is the value to search for. | In all examples, q= is the value to search for. |
Revision as of 23:33, 11 September 2018
EPrints Bazaar uses EPrints Package Manager to manage EPM packages. EPrints Package Manager has slightly different functionality via web and command line but in both cases they perform the same essential tasks:
- install
- update
- disable
EPM via web will also download the package; EPM via command line can only install an epm package downloaded by other means.
Contents
Commandline usage
epm lives in tools/epm.
Non eprints utilities
There are a couple of reasons you might want to know how to search and download without using the eprints supplied tools:
- tools/epm in eprints 3.3 doesn't support searching
- tools/epm in eprints 3.3 doesn't support downloading
- you might want to check for updates via cron and email a warning
Search
Encoded in the eprints source are two URIs which can be used for searching, simple and simple2. simple2 accepts an optional parameter v.
In all examples, q= is the value to search for.
style 1
curl --location "http://bazaar.eprints.org/cgi/search?output=EPMI2&q=DOI”
Use curl —location to follow redirection to /cgi/search/simple as is done by eprints.
style 2
optional parameter v not included, equivalent to v=_all
curl "http://bazaar.eprints.org/cgi/search/simple2?output=EPMI2&q_merge=ALL&q=DOI"
v set to 'tbc', this returns an empty list.
curl "http://bazaar.eprints.org/cgi/search/simple2?output=EPMI2&q_merge=ALL&v=tbc&q=DOI"
TODO: find out what v= actually does.
Downloading
Command to download a bazaar plugin manually requires setting a custom Accept header. Failing to do so will show the html version of the page.
curl -H "Accept: application/vnd.eprints.epm+xml" http://bazaar.eprints.org/id/eprint/545
Developing
See available guides in the EPrints Bazaar wiki category.