Wednesday, February 24, 2010

Communities and Collections in collapsable treelist, plus graphical webui.strength

Also in my dump of visual changes that may or may not be going anywhere is the Communities and Collection page with a jQuery treelist that is expandable and collapsable. As well as changing the default for to instead of showing a number, to show a little strength meter from Google Charts.

This is the snippet of code that shows the pretty little image.

out.println("<img src=\",50&chd=t:" + ic.getCount(comms[k]) + "\" />");

Luau, a DSpace admin module for Libarians

Presenting A DSpace Admin Module: 
Librarians Understandably want to stay Away from Unix
or LUAU for short.

It allows people to do some of the routine administrative server settings tasks in DSpace without touching unix. Here's the goods: No more ensuring you have the latest copy of input-forms.xml, ftp'ing it to the server, and restarting tomcat.

You can download the running config of dspace.cfg and input-forms.xml.
Upload that file, with their modifications, and restart the server.

Other features include viewing the last however many lines from a log file. Which is useful in debugging a buggered config file.

UPDATE: Adding another image so its clearer what you can be done with an admin module.

Monday, February 22, 2010

Document Preview in DSpace, using Google Docs Viewer


I've made a modification that allows a DSpace repository to embed a "preview" of the document into the page, so the user never has to leave, just to get to the good stuff.

Adding a Preview link to the item's bitstream.

Then showing the document with Google Doc's Viewer. It essentially becomes a very easy way to make your content more easily accessible, as files that are MS Word or Adobe PDF don't require the visitor to have those programs installed to view them, and load instantly on the page.

How it works
The Google Docs viewer essentially works the same as the user downloading the document to their computer and having the Adobe Reader display the file for them, however, it uses Google Docs to download the document, and then render the PDF before their eyes in real-time so that they can immediately see the document on that page.

It involves modifying to add the link and a preview box, adding four javascript functions, and used some jQuery. Going forward, I'm thinking that this builds off of Stuart Lewis' idea of having a preview anything. As this is generally a response (for documents) to:
Perhaps we should make this is into a pluggable system for DSpace 1.6 where you can register classes that can render file types, and then make a configurable option to register viewers to filetypes?

UPDATE: The code is available in a writeup at the DSpace Wiki: Document Preview with Google Docs Viewer

Friday, February 05, 2010

What is visual document search and preview?

"You may not use the Service to develop a visual document search and preview application which embeds multiple uses of the Google Docs Viewer in a single webpage for DOC, DOCX, or PPTX filetypes."
- Google Docs (view on Google Sidewiki)

So this terse statement is to prevent the user from doing something, but without really saying what not to do. I get the logic for that, because a note the says "Do Not Turn Off", will invariably get someone to flick the switch. So this is my layman's understanding of this legalese:

Please limit yourself to embedding the Viewer just once per page for files (DOC, DOCX, PPTX).

And what is this visual document search and preview? It sounds like I want one of those.

Monday, February 01, 2010

Get notified of latest IRC message onscreen with notify-osd (code)

 When working away in the editor, you see that xChat, "your IRC client" has a new message of activity, and you can't bear to not check on it. The deeper problem lies in the fact that you are like one of Pavlov's dogs and respond to activity.

 A shell script + php script that reads your xchat channel log, and then sends to notify-osd (the onscreen popup display in Ubuntu et al) that latest message.

#### ####

while [ 1 ]; do
     sleep 1m

#### main.php ####
$update_file = DIRNAME(__FILE__).'/last_updated';
$log_file = '/home/peter/.xchat2/xchatlogs/FreeNode-#dspace.log';

$last_updated = filemtime($update_file);
$last_message = filemtime($log_file);

