I have forked Charbot Green

About a year ago Libby Miller wrote Charbot Green, a BBC Radio 4 announcement bot for Twitter. It’s written in JRuby, uses the H2 database and the source code is in SVN here.

A screenshot of CharbotGreen on Twitter

It’s a really great app and I thought I’d have a play, but half-way through the install I realised that setting up an H2 DB server was a step too far, so instead I rewrote it to be a pure Ruby app using the SQLite3 database. Using SQLite3 keeps it a self-contained app in a single directory without the need to run a database server.

You can get the code from GitHub here.

My small changelist looks like this:

  • H2 replaced by SQLite3
  • links to iPlayer use the short form of the URL
  • if available, the subtitle, such as episode number is displayed
  • now a pure ruby app!

I haven’t tested it very hard, just run it up a couple of times, so please do let me know of bugs or feel free to go fork it yourself!

Adding a bookmark to an Android Home screen

It’s easy to add a link to a URL to the home screen on the iPhone. When you’re looking at a web page, just hit “+” and select “Add to Home Screen”. On Android it’s slightly more involved:

  • Bookmark the page you want to add to a home screen
  • Go to the home screen you want to add the link to
  • long-press in an empty space to bring up the “Add to Home Screen” menu
  • select “Shortcuts”
  • select “Bookmark”
  • choose your bookmark!

The icon you get will be the standard bookmark image with a small overlay of the site’s favicon. If the site provides <link rel="apple-touch-icon-precomposed" href="blah" /> in the <head> then that will be used in preference. Both the iPhone and Android support the apple-touch-icon-precomposed link rel-type so it’s the preferred way of setting a custom icon for your webpage.

Update: I should mention that the resolution of the image you link to shouldn’t be too important but that the Android Icon Guidelines say it should be a 48×48 transparent PNG. I ignored that and used an icon I had lying around that was 256×256 and the OS scaled it just fine. Google themselves use this technique and their image is 57×57. You can find lots of good, free icons for your apps on Smashing Magazine.

Update 2: As rblon says in the comments, there is another way of doing this:

  1. Bookmark the page you want to add to a Home screen
  2. Open the browser “bookmarks” screen
  3. Long-press the bookmark you want
  4. Select “Add to Home screen”