Sam’s Greenstone Blog 11/4/2011

admin. Monday, April 11th, 2011

Hi all, welcome to another Greenstone development blog entry. Last week we finished up our work helping the FLAX team create a binary installer for FLAX that would work for any version of the Mac operating system. We also mapped out what needed to be done before we can release Greenstone 3.05 and we have started working on that. So far we’ve made decent progress and things are looking good for a release in the near future.

One of the big things that I am working on at the moment is adding extra features to the “oran” skin, which is likely to become the new default skin for Greenstone 3. In particular I have been working on various features that are present in Greenstone 2 but not available in this development skin yet, such as search term highlighting and search term frequency.

So that is what we will be continuing to work on this week.

Share your documents in Facebook or Twitter

Diego Spano. Thursday, April 7th, 2011

Greenstone has a new macro that lets you share documents in social networks or email systems, using Addtoany tool . The new macro is called _shareme_  that belongs to package Global in document.dm. The macro accepts two parameters: _1_ is the title of the link, and _2_ is the link to share. For _2_, the [srclink] is the default option, but any other metadata can be used too. The only requirement is that the value of that metadata must contain a well-formed URL that begins with “http://”.

If _2_ is left blank, then the link will point to the Greenstone version of the document.

You have to edit your format statement and add something like this:_shareme_([dc.Title],[srclink])

and then you will see “Share+, Facebook, Twitter, Mail , LinkedIn” icons.

_Share_ Icons

There is also a brief version called _sharemesmall_ that requires the same parameters and only shows Share+ icon.

_Sharemesmall_ Icons

The macro code is available with version 2.84. If you are using v.2.83 or earlier you have to edit document.dm file and add the following block:

**** Macro code – Begin ****

package Global

# Social network support
# Defined here in document, as the most likely place this will be used in
# within a document view, however its package is 'Global' because you
# might equally want this in a search or browse list

# _1_ = e.g. title
# _2_ = [srclink] or left empty.  If left empty, then it will share the internal GS document

