Caltech Library logo


This is a collection of command line tools and web service written in Go for working with EPrints 3.3.x EPrint XML, the EPrint REST API and directly with the respository database(s).

Go base code

The programs:

The ep3apid web service is configured via a JSON “settings.json” file. The settings includes a repository id with “dsn” (Data Source Name) attribute for accessing EPrint’s MySQL database(s) and “rest” attribute holding the base URL used to access the REST API. You can define more than one repository in “settings.json”. Below is a simple example for “”’s authors repository.

        "authors": {
            "dsn": "USERNAME:SECRET@/authors",
            "base_url": "",
            "rest": "",
            "write": true,
            "default_rights": "SOME RIGHTS STATEMENT HERE",
            "default_official_url": "SOME PERMA LINK URL PREFIX HERE",
            "default_collection": "COLLECTION_NAME_HERE",
            "default_refereed": "DEFAULT_VALUE_IN_REFEREED_FIELD_FOR_ARTICLES",
            "default_status": "EVENT_STATUS_E_G_INBOX_OR_BUFFER_OR_ARCHIVE",

In the “dsn” attribute USERNAME:SECRET are the username/password for accessing the database. In the “rest” attribute the USERNAME:SECRET are the username/password for accessing the REST API.

Use case

Two primary use cases have driven development of EPrinttools

  1. Reusing the metadata and content in our EPrints 3.3.16 repositories (see Caltech Library Feeds
  2. Populating our EPrints repository from standardize data sources (see Acacia Project).

Related GitHub projects