| pg 1 of 3 | More |

revford blog

Your life force is running out


    Site Search Added

Fri, 25 Nov 2011 18:11:02 GMT

Added a simple search tool to the site, click Search in the menu and use the box that pops down.

  Dumping Flash on YouTube

Fri, 25 Nov 2011 10:25:55 GMT

Some people are still getting the Flash version of YouTube videos embedded on this site, if that's the case you're still using the Flash version of YouTube, not the updated HTML5 one. If you're using a sensible modern browser (or IE9+) you've no need to suffer Flash on YouTube any more.

To be free of Flash on most YouTube videos, just follow the link and click on Join the HTML5 trial.


YouTube HTML5 Video Player

   Site Code Updates

Thu, 06 Oct 2011 18:20:33 GMT

Updates to Firefox over the year mean that the -moz CSS3 additions are no longer needed, so I can drop them. This means layout code for the site is now just standard CSS3 and displays correctly on all sensible modern browsers.

It shouldn't make any difference to how things look, it's just going to make pages a tiny bit smaller so load a tiny bit faster.

  Firefox 4 beta 9 improves CSS3 support

Sat, 22 Jan 2011 18:03:44 GMT

Playing around with the latest beta of Firefox (or to be exact Iceweasel) and it looks like all the CSS3 code I use on the site is finally supported without special -moz properties.

This means when Firefox 4 is released, I can drop all the non-standard CSS from the site, which will speed up the load time a tiny bit and make me happier because everything will validate.

Chrome, along with it's WebKit cousins like Safari and Epiphany, as well as Opera already support these features.

As an aside, I've updated the script for YouTube videos used on the site to call the HTML5 video player for WebM video where supported, but fall back to Flash where it's not. Before long we'll be free of Flash.

More on embedding the HTML5 player and WebM here:

A New Way To Embed YouTube Videos
About the WebM Project
No double standards: supporting Google's push for WebM

      Traveller UWP Decoder Update

Wed, 01 Sep 2010 17:44:57 GMT

Just a quick update, the decoder was borking over system names with spaces in, all fixed now.


     Traveller Search Galaxy, proof of concept

Tue, 31 Aug 2010 02:14:46 GMT

Another new Traveller tool for the website, it's a search tool to find planetary information.

Searches return UWPs you can click on to get a plain English description, they lead to the decode UWP page I update the other day.

You can search on any part of a UWP, most useful would be a planet name or remark. For example, searching for Green would return all systems with Green in the name, while searching for Ga would return all planets with Ga in the name and all planets with the remark Ga for Garden World.


This is very much a test of concept, it currently only covers a few subsectors of the Spinward Marches and Foreven Sectors. This will improve once I get motivated to enter more data, or talk David into doing some more of it.

As we create our own universes for Traveller games, I'll add search boxes for them too.


Traveller

    Audio Player Updated

Sun, 29 Aug 2010 20:32:45 GMT

Updated the media player slightly, simplified it to a one button that switches between play and pause, rather than two individual buttons.

There is also a movie player in the code, but I've got no movies to post at the mo.

Grab the code from the links at the bottom.


media-player.js
media.css

     Traveller UWP decoder updated, now useful

Sun, 29 Aug 2010 15:38:13 GMT

I've finally made the traveller UWP decoder useful.

It now has two modes of operation, you can access it with a link as before:

Emape 0103 B564500-B N I Ag Ga NI A G

Or just go directly to the page where you'll get a box like this one, where you can enter your own UWP and hit enter to decode.


As a bonus it now translates the remarks to plan text descriptions, to save you remembering what Ag and Ht mean.


I am planning more features, like a searchable database of OTU worlds, but all that is for the future. It's taken most of the year for me to drag my lazy arse back to this and add an entry box.


UWP Decoder

   HTML5 and CSS3

Sun, 29 Aug 2010 01:47:31 GMT

HTML5
I should have mentioned this in one of the previous site update posts, but I've moved over to HTML5 for the site now. This is long overdue as it makes things easier for me and all the modern browsers have great support for it.

The only thing holding me back was a Firefox validator extension, but I've given up waiting on it to add HTML5 support. This means I'm back to having validator links on the pages, they don't hurt so don't worry about them.

CSS3
The code that's causing pages to not validate is still the -moz- variants of border-radius for Gecko. I like the effect too much to give it up to make my code validate. The WebKit browsers no longer require the -webkit- addition. Come on Mozilla, catch up.

