Skip to content


iTunes Music Library.xml XPath Expression

Took me a few minutes using SketchPath to work this out. It’s the xpath expression to pull out all the location elements from the iTunes Music Library.xml file.
/plist/dict/dict/dict/key[text()='Location']/following-sibling::string[1]
The resultant string still needs to be URL decoded.

Posted in Software, Windows.

Tagged with , , .


Using the eBay SOAP API from Ruby-on-Rails

This article applies to:
Rails 2.3.4, Ruby 1.8.6, soap4r gem 1.5.8, ebay4r 1.1

I have been taking a look at ways to integrate a Rails application with eBay. They support a number of different programming interfaces and, if you are using Javascript, PHP, Java or .Net, have some good examples to follow. I managed to get a Javascript interface working quite easily from inside a Rails _form view, but it just does not feel like the most elegant solution to me.

Since eBay provide a well documented SOAP API I thought it would be a good opportunity to investigate Ruby’s support for SOAP. SOAP support is a standard feature of Ruby and is provided by a library called soap4r. I tried implementing my own call to eBay’s GetItem interface, but I encountered a few problems and soap4r’s documentation didn’t help much either. Then I discovered a library called ebay4r which is built on top of soap4r. The rest of this article describes how I successfully integrated my Rails application with eBay using ebay4r.

Continued…

Posted in Ruby-on-Rails.

Tagged with , , , , .


Rails validation error messages

RailsThere’s no denying that Rails’ built-in Forms Helpers are incredibly good. However if they have one flaw, it is the way error messages from validations are handled. The default messages generated by Rails are terse to say the least! If you provide your own message (with :message=>”blah blah”, Rails automatically appends the name of the underlying field to the front of the message, which is restrictive and looks ugly.

I spent some time looking around for a good solution to this problem. I assumed it would be a simple configuration issue but it turns out the format of these messages is hard baked into the ActiveRecord::Errors.full_messages method.

Continued…

Posted in Ruby-on-Rails.

Tagged with , , .


Lefora Forums

Thanks again to BBC Click I have discovered a great new service on the Internet. Lefora is a free forum service that lets you create a discussion forum service for your own communities. It’s really easy to set up, customise and get started.

So why do I need a forum? Well I’ve been secretly working on my own little project and now it’s time to start getting users on board. Using Lefora has enabled me to concentrate on my own service and not waste valuable time implementing another forum. You can check out my forum at rondayvoo.lefora.com.  Oh yeah, my little project is at Rondayvoo.com. Feel free to check it out and use the forum to tell me what you think!

If you want your own free forum just click on :

free forum hosting by lefora

Posted in Internet.

Tagged with , , .


svnsync with PuTTY on Windows

Objective:

Maintain a copy of my local Subversion repository on my hosting server ready for deployment of my application using Capistrano.

Continued…

Posted in Windows.

Tagged with , , , .


JSON – the 2nd ‘J’ in Ajax

I stumbled across this new web technology called JSON whilst reading about the performance features being introduced into by AJAX web development tool I use. Essentially they replaced the XML interface between the server and browser based JavaScript client with JSON. JSON is a way of expressing complex data structures which is less verbose than XML and is supported natively by JavaScript which makes it much more performant in those environments. The home of JSON on the web is www.json.org, where there is an article called “The Fat Free Alternative to XML” that does an excellent job of explaining the benefits of JSON. There are also links to JSON libraries for just about every programming language that ever existed. So the question is, will the web community now have to change the name of Ajax ?

Posted in Software.

Tagged with , , .


What Process

< ![CDATA[Tool for understanding what processes are running on your Windows PC
Click Here…]]>

Posted in Windows.

Tagged with .


Invisible Speaker FlatWire

Simply paint or wallpaper over it, and your speaker wire disappears!
Invisible Speaker FlatWire

Posted in Home Entertainment.

Tagged with .


Jalbum Photo Gallery Software

< ![CDATA[This gallery software makes web albums of your digital images. JAlbum aims to be the easiest to use and most powerful tool in this category - and free!
Click Here…]]>

Posted in Software.

Tagged with .


Warning Label Generator

Another top tip from Webscape on BBC Click. You could have great fun with this Warning Label Generator

Posted in Internet.

Tagged with , .