Tag Archives: sword

GitHub to repository deposit

Over the past few months there have been positive shifts in the infrastructure available to archive software.  To ‘archive software’ can mean many things to many people, but for the purposes of this blog post, I’ll take the view that this is to take (well managed) code out of an existing source code control system, make a point-in-time snapshot of the code, and deposit that into a long-term repository, along with some basic descriptive metadata.

To this end, both Figshare and Zenodo have recently developed and released integrations into GitHub.  These both allow the depositor to easily take a copy of their code from GitHub, and deposit it into the respective repository.  One of the key benefits of doing this is that the repository platforms are then able to assign a persistent DataCite DOI (Digital Object Identifier) to the software, which makes it easier to cite and track through scholarly literature.

As one of the developers of the open SWORD deposit protocol that facilitates the deposit of resources into repositories, I thought it would be good to try and re-create this functionality using SWORD.  Below is the ‘recipe’ of how this works…

Step one (optional): Setup your browser with a bookmark
To make it easier to deposit code from GitHub, you can install a ‘bookmarklet‘ that automatically detects that GitHub repository, and lets the deposit system know where this is.  This means that from any GitHub repository, you can click on the bookmark to deposit the code.  To install it, visit http://easydeposit.swordapp.org/example/github/easydeposit/ and drag the bookmarklet at the bottom of the page to your browser’s bookmark bar:

Install bookmarklet

Step two: Choose the GitHub repository to deposit

GitHub makes use of accounts and repositories.  Each user of the service has an account, and each account can create multiple code repositories.  URLs for GitHub are in the form of https://github.com/{account}/{repository}, for example the PHP programming language is stored in GitHub: https://github.com/php/php-src (php is the account name, and php-src is the code repository for the PHP language).

Choose the GitHub repository that you wish to deposit in the repository by opening the repository in your browser.  In the example below, this is the DSpace repository platform’s code repository:

Choose repository

Step three: Click the bookmark!
If you click the ‘GitHub Deposit’ bookmark that you created earlier, this will redirect you to a SWORD deposit system.  The bookmarklet contains javascript that passes the URL of the GitHub repository to the deposit client, and populates the form automatically.  Alternatively you can just visit http://easydeposit.swordapp.org/example/github/easydeposit/ and enter the URL of the repository yourself:

Click bookmark

Step four: Download the code

Clicking ‘Next >’ will initiate the download of the latest version of the code (‘master’ in git terminology).  Depending on the size of the repository, this may take a few seconds.  The code isn’t doing anything clever, and unlike the Zenodo and Figshare integrations, it doesn’t make use of the GitHub API.  Instead, it downloads the master.zip file by constructing a URL such as https://codeload.github.com/DSpace/DSpace/zip/master.   It then uses basic metadata such as the title of the repository (title), the account holder (author), the URL of the repository (link) and the latest check-in comment and revision hash (abstract).  These are then presented back to you to confirm:

Verify metadata