It doesn't cause problems for browsers that don't support it. It just gets ignored. But it's still irritating.



So that's it, the site is now updated to the latest web standards and ready for the crazy future world we've all ended up living in.

    New Audio Player

Sun, 29 Aug 2010 01:37:42 GMT

Some fiddling about with HTML5 and Javascript has created a new simple media player for the site.

Thanks to the <audio> tag in HTML5 I can move over from the mess of browser and plugin detection scripts I used to have to one simple player. No plugins required.

I've tested it in sensible browsers (Firefox/Chromium/Opera/Safari) on GNU/Linux and MacOS. It should work in recent versions of these and similar browsers for other platforms too.

Mac users will still need to install the Quicktime Components for Free media formats, I use Ogg Vorbis for audio on this site. MacOS doesn't include support for reasons of wanky Apple corporate greed.

Xiph QuickTime Components

     Traveller UWP decoder

Thu, 04 Feb 2010 17:37:31 GMT

I've added a simple web based UWP (Universal World Profile) decoder, it should turn regular Traveller UWPs into a human readable description of the world.

I've turned all the UWPs on the Machine Parts Transit Solutions page into links that decode them. Which is much more useful than code only Dave can read. :)

Here are a few examples:


Traveller: Machine Parts Transit Solutions

     Site Updated

Sun, 02 Aug 2009 13:46:38 GMT

It's been months but I've finally managed to sit down and write some more proper code.

I've replaced more of the Javascript that drives this site with Perl, this means more of the work is carried out offline, on my machine that generates and uploads this site, leaving less work for the web browsers of visitors to do.

Basically that means the whole site should speed up a bit. We should loose that second or so delay before the menu and logo appear.

I've also stopped trying to fix things for IE 6 now. Seriously now if you're still using IE 6 you should either switch to a standards compliant browser [Firefox| Opera|Chrome| Safari|Lynx] or at worst upgrade to a more recent version of IE.

    iPlayer Search Updated

Fri, 24 Apr 2009 16:22:30 GMT

I know it's been a while without it working now but I've finally updated my iPlayer search tool, the BBC changed the format of the results pages again which broke the old version.

Just replace the old lib-rf-iplayer.dl with this new version.

# lib-rf-iplayer.pl # by Gav Ford # gav@revford.co.uk # http://revford.co.uk # 2008-04-17, updated 2009-04-24 # subroutines for dealing with the BBC iPlayer sub iplayersearch # search the iPlayer and return a list of result URLs { $searchterm = $_[0]; @resultspage = split(/\n/, get('http://www.bbc.co.uk/iplayer/search/?q=' . $searchterm)); ($resultbox) = grep {/div\ class\=\"episode/} @resultspage; @results = split (/\>/, $resultbox); @results = grep {/a\ class\=\"episode-title/} @results; foreach (@results) { $thisresulturl = $_; ($null, $null, $null, $thisresulturl) = split(/\"/, $thisresulturl); push(@resultlist, 'http://www.bbc.co.uk' . $thisresulturl); } return (@resultlist); } sub iplayertitle # take an iPlayer URL and find some program information { $pageurl = $_[0]; @showpage = split(/\n/, get($pageurl)); ($showtitle) = grep {/title/} @showpage; $showtitle =~ s/\ \ /\ /g; $showtitle =~ s/\<[^\<]+\>//g; $showtitle =~ s/\t|\n|//g; $showtitle =~ s/BBC\ iPlayer\ -\ //; return ($showtitle); } 1;

Now I can go back to forgetting Heroes is on Mondays and catching up on the iPlayer.

   Javascript Projects

Sat, 07 Feb 2009 07:25:33 GMT

I'm back working with Javascript, building a new random character generator for another game.

Unlike the D&D/Pathfinder generator, this is going to be building full characters, not just basic NPCs.

So this one is a bit of an epic project, but after one night of coding, I've got the data structures defined, the web end working and some very basic output.

I've got a huge mass of data input to do to cover all the basic classes and all their options, then all the random customisation code to write.

Not sure why, but I seem to get the most coding done between 0300 and 0600 after a couple of hours of sleep.

When I'm working on these things, I seem to wake up in the middle of the night with a mass of code in my head I have to get working right away.

It's like I do my clearest thinking when I'm asleep.

   Bookmarks

Wed, 04 Feb 2009 12:35:09 GMT

As a special bonus for Harvey, you can now access my browser bookmarks here:

Bookmarks

     Random Pathfinder NPC, tiny update

Mon, 22 Dec 2008 06:58:52 GMT