_sharemescript_ {

<script type="text/javascript">
function fullDomainURL(localURL)
\{
return window.location.protocol+'//'+window.location.host+localURL;
\}
</script>

<script type="text/javascript">
var a2a_config = a2a_config || \{ \};
a2a_config.linkname = "_1_";

_If_(_2_,
var srclink = \'_2_\';

//If metadata value is a valid URL that starts with xxx://
// (e.g. any protocol\, http, https\, ftp ...) then that will be the link to share
if (srclink.match(/^[^:]+:\\\/\\\//i)) \{
a2a_config.linkurl = srclink;
\}
else \{
//if metadata value is [srclink] then we have to cut off the 'href' tag label
var href = srclink.match(/href=\"([^\"]*)\"/);
a2a_config.linkurl = fullDomainURL(href[1]);
\}
,
//if no metadata was passed as link\, then the GS version of the document will be used.
a2a_config.linkurl = fullDomainURL("_gwcgi_")+ "?c=_cgiargc_&a=d&d=_cgiargd_";
)
</script>
}

_shareme_ {

<div style=\'padding-left:50px;\' class=\'a2a_kit a2a_default_style\'>
_sharemescript_(_1_,_2_)
<center>
<a class=\'a2a_dd\' href=\'http://www.addtoany.com/share_save\'>Share</a>
<span class=\"a2a_divider\"></span>
<a class=\'a2a_button_facebook\'></a>
<a class=\'a2a_button_twitter\'></a>
<a class=\'a2a_button_email\'></a>
<a class=\'a2a_button_linkedin\'></a>
</center>
<script type=\"text/javascript\" src=\"http://static.addtoany.com/menu/page.js\"></script>
</div>
}

_sharemesmall_ {

<span style=\'padding-left:8px;\' class=\'a2a_kit a2a_default_style\'>
_sharemescript_(_1_,_2_)
<a class=\'a2a_dd\' href=\'http://www.addtoany.com/share_save\'>Share</a>
<script type=\"text/javascript\" src=\"http://static.addtoany.com/menu/page.js\"></script>
</span>
}

**** Macro code – End ****

Greenstone 2.84 released!

ak19. Friday, April 1st, 2011

After last week’s bug discovery got fixed at the start of this week (there were issues with HTML files that had non-English filenames interlinking on a Mac OS), we went back to testing the Greenstone binaries on Windows, Linux and Mac. Finally, after uploading all the files onto SourceForge and adjusting the pages there as well as updating Greenstone.org’s own download page, we succeeded in releasing Greenstone 2.84 today!

To grab the Greenstone 2.84 binary for your operating system, visit the download page at Greenstone.org. This page also has the source distributions available in zip and tar.gz formats. Otherwise, you can always expand your binary installation with source code by grabbing the “source-component” archive files from the same download page.

The Greenstone 2.84 Release Notes contain installation instructions as well as details on how to use the latest Greenstone extensions like the PDFBox extension (for later versions of PDF) and OpenOfficeConverter (which can handle the latest Office docx format).

Anu’s entry for the week ending 25 March 2011

ak19. Monday, March 28th, 2011

This week we tried to get Greenstone 3 to work on on Dr John Brine’s 64-bit Mac OS 10.6.6 machine (with Update 3) so that the Flax developers could make sure that Flax, which works with Greenstone 3, would run as well.

We didn’t have admin access on Professor Witten’s machine of similar specs, and therefore could not install the Java Developer Package which would contain the jni.h and other header files that had been relocated since Mac 10.6 Update 3 and whose absence prevented proper compilation on such Macs. However, on Dr John Brine’s machine, having admin privileges meant we could install this and get Greenstone 3 to compile on a Snow Leopard Update 3 at last. Running was  a separate issue: there were problems with the server. Sam discovered that the Java Developer Package (which contained JDK 1.6.0) would be 64 bit as well and found a flag to force Java to run in a 32 bit mode: -d32. Upon using that flag to launch the Apache web server, things ran smoothly on the server side of things. There are still issues with GLI opening collections and re-building collections in Greenstone which we will be returning to later.

Some configure and makefiles were updated to allow Greenstone to compile without compiling up wvware (since this had libiconv problems on the Mac 10.6.6, and compiling up gnome-lib on the machine has issues of its own). The –disable-wvware will allow us to temporarily bypass that and focus on other problems first.

In between, another staff member had moved his 3-year old Greenstone 3 installation elsewhere and his Greenstone web-service related application had stopped working. We got a new version of Greenstone 3 and made some configuration changes to get it all to work again.

Then it was back to testing Greenstone 2.84 to ensure that the important fixes Sam and Dr Bainbridge had made in the last weeks interacted well. I’m onto Mac testing at the moment. By Friday, we discovered that while documents with non-English unicode filenames were mostly working on the Mac, HTML files that interlinked (where the links referred to non-English filenames either directly or in URL-encoded format) did not. We started investigating this.

Sam’s Greenstone Blog 24/3/2011

admin. Thursday, March 24th, 2011

Hello Greenstone users, welcome to week 4 of my weekly blog about Greenstone development. This week I have spent most of my time working with the developers of FLAX to create an installer that will work on the most recent versions of the MacOS operating system. Those of you that use FLAX may know that it is built upon Greenstone 3 and, up until this week, the developers of the FLAX have used a modified version of the system that is used to create our Greenstone binary installers (which we internally call the release kits). I have been working with them to merge their modifications into the main release kit code so that they no longer need to keep a modified version and can simply have the release-kits enable FLAX compilation with a single switch. As part of this, several extra features were added to the Greenstone 3 compilation script, such as the ability to disable GLI and GEMS, and disabling JNI now correctly excludes the files that use it from the compilation process.

We now know enough about the Mac issues I discussed in my previous blog entry to create a version of FLAX that will (hopefully) work correctly on both the older versions and the new versions of the MacOS operating system. This is still an unsolved issue for Greenstone 3, but this is a low priority for us at the moment as the majority of our focus is on releasing Greenstone 2.84, which is currently in its final stage of testing.

See you all next week!

Sam’s Greenstone Blog 21/3/2011

admin. Monday, March 21st, 2011

I don’t really have a lot to report from last week as I was away sick for some of it. We have been investigating problems with Greenstone 3 on the most recent versions of Mac OS. As some of you may know, Greenstone 3 is programmed heavily in Java which is ideal for cross platform development. Unfortunately for us, Apple recently decided to deprecate Java on their operating system and – to cut a long story short – it makes things much more messy for us. There is also an issue on some Macs (presumably ones with later versions of the compiler we use), where they attempt to compile Greenstone as if it is 64-bit. Although we are currently working on a pure 64-bit version of Greenstone it is currently not at the stage where it is ready to be included into the main part of the code. Unfortunately we only have limited access to computers with the latest Mac OS, so finding a solution to this problem may have to wait till we can get more permanent access to a machine like this.

Anyway, see you next week!

Sam’s Greenstone Blog 11/3/2011

admin. Friday, March 11th, 2011

Welcome to week two of my new weekly blog about developing Greenstone.

This week has been quite successful as I have managed to achieve all of the things I set out to do in the previous blog and more. The ‘Oran’ skin is nearing completion now, we just need to get some real users in so we can evaluate both its functionality and its appearance.

As well as there being the small Javascript error in the Berry Basket code that I mentioned last time, there was also a bigger issue that was preventing us from displaying the quick search box on one of the Berry Basket pages. As some of you may know, Greenstone 3 uses technologies such as XML and XSLT to generate the web pages of the Greenstone Reader’s Interface. Greenstone 3 itself is made up of various Actions (that produce the XML for various types of pages) and Services (used by the Actions to do the hard work like retrieving document content or perform a query on a collection), one of which being the Berry Basket service. The quick search box requires information about TextQuery service in the collection that the user is currently within in order to generate a search box that will search that specific collection. The way one of the Berry Basket pages is created however does not make it easy for this collection information to be accessed. It uses a General action who’s ‘c’ parameter stands for Cluster instead of the more-standard Collection, so simply giving the action the current collection in the ‘c’ parameter was not sufficient as it would be for most other pages. We eventually decided that the tidiest fix was to save the collection in the ‘p.c’ parameter and to modify the Receptionist (the part of the code that produces the necessary extra information about that collection) to first look for the current collection in the ‘c’ parameter and if that did not exist then use the ‘p.c’ parameter.

If you’re still here then well done! My average day as a programmer consists of solving lots of these little problems. It may not sound very interesting to the average person but there is definitely a good sense of satisfaction when you find a way to solve these complex problems.

This week I also added a handy little feature that will prompt a user if they make a change in the preferences page and try to leave the page without hitting the “Set preferences” button. It asks them if they want to save their preferences, and if do it will go ahead and save it for them and take them to their new page. Doing this in a way that worked happily on all of the major browsers (Internet Explorer, Mozilla Firefox, Google Chrome and Apple Safari) was actually quite tricky. One way that I implemented worked happily on IE and Firefox but refused to work on Chrome/Safari. This ended up requiring a whole different approach, (involving a synchronous AJAX call in the “beforeunload” Javascript event for those who have some Javascript experience).

Anyway, that’s enough for this week. See you next week!

Sam’s Greenstone Blog 7/3/2011

admin. Monday, March 7th, 2011

Ok, so one of the things us Greenstone developers are going to try to do from now on is blog each week about what we’ve achieved that week. Ideally we’ll try to do it on Fridays, before we leave for the weekend (so this entry is a few days late).

This week I have been working hard on the development of the new default skin for Greenstone 3 – codenamed the ‘Oran’ skin. For those of you who don’t know, Oran worked here before me and I effectively took his place when he moved on to a new job. One of the things that he had been working on was this new and fresh-looking skin for Greenstone 3, and this week I have been working hard to get it ready for the Greenstone 3.05 release which will happen later in the year.

One new feature that is worth mentioning is the addition of a quick search area that is permanently in the header of the page (assuming the collection has basic query capabilities). So regardless if you’re browsing or reading a document, a basic search field is always available.

I have also been working on fixing the Berry Basket feature that was added into Greenstone 3 a while ago but had stopped working due to other changes that had been made. Having fixed the main problem (a small javascript issue) I then discovered that it did not work correctly in Internet Explorer. So this week I will be focusing on that and other Greenstone 3 user interface related issues.

Release Candidate 2 of Greenstone 2.84 out

ak19. Friday, February 25th, 2011

After a lot more testing, discovering bugs, fixing bugs and further testing, we’ve finally generated our 2nd release candidate for Greenstone 2.84. This time, there’s also a binary for the MacOS (tested on Leopard).

Most of the bugs this time round (after Release Candidate 1) had to do with dynamically linked libraries on the MacOs, getting the new document plugins from Greenstone Extensions to work when the Greenstone server is on a remote machine, Imagemagick processing JPEG2000 images on Linux machines, and fixing some issues around installing Greenstone on Windows in a path containing spaces.

Things seem to look good so far (but we’d appreciate independent confirmation of it), so if you haven’t already, do grab a copy and try it out. And tell us about your discoveries: any difficulties, bugs or other insights, so that we can make the final release of Greenstone 2.84 perfect.

Greentone 2.84 has cool new features, including the long-awaited ability to process docx and other new Office formats, as well as recent versions of PDF documents. These features are available as extensions to Greenstone, for which the details can be found in the Release Notes.

Download the Greenstone 2.84 RC2 from the Snapshots page.

The Greenstone wiki page 2.84 Release Notes has information on installation, running, where to get the new Greenstone extensions and more.

Greenstone-Koha Integrated LIVE CD v0.6

admin. Wednesday, November 3rd, 2010

HealthNet Nepal in Kathmandu has released a pilot version of the Greenstone-Koha Integrated LIVE CD on 15th October, 2010, in the framework of the Digital Library Network South Asia (DLNET-SA). The LIVE CD enables anyone with a PC to test and learn about Greenstone, the Koha integrated library system package and the application integrating these packages. Thanks are due to DLConsulting for their help in developing in the integration application and to Dr. ARD Prasad at DRTC in Bangalore for assistance in developing the LIVE CD. DLNET-SA hopes that this effort can go further and get better and better.

In this LIVE CD, there is Ubuntu with minimal a GNOME Desktop pre-configured with:

1. Greenstone Digital Library Software

2. Koha Integrated Library System

3. GSDL – Koha Integration

4. Sample Integration data

The CD Image (ISO) can be downloaded freely from Sourceforge at http://sourceforge.net/projects/gsdlkohalive/. For detailed information about the features and facts you can visit http://gsdlkohalive.sourceforge.net/.

We are constantly trying to improve this CD and come up with latest version in the upcoming releases. The current version is called v0.6 is based on Ubuntu 10.4 (32 bits) and has the following versions of applications:

1. GSDL v2.83

2. KOHA v3.2.0

Announcement released on behalf of Dr. Mohan Raj Pradhan, General Secretary, DLNET-SA