if($last_message > $last_updated) {
        $lines = file($log_file);
        echo 'Now: '.date('M d G:i:s');
        $message = $lines[count($lines)-1];
        $cmd = "notify-send \"$message\"";
        echo $cmd;

You need to have notify-osd and/or notify-osd installed on your system. My system is Ubuntu 9.10.

Room for Improvement
The shell script checks once a minute, and only displays the last message, so intermediate messages are not shown. But the purpose was just to show a message, which should give you enough context to either care or not care. Also, its only checking the one channel, and its not presented as a command line argument. Also, it would be nice to not alert you if xChat is currently the active window.

Tuesday, January 19, 2010

Use Case: Talking on the phone while browsing data

I will admit the current Verizon and AT&T wireless squabble over one network being able to handle a voice conversation while at the same time allowing you to use the internet, does have some legitimate uses.

1) After seeing the commercial, I hadn't realized that this was a limitation of my phone, so I then tried it. It turns out, that if I disconnect from WiFi, thus does indeed happen. But I did need to be on my headset for me to still be able to talk, which I am not very often connected to.

2) While using the GPS navigation, which requires internet, I suppose a call could come through in which I would be required to interrupt a data navigation session to take the voice call. True, again another case. However, I don't drive, but when I do, its for a two hour inter-city commute that I know all too well, that the GPS is more for a driving companion, that the voice call would replace.

Final note, the flagship device of the accusing network can not actually multi-task, so although the network can do it, the device is not going to allow you to background a call to tweet your grandmother that you'll be joining her for butterscotch candies and a game of bridge. I mean how rude would it be not pay attention to Grandma's tweet because you were too busy talking on the phone?

Saturday, January 16, 2010 -- The best thing to happen to those who like music

A Software Developer friend of mine prophesized about a time in the future when music is so easy to access, that music piracy is actually less convenient. Spot on! Because I'd like to officially plug MOG.COM as the best music website.

Whats so great about this music website? I already have a way of "how I get my music".
Well, here's my favorite features.

  • Play any Artist, Album, Song, and have it stream instantly, or fill a queue to play
  • Make a playlist just by adding any song you want to it, you can then share that playlist.
  • Artist Playlists! Artists from David Byrne to Elvis Costello, make monthly playlists which are a mashup of awesome, and you just click it, and its in your play queue.
  • You can "follow" others who have good musical taste, and what they like will show up in your feed. Its like your brother-in-law who you only catch up with twice a year to get music ideas, being able to add music to your check-this-out list as they like it.
  • Its only $5 / month. Less if you do it 6 months at a time. Thats like half an album on iTunes. So you'll probably die trying to build a music empire on iTunes, while I've already listened to all music ever. Or you'll have issues like having to run out of space or the time it takes to sync your device. Or, you could just connect your mobile device to their web service and have music on the go. * Mobile Apps come out in Spring, ** Internet is not so good in tunnels

I'm sure it will continue to get better, and plus it doesn't have crappy ads all over the place.

Friday, January 15, 2010

Gmail productivity tip: Superstars for keeping track of ToDo's

To get a grip on a busy inbox, keep on top of important emails by giving them Superstars.
yellow-star - Generic Star
red-bang - TODO
green-check Completed
yellow-bang - Waiting for response

And with multiple inboxes in Gmail, you can have one of those inboxes just for showing messages with one of those stars. So 5 entries from my TODO list sits above my inbox. That way I'm always atleast concerned with keeping on track.

There are other stars, but I haven't felt that they make more any more productive. Maybe as I have even more plates to balance.

Not in use:

Wednesday, January 06, 2010

Working International, and how Ubuntu can help

Due to the project that I'm working on now, a large open source software project, its helpful to know what time it is for each person. Due to time-zones, some people live in the future, where they are already living tomorrow, and some are living in the past. So it helps to know what time it is, so you'll adjust for when its a good time to send a quick message, or leave an overnight lengthy email. Or know to stay up a few more hours, or to be sure to make it in early.

Anyways, here are my tricks for keeping an eye on the time of your peers.

In Ubuntu, add the cities of your peers so you can see what time it is for them, and the weather, so you can make jokes about it.

As in, its summer in New Zealand and 60+ degrees, vs 20 and snowing in Columbus.

Plus you can check to see that they'll be coming online soon. In Ubuntu it has a nice world dark-ness overlay to see what everyone sees. And if you're cooped up in the office, to get out because its dark.

The other trick I like is in Gmail.

Its a labs feature called Sender Time Zone.

It shows what time it currently is for them, so you can know better than to just call someone, or to expect a response shortly.

It sits neatly next to their emails so you easily what that they're likely there or not.