I've started to make some tiny updates to my random Pathfinder NPC generator. A few more serious updates are planned.

for a start I've removed the terms Hero and Paragon from the level options, as they are from D&D4, the system we were looking at before we fell for Pathfinder.

Next up will be properly replacing the old D&D3 code with the Pathfinder code, then incorporating any new options from David's Perl NPC generator into this one.

Following on from there, will be stats by points buy (set arrays), rather than dice roll (random number generation).


Pathfinder Mk 1 Complete
Pathfinder NPC

    Conky Theme

Tue, 21 Oct 2008 10:32:05 GMT

The fancy transparent system monitor dodah that has replaced a few old dockapps for me, Conky is itself an updated decedent of Torsmo.

I've recently updated my theme/config with more information and colours to match my other themes.

screenshot of conky
conkyrc

Remember to edit the conkyrc file to point to your own mail spool (or just) delete that line, it's currently set to /var/spool/mail/gav .

The volume detection requires two simple scripts, save these in your ~/bin or wherever you like to store scripts.

vol-now-mas

#!/usr/bin/perl ($null, $volume) = split(/\ /, `aumix -v q`); $volume =~ s/\,//; print "$volume\n";

vol-now-pcm

#!/usr/bin/perl ($null, $volume) = split(/\ /, `aumix -w q`); $volume =~ s/\,//; print "$volume\n";

  Transferring Movies to the eeepc

Sat, 27 Sep 2008 11:37:45 GMT

Recently Max picked up an eeepc, it's a great little linux based laptop with an 800x480 7" screen and a 4GB solid state drive that goes about 3 1/2 hours to a charge.

A tiny little machine, perfect for catching a movie or TV show while on the bus.

So, I've been looking for a way to format shift TV shows and movies I have on DVD onto the eeepc, it ships with MPlayer, but with it's reduced space I need to make the movies quite small.

Step one is to rip the DVD, for this I use a quick, single pass rip using mencoder, crunching down the movie into an XviD/mp3 file.

As OGG is, hopefully, heading towards being the standard format for web multimedia, it's well supported on the eeepc and good compression, step two is to convert the rip into Theora and Vorbis.

#!/bin/sh # rip # by Gav Ford # revford@blueyonder.co.uk # http://revford.pwp.blueyonder.co.uk # 2008-09-26 # rip a DVD into XviD/mp3 into an .avi # then convert that to Theora/Vorbis .ogg # usage rip tracknumber filename # -aspect 16:9 -vf scale=480:270 \ # -aspect 4:3 -vf scale=360:270 \ # -aspect 1.85:1 -vf scale=500:270 \ mencoder dvd://$1 \ -ovc xvid -xvidencopts bitrate=384 \ -aspect 16:9 -vf scale=480:270 \ -oac mp3lame -lameopts br=96 \ -af volume=15:sc \ -o $2.avi ffmpeg2theora $2.avi -o $2.ogg

On my machine, the whole process of converting a movie takes a couple of hours and results in a file of about 5MB/min as .avi and 4MB/min as .ogg.

Commented out in the code are alternate aspect ratios and scales for different movie formats, you can swap in the details based on what the DVD you're looking at says the aspect ratio is.

Here is an example of the results, a shot from the pilot episode of Stargate SG-1. Click the image for the full sized version.

encoding example, a shot from Stargate

While this produces good quality, quite watchable shows and movies. I'd going to try a two pass rip with just the scaling done by mencoder. Then compress that result directly to ogg, using ffmpeg2theora to reduce the file size down, skipping the XviD encoding.

   iPlayer Search Tools updated

Thu, 25 Sep 2008 19:01:51 GMT

Updated the iPlayer Search tools, simple console based search tools for the BBC iPlayer.

No new functionality, just cleaning up the output and slimming down the code.

Just a simple update this time, cleaning up the show title information. When the BBC last updated the iPlayer is started getting more detailed headings, I'll simply use these now rather than messing about trying to pull different bits of information together.


Libraries
lib-rf-iplayer.pl

Download
iplayer-search
iplayer-notify

    New Site Feature, Sortable News Updates

Wed, 24 Sep 2008 23:26:45 GMT

A new feature for the website, you can now click on the news topic icons to get all news posts on that subject.

So if you just want news about roleplaying, click on a icon like this:

d20

It makes things quicker to find than trawling through 17 pages of posts.

| pg 1 of 3 | More |

OK HTML
OK CSS
OK RSS
CC
2011-12-06