Download the PHP package csun-metalab/sword-api-uploader without Composer

On this page you can find all versions of the php package csun-metalab/sword-api-uploader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sword-api-uploader

:package: SWORD API Uploader :package:

Allows for the uploading of documents in a Laravel project to a repository that uses the SWORD API.

This package is built for version 5.0 of Laravel and above.

:closed_book: Table of Contents

:wrench: Installation

To install from Composer, use the following command:

Now, add the following lines to your .env file to configure your connection to the repository:

You'll also need to add other lines further down as defined in either the Regular File Path Environment Variables section based on the type of deposit you're performing.

Next, add the service provider to your providers array in Laravel as follows:

Add the Sword facade to your aliases array in Laravel as follows:

Finally, run the following Artisan command to publish the configuration file:

The configuration file will be in config/sword.php and you can modify those values further with the config() helper function before the deposit takes place.

The packaging and deposit functionality use those configuration values in order to figure out the service document, credentials, repository identifier, and the relevant directories on the filesystem.

:earth_americas: Global Environment Variables

The environment variables you added to your .env file are the following:

SWORD_SERVICE_DOC

This is the identifier for the service document the repository uses for SWORD uploads/deposits.

SWORD_DEPOSIT

This is the identifer for the repository where SWORD uploads/deposits will be performed.

SWORD_USERNAME

This is the username that will be used for authentication during SWORD operations.

SWORD_PASSWORD

This is the password that will be used for authentication during SWORD operations.

:seat: Global Deposit Behavior Variables

You only need to add these environment variables if you want to override the default behavior during deposit operations.

SWORD_CONTENT_TYPE

Allows you to change the content type of deposits. The default is application/zip.

SWORD_PACKAGING

Allows you to change the packaging format of deposits. The default is http://purl.org/net/sword-types/METSDSpaceSIP (METS format for a DSpace repository).

SWORD_ON_BEHALF_OF

Allows you to set the X-On-Behalf-Of header during deposits. The default is an empty string.

SWORD_NO_OP

Allows you to set the X-No-Op header during deposits. The default is false.

SWORD_VERBOSE

Allows you to set the X-Verbose header during deposits. The default is false.

:mortar_board: Thesis File Path Environment Variables

You need to add these environment variables if you are performing deposits for theses or academic dissertations.

Add the following values to your .env file and then configure them appropriately based on their descriptions:

SWORD_THESIS_DOCUMENT_ROOT_IN

This is the directory on the filesystem that holds the single thesis document file (PDF, DOCX, etc) that will be packaged.

SWORD_THESIS_SUPPLEMENTAL_ROOT_IN

This is the directory on the filesystem that holds any supplemental files associated with the theses.

SWORD_THESIS_PACKAGE_ROOT_OUT

This is the directory on the filesystem to where the package (ZIP file containing a thesis plus any of its supplemental files) will be written.

SWORD_THESIS_METS_ROOT_OUT

This is the directory on the filesystem to where the metadata (mets.xml) file that describes properties associated with the thesis will be written.

:page_facing_up: Regular File Path Environment Variables

You need to add these environment variables if you are performing non-thesis deposits for regular files (such as class syllabi).

Add the following values to your .env file and then configure them appropriately based on their descriptions:

SWORD_FILE_ROOT_IN

This is the directory on the filesystem where the subdirectory is located

SWORD_FILE_SUBDIR_IN

This is the directory on the filesystem containing the files that will be deposited

SWORD_PACKAGE_ROOT_OUT

This is the directory on the filesystem where the package (ZIP file containing the file to deposit) will be written.

:computer: Usage

Coming Soon!

:electric_plug: Underlying SWORD API Functionality

The underlying SWORD API functionality for packaging and depositing documents originally comes from swordapp-php-library created by Stuart Lewis.

You can find the code specific to the library here: https://github.com/swordapp/swordapp-php-library


All versions of sword-api-uploader with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package csun-metalab/sword-api-uploader contains the following files

Loading the files please wait ....