Keyvan Minoukadeh

28 July 2007

London Libraries Lookup

Filed under: General — Keyvan @ 5:14 am

I’ve been working on a small project to make public library lookups a little bit easier. I still have lots to do, but I’m slowly putting the various parts together.

The idea is to make it easy to:

  • find libraries in London (for now) and the rest of the UK (later)
  • find books in these libraries without dealing with difficult interfaces

Finding Libraries

I’ve started putting together a database of London libraries and their coordinates. You can see locations of almost 400 London libraries on librarylookup.org.uk.

You can also find libraries nearest to you by entering your postcode at the end of the URL — it can be the first part (outward code), but using a full postcode will give you more accurate results. E.g. http://www.librarylookup.org.uk/W6 0QL will show you the libraries closest to the Lyric Theatre in Hammersmith.

I still need to work on the interface. It’s using Google Maps at the moment, but I might consider alternatives. You won’t see much information about the libraries at the moment, but I’m going to include the full address and website address of each library.

Finding Books

The plan is to use existing book sites as the Web interface for book searches. I’m working on a Greasemonkey script that will, when complete, run on a number of book sites and the librarylookup website mentioned above. On the librarylookup website, the user selects his/her favourite/nearest libraries and the Greasemonkey script records it. Those preferences will then be used when browsing Amazon to query the library’s (or libraries) online catalog for the book being viewed. You will then be notified if the book is available/unavailable.

Library Lookup Web Service

So far I’ve written code that can check Hammersmith and Fulham, Bromley and Norfolk libraries. I plan on implementing the lookup process in Javascript (to lessen the load on the server) when the project is ready, but for the time being the Greasemonkey script sends its request to a PHP script that returns JSON formatted results:

Supported libraries:
librarylookup.org.uk/service/libraries/
ISBN lookup:
librarylookup.org.uk/service/libraries/hammersmith/0745324827
ISBN lookup:
librarylookup.org.uk/service/libraries/norfolk/0552773328

The code also uses the xISBN Web service when a library has no record of the requested ISBN. The xISBN service returns ISBNs associated with different editions of the same book, so if a library doesn’t have the exact one we’re looking at on Amazon, we’ll still be told if there are other editions that it does have.

Screencast: The Script in Action

This movie requires Flash Player 8

Credits

These sites/articles helped a lot:

23 November 2006

Chomsky, Marr and the Media

Filed under: General — Keyvan @ 4:05 pm

30 minute video of the 1996 interview between Andrew Marr and Noam Chomsky. Still interesting and relevant. Read transcript and the Media Lens review: Where Egos Dare.

You can download a better version from ChomskyTorrents.org.

22 November 2006

Remove Google and Yahoo Ads

Filed under: General — Keyvan @ 4:36 am

Update (2007-01-31): Included a fourth (Windows hosts) method for getting rid of ads.

More and more sites are displaying Google (AdSense) or Yahoo (YPN) ads. I thought I’d post up 4 simple ways you can get rid of these ads, and, if like me, you’d still like to know which sites use them but don’t really want to see the ads, there’s even a solution to replace them with boxes. Solutions 1-3 require Firefox—I’ve only tested with Firefox 2.0. Solution 4 should work with any browser on a Windows system.

Note: these solutions are targeted at Google and Yahoo ad services, to remove other ads you can follow the steps in my ad-free browsing guide. Solutions 1, 2 and 4 only remove the ads, solution 3 also replaces them with boxes where the ads would have appeared.

1. AdBlock Plus extension

Install Adblock Plus and add the following two filters:

http://ypn-js.overture.com/*

and

http://pagead2.googlesyndication.com/*

If you’re already running AdBlock Plus, you can subscribe to my Google and Yahoo ad remover filter set, I’ll be adding to it soon.

2. CSS solution—no additional addons required

Edit userContent.css (use ChromEdit Plus or read Editing Configuration Files if you need help) and add the following two rules:

/*
 * Remove Google ads
 */
iframe[name='google_ads_frame'],
a[href^='http://pagead2.googlesyndication.com']
{ display: none ! important; }

/*
 * Remove Yahoo ads
 */
iframe[src^='http://ypn-js.overture.com']
{ display: none ! important; }

Save and restart Firefox.

3. Replacing Ads with Greasemonkey

Install Greasemonkey and then my Replace Google/Yahoo Ads script.

Before and after screenshot:
[2 screenshots]

4. Windows hosts

This is based on Tech Support Alert’s in-depth guide to Removing Google Ads Using the Windows Hosts File. Read that if you’re unfamiliar with the Windows Hosts file.

Locate the hosts file. It’ll be found in one of these locations, depending on your version of Windows:

Windows XP = C:\WINDOWS\SYSTEM32\DRIVERS\ETC
Windows 2K/NT = C:\WINNT\SYSTEM32\DRIVERS\ETC
Windows 98/ME = C:\WINDOWS

Open it with a plain-text editor, e.g. Notepad, and add the following two lines:

127.0.0.1    pagead2.googlesyndication.com
127.0.0.1    ypn-js.overture.com

Any feedback appreciated.

Ads on Google and Yahoo websites

The methods above will not block ads appearing on Google or Yahoo’s own websites, e.g. Gmail or Yahoo Mail, as most of those ads are fetched server-side and not through the easy-to-use HTML snippets most webmasters receive when signing up to AdSense/YPN. You will however find Firefox extensions and Greasemonkey scripts targeting those sites specifically. For example, the excellent CustomizeGoogle extension removes ads from Google search results, GMail, and more.

8 November 2006

White Town - Don’t Mention the War

Filed under: General — Keyvan @ 3:58 am

Very late posting this, but it’s about time I pointed you all to the new White Town album: Don’t Mention the War.

[Don't Mention the War album cover]

I’ve been listening to it a lot and it just gets better and better. If you’re new to White Town, listen to tracks from the new album, read a review, an interview with Jyoti, then buy it! :) It’s available to buy on CD Baby and iTunes.

See Bzangy Groink for more…

10 October 2006

Careers in Killing

Filed under: General — Keyvan @ 3:01 am

A Celebration
War is good for business. Invest your son.

« Previous PageNext Page »