Step five: Perform the deposit
Upon clicking the deposit button, the code will then translate the metadata into a METS file, and zip that up alongside the downloaded code bundle.  All this is then deposited into the demo DSpace server (http://demo.dspace.org/).  Assuming the deposit works, you’ll be presented with the URL of the deposited code.  In this case, it is a ‘handle’, but to all intents and purposes that is a DOI, and DSpace can be configured to issue DOIs.

Handle issued

Step six: View the code

To see the deposited code in the repository, just click on the handle link!  For example, http://hdl.handle.net/10673/51. This will take you to the repository, where the metadata can be seen, and the code downloaded!

Code in the repository

This isn’t a highly polished integration, and was thrown together in a couple of hours, by adding it as an optional ‘step’ in the configurable web-based deposit client ‘EasyDeposit‘.  But it is a good demonstration that creating small tools that archive code into SWORD-compliant repositories (DSpace, EPrints, Fedora, etc) can be achieved quite quickly!site

Android SWORD deposit mobile app

As part of the Open Repositories 2011 Developers Challenge, our team submitted a few different prototypes that formed our vision of ‘The Future of Repositories’.  Our whole entry centered around the theme of ‘Raas’, or ‘Repository as a Service’.  The notion of RaaS included the ability for the Repository become a commodity which could be switched in and out of our infrastructure.  In order for this to happen we required interoperability at multiple levels – we demonstrated two: ingest (using SWORD) and discovery (using Solr).

One of the prototypes was a new deposit application using SWORD.  It was written for the Android mobile operating system, and was designed to deposit photographs into repositories.  The use case for this is for social scientists who want to capture photographs straight into trusted storage – a repository.  One of the benefits of taking photographs with mobile phones is that they are usually now geo-tagged using the in-built GPS functionality to stamp the photo with the location where it was taken.  Of course the modern smartphone is a great data collection device, and could be used to capture many different kids of data, ready for deposit.  The notion of ‘citizen science‘ could come in to play here with a large set of distributed data collection devices in the pockets of millions of cell phone users.

Android has a nice ‘Share’ system, where applications are able to share files with one another.  If you take a photo or look at one in the photo gallery application, you should be able to find the ‘Share’ option.  From here you can share the photo with applications that know how to consume photos, such as posting to Facebook, sending as email attachements, or adding to tweets on Twitter.  Using our new application called ‘SWORD Share’, you can now deposit the photos into a repository!

If you have an Android phone, launch the marketplace application, and search for ‘sword share’.  Alternatively visit https://market.android.com/details?id=org.skylightui.swordshare&feature=search_result or scan the QR code.

When you launch the application you’ll be prompted to enter your SWORD server details: Author name, username, password, and the deposit URL.  If you don’t have easy access to a repository, you could try depositing to the DSpace Demo Server.  Use the following details: Name: Your name, Username: dspacedemo+admin@gmail.com, Password: dspace, Deposit URL: http://demo.dspace.org/sword/deposit/10673/39403

You will then be able to ‘share’ a photo you have taken, and a username and password, and deposit it to the repository.  Once the deposit has finished, you’ll be given the URL of the deposited item.  Just one thing to note if you use the demo.dspace.org system: It looks like the handle server isn’t currently running on that server, therefore if you receive a URL back such as http://hdl.handle.net/10673/{12345}, to see your item, instead visit http://demo.dspace.org/jspui/handle/10673/{12345}.

I’d be interested to hear about your ideas for the application, and if it worked OK for you!

Of course the code is open source, and housed in github.авито москва объявления

SWORD PHP Library – version 1.0 finally released!

After over 2.5 years of development and refinement, I have finally released version 1.0 of the SWORD PHP library! The library has been relatively stable for quite some time now, and is firmly embedded in tools such as EasyDeposit and OJS.

The other reason that I wanted to get it released (after many earlier 0.x version releases) is that the SWORD v2 development work is now starting, and therefore my attention needs to focus on that for a while.  There is now a github repository to host that:

I owe a big thank you to all the people who have contributed or used the library over the years, because of the feedback and patches, the code is now stable and works well.объявление в интернете

EasyDeposit now supports Shibboleth

Just a quick note to say that the latest release of EasyDeposit now supports Shibboleth authentication. Or to be precise, it supports any form of authentication where the user’s details are passed via HTTP headers / environment variables. This includes other SSO (Single Sign-On) systems such as CoSign.

To use, select the ‘ssologin’ step as the first step.  Edit the settings to state which headers to look at, and it should all work.  Of course you’ll need to configure your web server and single sign-on system to protect your EasyDeposit installation directory.

odno-lom

Recent writing

This blog has been pretty quiet over the past few months.  There are a few reasons for that!

First, I’ve been working in my spare time as the Community Manager for the new JISC-funded ‘SWORD v2‘ project.  The role is partially project-manager (in terms of paperwork, project plans, etc), but mostly community management (managing email lists, creating a panel of experts, maintaining a web site, writing blog posts, creating a wikipedia entry, sending twitter updates etc).

In addition, I was commissioned to write a couple of pieces for IBM’s ‘DeveloperWorks’ web site:

  • Technical standards in education, Part 3: Open repositories for scholarly communication
    Enhancing access to research: Universities and research institutions use open repositories to enhance how they manage the outputs of their research activities, and make that research available to a worldwide audience. This article outlines the history and challenges of scholarly communication in today’s open environment. It describes some of the different standards and technical challenges relating to collecting, storing, preserving, transferring, and providing access to research using open repositories.
  • Technical standards in education, Part 4: Interoperable resource deposit using SWORD
    Using the SWORD protocol to deposit content into heterogeneous repositories: Open repositories are becoming a key component of the scholarly communication landscape as they allow cutting edge research to reach wider audiences. For open repositories to work effectively, they must make use of common standards to interoperate. A repository ingests new content, either through its own user interface or through a web service. The Simple Web-service Offering Repository Deposit (SWORD) protocol is the standard by which most open repositories allow remote deposit. This article describes the SWORD protocol, why it was developed, possible use cases, and an overview of how it works.

These two articles are part of a series ‘Technical standards in education‘.аутсорсинг интернет магазина

The SWORD course videos now online

I recently blogged about ‘The SWORD Course’, as the slides had been put onto slideshare.  Now, thanks to UKOLN’s Adrian Stevenson, the videos are now available too:

  1. An Introduction to SWORD: Gives an overview of SWORD, the rationale behind its creation, and details of the first three funded SWORD projects
  2. SWORD Use Cases: Provides an introduction to use cases, and examines some of the use cases that SWORD can be used for
  3. How SWORD Works: A high level overview of the SWORD protocol, lightly touching on a few technical details in order to explain how it works
  4. SWORD Clients: The reasons for needing SWORD clients are shown, followed by a tour of some of the current SWORD clients
  5. Create Your Own SWORD Client: An overview of the EasyDeposit SWORD client creation toolkit, including the chance to try it out

The complete set of videos can be found at http://vimeo.com/channels/swordappangry racer