Difference between revisions of "Getting Started with the EPrints Bazaar"

From EPrints Documentation
Jump to: navigation, search
m (mention other things which can be done via the web page)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:EPrints_Bazaar]]
 
[[Category:EPrints_Bazaar]]
Currently to access the EPrints Bazaar requires a trunk (nightly) build of EPrints to be running on your server.
+
[[Category:Bazaar Package]]
  
<div style="background: yellow; border: 2px solid red; padding: 1em; text-align:center;">
+
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:
It is not advisable to run a nightly build of EPrints in a production environment.
+
* install
</div>
+
* update
 +
* disable
  
There are several ways of getting hold of a nightly build of EPrints.
+
Package management via web also has several unique functions:
 +
* EPM via web will also download the package; EPM via command line can only install an epm package downloaded by other means.
 +
* EPM files can be created and edited via web
 +
* EPM files can be published via web
  
=Debian Mirrors=
 
  
Following the guide on [[Installing_EPrints_3_via_apt_(Debian/Ubuntu)]], change the apt lines to:
+
== Commandline usage ==
  
  deb http://deb.eprints.org/ nightly/
+
[[EPrints Package Manager | epm]]' lives in ''tools/epm''.
  deb-src http://deb.eprints.org/ source/
 
  
=Other nightly builds=
+
[https://github.com/eprintsug/gitaar Gitaar] is available from Eprints User Group and eases the process of installing an EPM from git - for example a pre release or work in progress.
  
These can be found at http://trac.eprints.org/nightly/
+
== Non eprints utilities ==
  
=Amazon AMIs=
+
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
  
Every so often (when there is a significant number of changes) we will build an Amazon AMI which can found in the eu-west region by search for eprints. This AMI even comes up with the repository installed. For more on these AMIs see [[EPrints_EC2]]
+
=== Search ===
 +
 
 +
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.
 +
 
 +
==== 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 wiki categories ''Bazaar Package'' and ''EPrints Bazaar''.

Latest revision as of 05:38, 18 October 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

Package management via web also has several unique functions:

  • EPM via web will also download the package; EPM via command line can only install an epm package downloaded by other means.
  • EPM files can be created and edited via web
  • EPM files can be published via web


Commandline usage

epm' lives in tools/epm.

Gitaar is available from Eprints User Group and eases the process of installing an EPM from git - for example a pre release or work in progress.

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 wiki categories Bazaar Package and EPrints Bazaar.