The simple act of TV watching in our house was revolutionised about six years ago when our TiVo arrived. Once set up we could pause and record TV scheduling 'season passes' to automatically record all episodes of a series, and it even looked at the programs we liked to watch and automatically recorded others we may enjoy.
As we moved to digital TV TiVo moved too with external freeview box control, an upgraded hard disk, and 'Mode 0' allowing recording at full 720x576 at 9Mb/s MPEG2 being output over component - a pretty good picture on a 32" LCD TV.
Over the years TiVo served us reliably, but more recently it has been freezing occasionally.
I had started to look into replacements, but any hardware options (like sky+) seemed to limiting, or just poor. I was hoping to replace both the TiVo and the XBOX (XBMC) with a single box. The only option was to go for a PC, using some form of PVR software to control it. I spent time setting up various offerings like MythTv, MediaPortal, GBPVR and a few others. Each had their positives, but I couldn't find an overall package I liked.
I had given up until a colleague persuaded me to try Vista Media Center. I bought a copy of Vista Home Premium Edition and installed it, and after a bit of messing around I was impressed. It is easy to use, simple to configure and seems to work well. The only issue we have is the occasional stutter on live TV, but hopefully we'll find a solution for that.
The other big advantage is that I can now cancel my TiVo subscription which was £10/month for their listing and guide data, meaning the new machine is already paying for itself...
I finally decommissioned TiVo and XBMC from our living room today, hiding a fairly out-of-place looking PC in the corner of the room. Hopefully it'll do us as well as the TiVo.
Monday, December 29, 2008
Tuesday, October 28, 2008
Sunday, October 12, 2008
Television
Television is the first truly democratic culture - the first culture available to everybody and entirely governed by what the people want. The most terrifying thing is what people do want.
- Clive Barnes
- Clive Barnes
Sunday, September 07, 2008
Red Arrows - 2008
Thursday, August 21, 2008
Car fuel pump
This morning on my way into work the impreza started to stutter a bit, losing power at higher revs. Then as I continued the power dropped until as I was coasting into the car park at work there was almost no power at all.
I tried the car at tea break time and it wouldn't even start. So we got the toolbox out to do some basic checks, and found that there was no petrol getting to the front of the car, indicating a problem with the fuel pump.
After finding this article on the interweb we managed to locate the fuel pump, and see that it was not pumping at all.
Needing a new fuel pump, knowing the prices Subaru dealers charge, I called Eddie Torrens, the car breaker, and he said he would sort me out with one for £70. As the close of the business day was approaching I swiftly sent my better half to reluctantly visit Mr Torrens.
Fortunately I had taken the precaution to send her a picture of what it was I was looking for, as upon arrival she was apparently presented with a fuel pump for something entirely different, and so was able to say it wasn't the correct part. After dissecting another car they managed to get one.
About two hours later they arrived at my work and we inserted the new one, and the car started first time. What a relief.
So, thanks to Mr keita from the forum for taking the time to provide me with step by step instructions! Most helpful!
I tried the car at tea break time and it wouldn't even start. So we got the toolbox out to do some basic checks, and found that there was no petrol getting to the front of the car, indicating a problem with the fuel pump.
After finding this article on the interweb we managed to locate the fuel pump, and see that it was not pumping at all.
Needing a new fuel pump, knowing the prices Subaru dealers charge, I called Eddie Torrens, the car breaker, and he said he would sort me out with one for £70. As the close of the business day was approaching I swiftly sent my better half to reluctantly visit Mr Torrens.
Fortunately I had taken the precaution to send her a picture of what it was I was looking for, as upon arrival she was apparently presented with a fuel pump for something entirely different, and so was able to say it wasn't the correct part. After dissecting another car they managed to get one.
About two hours later they arrived at my work and we inserted the new one, and the car started first time. What a relief.
So, thanks to Mr keita from the forum for taking the time to provide me with step by step instructions! Most helpful!
Saturday, August 02, 2008
Dogleap Stages Rally
I have now passed the advertising signs for the Dogleap Stages for 3 years on my way to work, and finally my curiosity got the better of me. I called in at North West Motor Factors who sold me a program, showing the stage maps for the rally. It turned out that two of the stages were within about 2 miles of our home, so obviously it would be rude not to go.
We took a drive around yesterday to see where to stand, and unfortunately a lot of the stage was inaccessible to pedestrians due to overgrown weeds. However, we found a good clearing in the middle of the stage, where we could see a good bit of the track from, so we decided to go there.
This turned out to be a good spot, and as there were 3 stages using this same track we moved around for each of them. Each spot seemed to be just as good.
I would definitely recommend it to anyone with an interest in this kind of thing, in my opinion it was just as good as the WRC, if not better, as the crowds were smaller. Escort Mk IIs are the best :)
More pics here: http://picasaweb.google.co.uk/simonmcc/DogleapStages
Friday, July 18, 2008
Terms and Conditions
I like this guy's attitude, taken from:
http://torrentfreak.com/top-10-most-pirated-movies-and-tv-shows-2007-080101/comment-page-1/#comment-253708
For me its a matter of convenience quality format and control.
If the studio's released TV shows online free for download in 350mb xvid/divx format from a quality source with a quality compression I would GLADLY download it from them. Commercials and all. I really do not mind commercials that much as long as they are not ANNOYING like what sci-fi sometimes does with commercials every few minutes. Dozens of them. Keep it to 10 minutes of commercials in 2 or 3 "sets" and I will gladly download it from you.
ANY DRM ANY conditions ANY Restrictions and back to bit torrent I go. ANY COST better be met with ZERO commercials and still NO restrictions and the price better be cheap $1 an episodes sounds about right. (Music should be around 12 cents a pop)
These are my terms.
They are not really up for negotiation.
Accept them or I will enforce them myself with bit torrent or a recorder etc.. This is not a discussion. I am the consumer if you want my eyes or my money it WILL be on MY terms NOT yours.
Once they learn this they can go back to making good programs and raking in the cash.
http://torrentfreak.com/top-10-most-pirated-movies-and-tv-shows-2007-080101/comment-page-1/#comment-253708
For me its a matter of convenience quality format and control.
If the studio's released TV shows online free for download in 350mb xvid/divx format from a quality source with a quality compression I would GLADLY download it from them. Commercials and all. I really do not mind commercials that much as long as they are not ANNOYING like what sci-fi sometimes does with commercials every few minutes. Dozens of them. Keep it to 10 minutes of commercials in 2 or 3 "sets" and I will gladly download it from you.
ANY DRM ANY conditions ANY Restrictions and back to bit torrent I go. ANY COST better be met with ZERO commercials and still NO restrictions and the price better be cheap $1 an episodes sounds about right. (Music should be around 12 cents a pop)
These are my terms.
They are not really up for negotiation.
Accept them or I will enforce them myself with bit torrent or a recorder etc.. This is not a discussion. I am the consumer if you want my eyes or my money it WILL be on MY terms NOT yours.
Once they learn this they can go back to making good programs and raking in the cash.
Friday, June 20, 2008
St Aidens
Occasionally I get the chance to drive home on a Friday around either the Seacoast otr Biships road, which both provide stunning scenary. Many times I spotted the sign to "St Aidens" and I had heard of it from other sources too, but I had never been.
Tonight on the way back from Benone we took a detour through this idilic countryside, and walked up around the Chapel. The first picture is the ruins of the old Chapel, as far as I can discern from around 1660.
The site apparently dates back a further 1000 years though when it was founded by St Colmcille, although thats a little further than I can remember. I'll ask Susan.
Tonight on the way back from Benone we took a detour through this idilic countryside, and walked up around the Chapel. The first picture is the ruins of the old Chapel, as far as I can discern from around 1660.
The site apparently dates back a further 1000 years though when it was founded by St Colmcille, although thats a little further than I can remember. I'll ask Susan.
Kiting at Benone - again
Today we spent more time at Benone beach, although by the time we got there it was late, and high tide was approaching. This did mean that there were very few cars on the beach, as only folks with 4wd were welcome on the loose sand. This was proved by some boy in a people carrier who drove about 10 metres onto the beach, and promptly got stuck. It was fun rescuing him.
Anyway, turns out the wife likes the new camera too, when she arrived back from her "run" she merrily shot about 200 photos. Here is a small selection.
Thursday, June 19, 2008
Kite!
After lazing around for all the good weather we have had so far I decided to get out with the kite. I had worked a while the other night changing the lengths of a couple of lines, so I wanted to test if it helped the flight.
So I took to the freshly cut field tonight and had a grand time. It was a bit blustery though, where a smooth wind would have been better. However I still managed to try a few settings, and settle on one I was happy with. A beautiful evening.
So I took to the freshly cut field tonight and had a grand time. It was a bit blustery though, where a smooth wind would have been better. However I still managed to try a few settings, and settle on one I was happy with. A beautiful evening.
Monday, June 09, 2008
bash: creating an alias with an argument
This is something I've thought would be useful for a while, but I never got around to figuring out how to do it. We have a command we use frequently at work for configuring the sun one application server, glassfish - asadmin. The asadmin command takes the command and then some arguments eg:
asadmin deploy --target instance1 --user admin --passwordfile /home/whatever/.password dist/application.ear
The bold bits tend to be common with only the italic bits changing. This is how to set up an alias in bash:
edit ~/.bashrc and add the line:
aa () { asadmin $1 --target instance1 --user admin --passwordfile /home/whatever/.password $2 $3 $4 $5; }
After logging out and in, you will have a new command called 'aa' which you can use like:
aa deploy dist/application.ear
Now, that's easier, isn't it?
asadmin deploy --target instance1 --user admin --passwordfile /home/whatever/.password dist/application.ear
The bold bits tend to be common with only the italic bits changing. This is how to set up an alias in bash:
edit ~/.bashrc and add the line:
aa () { asadmin $1 --target instance1 --user admin --passwordfile /home/whatever/.password $2 $3 $4 $5; }
After logging out and in, you will have a new command called 'aa' which you can use like:
aa deploy dist/application.ear
Now, that's easier, isn't it?
Terzo No 244
When I got my impreza I knew it was a special edition - the Terzo, meaning third, signifying the third successive win for Subaru in the WRC.
There were 333 made, numbered 1-334 (omitting 13), and each was given a special plate in the interior with the unique number, but unfortunately some time during the 110,000 life of my impreza the number got lost.
I called Subaru's tech help in the UK and spoke to someone who simply asked for the registration plate, and was able to tell me that this impreza was registered number 244. I was hoping for 252, as that is in the number place, but whatever. Finding out the number wasn't nearly as exciting as I had hoped, but its nice to know :)
There were 333 made, numbered 1-334 (omitting 13), and each was given a special plate in the interior with the unique number, but unfortunately some time during the 110,000 life of my impreza the number got lost.
I called Subaru's tech help in the UK and spoke to someone who simply asked for the registration plate, and was able to tell me that this impreza was registered number 244. I was hoping for 252, as that is in the number place, but whatever. Finding out the number wasn't nearly as exciting as I had hoped, but its nice to know :)
Sunday, June 08, 2008
CDs : A new era
Today marked a new era for our Church, hardly a dogmatic change, but an important step nevertheless.
Instead of being recorded on 90 minute cassette tape, the service was recorded direct to CD with our new CD recorder. Afterwards the old tapd duplicator was pushed to the side to make way for the new CD duplicator.
So to all of those people used to listening to duplicated audio tapes, where 2 services sometimes overlapped, or the voice was wavering, now each copy will be a pure digitial replica. Next step mp3s on the interweb, then streaming....
Instead of being recorded on 90 minute cassette tape, the service was recorded direct to CD with our new CD recorder. Afterwards the old tapd duplicator was pushed to the side to make way for the new CD duplicator.
So to all of those people used to listening to duplicated audio tapes, where 2 services sometimes overlapped, or the voice was wavering, now each copy will be a pure digitial replica. Next step mp3s on the interweb, then streaming....
Monday, May 19, 2008
Stop!
One important part of having a fast car is having good brakes. To this end when I got my Scooby last September, I changed the "suicide brakes" to 4-pot callipers off a 2003 impreza, which just screw right on. They also came with good pads, and a set of drilled and grooved discs, so I just used those.
There was always a very slight judder from the disks, so I knew they would probably never be permanent. Also, the back brakes have only been braking on a small part of the disc (about 25%) since I got them.
I managed to find an eBay seller, azcarpartsuk who was able to supply replacement discs/pads all round for under £200, which is pretty good since the pads are mintex, and the front discs drilled and grooved.
On Saturday night we fought with the back discs and changed them. Tonight I changed the fronts which was a lot easier. Now I've got brakes all round that should work well. Now I can stop.
There was always a very slight judder from the disks, so I knew they would probably never be permanent. Also, the back brakes have only been braking on a small part of the disc (about 25%) since I got them.
I managed to find an eBay seller, azcarpartsuk who was able to supply replacement discs/pads all round for under £200, which is pretty good since the pads are mintex, and the front discs drilled and grooved.
On Saturday night we fought with the back discs and changed them. Tonight I changed the fronts which was a lot easier. Now I've got brakes all round that should work well. Now I can stop.
Sunday, March 09, 2008
Delayed....again, and again
So once again I find myself on a Continental sponsored holiday. I was supposed to leave Miami yesterday just after mid day, but bad weather at Newark meant repeated delays, until at 8pm the flight was cancelled, and I was booked onto the 2am flight.
I had lunch at the Times Square McDonald's which is unlike no other McDonald's I have ever seen.
From there I took the tube south to go on a tour of the Statue of Liberty which is something I had hoped to do before, but never had the time
With the time changing in the US this weekend I was walking around Newark airport at 7am wondering whether to book a hotel and catch some sleep, or go sightseeing. So I found the place to store luggage, and got on the bus to Manhattan. As usual I took a walk up through Times Square to Central Park, and got the tube back down to Times Square.
I had lunch at the Times Square McDonald's which is unlike no other McDonald's I have ever seen.
From there I took the tube south to go on a tour of the Statue of Liberty which is something I had hoped to do before, but never had the time
Friday, March 07, 2008
On holiday
Normally when I travel with work I rush a bit of sightseeing into a few hours, but this time I decided to book a real day off. So after we finished work last night, I got into the car and drove south. I had booked a hotel half way down the keys, and arrived in the complete darkness. Imagine my marvel when I awoke to see where I really was. Beautiful, shallow water as far as the eye could see. Great. So I set off south again for Key West.
As I drove down in the morning Sun, I began to see the extent of the keys - miles of little islands connected by miles of bridges. Literally. One bridge is actually called the "7 mile bridge".
The bridges were many and varied, some of the coolest were the old ones.
Many of the new bridges also had the old bridge beside them.
Some old bridges were so old that they were off limits.
When I arrived in the large south-most island I was met with a glorious sight - people kitesurfing. As this is something I am in the process of trying I had to stop off and see how it was really done. These guys had great gear, shallow water for hundreds of feet out, and perfect, steady onshore wind.
When I got into town in Key West, I took a walk around the harbour, went to see the south most point in continental US, and saw some other stuff too. A cool day.
On the way back to the hotel for the second evening I managed to catch the gorgeous sunset.
Maybe Florida is OK after all...
As I drove down in the morning Sun, I began to see the extent of the keys - miles of little islands connected by miles of bridges. Literally. One bridge is actually called the "7 mile bridge".
The bridges were many and varied, some of the coolest were the old ones.
Many of the new bridges also had the old bridge beside them.
Some old bridges were so old that they were off limits.
When I arrived in the large south-most island I was met with a glorious sight - people kitesurfing. As this is something I am in the process of trying I had to stop off and see how it was really done. These guys had great gear, shallow water for hundreds of feet out, and perfect, steady onshore wind.
When I got into town in Key West, I took a walk around the harbour, went to see the south most point in continental US, and saw some other stuff too. A cool day.
On the way back to the hotel for the second evening I managed to catch the gorgeous sunset.
Maybe Florida is OK after all...
Monday, March 03, 2008
I'm off - and its snowing!
This morning I left home to travel to Florida. Another business trip, I was looking forward to the heat after the cold weather we've been having recently.
So it was even more weird to wake up in the morning to see snow. There wasn't a lot of snow, but it was enough for the kids to try out their new sleds!
So it was even more weird to wake up in the morning to see snow. There wasn't a lot of snow, but it was enough for the kids to try out their new sleds!
Saturday, February 23, 2008
TiVo - Dead or alive?
A good few years ago I managed to pick up a Series 1 TiVo from the last unbeatable.com sale. As an eleven year old PVR design it still boasts more features than most of the alternatives, also adding a hackable Linux back end to its arsenal of great features.
Well, tonight we had a fright. It froze. This is not altogether unheard of, as it happens once every few months - usually the sign of a failing disk. However this time it was different - this time power cycling didn't bring it back, that just left me with a blank screen.
So I got the screwdrivers etc out, and took the cover off, turned it on, and viola - it was back in action. Phew. Quite a relief.
Well, tonight we had a fright. It froze. This is not altogether unheard of, as it happens once every few months - usually the sign of a failing disk. However this time it was different - this time power cycling didn't bring it back, that just left me with a blank screen.
So I got the screwdrivers etc out, and took the cover off, turned it on, and viola - it was back in action. Phew. Quite a relief.
Friday, February 22, 2008
Legal at last
Having had my impreza (AKA best car ever) for just under 6 months now, it comes time to renew my tax. Anyone who knows the saga will understand the great relief I had when I walked out of the tax office with my tax disc.
When I bought the car, after having to wait several weeks for MOT etc, I found my wait wasn't over. The tax book wasn't delivered along with the car, but I was promised it would follow shortly. Well, shortly became two weeks, then three, and after a while I had heard that the previous owner had applied for a new tax book, and was awaiting it's arrival. So I called the DVLA in Swansea, and they had not had any application at all!
I found out the only way I could solve the problem was to go into a DVLA office, and get the car registered to me. Long story short, I ended up with the car being registered to me, but at a mainland address. When I went into DVLNI to get that changed, they said I had to wait until it was up for tax renewal. Today I rectified this whole mess, leaving the DVLNI office in Coleraine with a new tax disc in my hand, and the promise of a new tax book in a few weeks.
It's been an interesting chapter, just wanted to say thanks to all those without whose participation none of this would have been possible, especially the stereotypical car dealer (2nd in the chain) who spun us a yarn, and kept us all hanging on for a few weeks waiting, while he was sitting on his hands...
Monday, February 04, 2008
Commute
It's been a while since I've had any sort of challenge on my commute, but today was different. On my way in this morning I caught up with the guy in the red GSI, very similar to the one I used to have. nobody was trying too hard, but it was clear I had a tremendous advantage over him, and it wasn't just the AWD in the wet.
Then on the way home, which was a little early as I had a parent/teacher interview to attend, there was a guy in a sporty focus behind me; must have been an RS, or ST. It seemed that he was going to go the main road, and hence our ways would part, but as I accelerated out of the roundabout I saw him tight in my mirror. We kept it up and I missed fourth (crunch) but he made no ground on me, before breaking hard for the next roundabout. I'm sure I lifted off the ground slightly as we crossed the mad roundabout at about 40, then up the hill before I reached the bit of the road I am scared of. As I slowed to normal speed I could see he was trying to pass me! Madman. Well, as it turned out he went the coast road anyway, so I had no more trouble.
These events helped me establish a few things:
- I no longer possess the madness required to road race properly. I have (marginally) too much sense. I could have gone faster. I could have braked later. I could have....
- It is easier to be behind, and stay behind than a) overtake, or b) be in front.
- I am quite happy to lose. I just want to have a little fun, within reasonable limits.
- I am no longer prepared to consciously assume that I won't have to stop.
- If I had had this car when I was 17-22 I would have killed myself, probably several times.
Best car I have ever had. Every day I have the scooby I enjoy it thoroughly.
Saturday, February 02, 2008
More snow
Monday, January 21, 2008
BT Again
The pipex adsl saga continues.
Fortunately(?) I am at home, ill, today. Got a call from a BT engineer to say he would be calling with me.
So he called, ran his tests, and surprise surprise, the connection was working 100% all the time he was here. It has actually been better over the last few days, but still dropped out over the weekend.
As an aside, check out these sets of stats :
http://ccso.co.uk/stats/1/
http://ccso.co.uk/stats/2/
One is for us, the other is for a neighbour about one mile away. Surely that looks like a significant pattern.....
Fortunately(?) I am at home, ill, today. Got a call from a BT engineer to say he would be calling with me.
So he called, ran his tests, and surprise surprise, the connection was working 100% all the time he was here. It has actually been better over the last few days, but still dropped out over the weekend.
As an aside, check out these sets of stats :
http://ccso.co.uk/stats/1/
http://ccso.co.uk/stats/2/
One is for us, the other is for a neighbour about one mile away. Surely that looks like a significant pattern.....
Friday, January 04, 2008
Fun in the snow
I usually try to get away from work on a Friday at about midday, as that's what it says in my contract (I like to try to stick to my contract where possible ;) )
Today I had special reasons to leave at exactly 12:00 -
1) Snow on the roads would slow my journey home
2) The kids had to be picked up by 1pm
3) (most important) I had to get home to play in the snow
Managed to get home just before 1pm, so spot on timing, which is more than could be expected as there were various reports of journey time multiplication factors of over 6, so 30 minute journeys were taking several hours. My 35-45 minute journey took 55 minutes. Not bad really.
A fresh fall had started, and the wind was blowing snow from fields through gates onto the road. The roads were mostly passable, although "the mountain" was a bit mad.
Anyhow, picked up the kids, got home, and straight out into the snow. Matthew and I were hardly inside all afternoon. Kate popped in and out. We made snowmen, used fertiliser bags to toboggan down the hill, and generally had a lot of fun. Great!
Had to make the most of it today, as apparently its all going to go away tomorrow.... at least that's what the forecasters say.... although they are the same forecasters who predicted that we wouldn't actually see any snow here (we had 5" which is the most I can remember)
Today I had special reasons to leave at exactly 12:00 -
1) Snow on the roads would slow my journey home
2) The kids had to be picked up by 1pm
3) (most important) I had to get home to play in the snow
Managed to get home just before 1pm, so spot on timing, which is more than could be expected as there were various reports of journey time multiplication factors of over 6, so 30 minute journeys were taking several hours. My 35-45 minute journey took 55 minutes. Not bad really.
A fresh fall had started, and the wind was blowing snow from fields through gates onto the road. The roads were mostly passable, although "the mountain" was a bit mad.
Anyhow, picked up the kids, got home, and straight out into the snow. Matthew and I were hardly inside all afternoon. Kate popped in and out. We made snowmen, used fertiliser bags to toboggan down the hill, and generally had a lot of fun. Great!
Had to make the most of it today, as apparently its all going to go away tomorrow.... at least that's what the forecasters say.... although they are the same forecasters who predicted that we wouldn't actually see any snow here (we had 5" which is the most I can remember)
Photo organisation
I have a system for storing my photos that I'm largely pleased with - I simply put them in folders that allow alpha-numeric sorting by date - e.g. "2007-03-22 Visit to Spain"
However, with 400 such folders containing almost 20,000 photos, and a small number of folders in my old system, like "Beach" or "Kids Photos" or even "Unsorted" it was time to do something about it.
I like the cygwin toolset, which is basically a full Unix toolset (grep, vi, sed, etc) for windows. It also comes with perl, and a program called 'exif'. The exif program spits out all the data for an image to the console as shown at the bottom of this post. This allows me to simply get the date/time of the photo, allowing me to rename by date and sort by time.
I wrote a small perl script to handle this for me, and now I can quickly take a set of photos in a folder called "Kids Photos" and have the script drop them into one folder per day. Then I can rename the folders how it suits. Should have done this a long time ago.
After renaming all my non-conforming photos and folders, I made top level folders called 2002, 2003... etc to limit the number of folders in the top level. It's an aweful lot tidier now.
Disclaimer - if you find anything useful here, that's great, but it's all at your own risk. If you don't understand it, don't run it! Backup your photos before you start ;)
Script - should anyone want it:
Exif example output:
However, with 400 such folders containing almost 20,000 photos, and a small number of folders in my old system, like "Beach" or "Kids Photos" or even "Unsorted" it was time to do something about it.
I like the cygwin toolset, which is basically a full Unix toolset (grep, vi, sed, etc) for windows. It also comes with perl, and a program called 'exif'. The exif program spits out all the data for an image to the console as shown at the bottom of this post. This allows me to simply get the date/time of the photo, allowing me to rename by date and sort by time.
I wrote a small perl script to handle this for me, and now I can quickly take a set of photos in a folder called "Kids Photos" and have the script drop them into one folder per day. Then I can rename the folders how it suits. Should have done this a long time ago.
After renaming all my non-conforming photos and folders, I made top level folders called 2002, 2003... etc to limit the number of folders in the top level. It's an aweful lot tidier now.
Disclaimer - if you find anything useful here, that's great, but it's all at your own risk. If you don't understand it, don't run it! Backup your photos before you start ;)
Script - should anyone want it:
#always
use strict;
use warnings;
use Getopt::Long;
# option for just stating what should be done,
# but not actually doing it
my $print_only = 0;
GetOptions( "p" => \$print_only );
if ($print_only)
{
print STDERR "Running in print only mode.\n";
}
#first scan all data
my %file_data;
my %dates;
print STDERR "Reading file info...";
foreach my $file (@ARGV)
{
next if ( $file !~ /jpg$/i );
print STDERR ".";
my $exif = `exif '$file'`;
my ( $date, $time ) =
$exif =~ /Date and Time.*\(20\d\d:\d\d:\d\d)\s(\d\d:\d\d:\d\d)/;
if ( !$date )
{
print "date : $date [$exif]\n\n";
print "Not enough exif info for file $file\n";
next;
}
#replace : with -
$date =~ s/\:/-/g;
#store the file data for later
$file_data{$file}->{'date'} = $date;
$file_data{$file}->{'time'} = $time;
$file_data{$file}->{'date_time'} = $date . " " . $time;
$dates{$date}++;
}
print STDERR "Done\n";
#create the directories
if ( !$print_only )
{
foreach my $date ( keys %dates )
{
mkdir($date);
}
}
my $counter = 0;
foreach my $file (
sort { $file_data{$a}->{'date_time'} cmp $file_data{$b}->{'date_time'} }
keys(%file_data)
)
{
$counter++;
my $date = $file_data{$file}->{'date'};
my $print_count = sprintf( "%03d", $counter );
my $target = "$date/$date $print_count.jpg";
if ( -f $target )
{
die "cannot overwrite target $target";
}
my $cmd = "mv '$file' '$target'";
print "$cmd\n";
if ( !$print_only )
{
`$cmd`;
}
}
__DATA__
Exif example output:
EXIF tags in '2007-05-03 Coastal Drive 001.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag Value
--------------------+----------------------------------------------------------
Manufacturer KONICA MINOLTA CAMERA, Inc.
Model DiMAGE G400
Orientation top - left
x-Resolution 72.00
y-Resolution 72.00
Resolution Unit Inch
YCbCr Positioning centered
Compression JPEG compression
Orientation top - left
x-Resolution 72.00
y-Resolution 72.00
Resolution Unit Inch
Exposure Time 1/13 sec.
FNumber f/4.7
ISO Speed Ratings 50
Exif Version Exif Version 2.2
Date and Time (origi2007:05:03 19:43:16
Date and Time (digit2007:05:03 19:43:16
ComponentsConfiguratY Cb Cr -
Compressed Bits per 3.40
Brightness 31/10
Exposure Bias 0.0
MaxApertureValue 3.00
Metering Mode Center-Weighted Average
Light Source 0
Flash Flash did not fire, compulsatory flash mode.
Focal Length 5.6 mm
Maker Note 688 bytes unknown data
FlashPixVersion FlashPix Version 1.0
Color Space sRGB
PixelXDimension 2272
PixelYDimension 1704
Custom Rendered Normal process
Exposure Mode Auto exposure
White Balance Auto white balance
Digital Zoom Ratio 0.00
Focal Length In 35mm34
Scene Capture Type Night scene
Gain Control Normal
Contrast Normal
Saturation Normal
Sharpness Normal
Subject Distance RanUnknown
InteroperabilityIndeR98
InteroperabilityVers
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (3168 bytes).
Thursday, January 03, 2008
Snow!
After a nice white frosty Christmas day I was hopeful that we would see some more snow. Well, tonight we got it! We must have had a good 2 inches fall over the last 4-5 hours, and now its freezing hard.
According to the BBC news there is havoc across the country, as people abandon their cars! They need 4wd :)
I spent quite a while digging to get the Passat up the drive, and just then guests arrived. We hoped they could get up the same tracks, but an hour later the tracks had gone.... so back to the digging and brushing, and after a few attempts they were up. Of course the scooby just walked up up... :)
I spent quite a while digging to get the Passat up the drive, and just then guests arrived. We hoped they could get up the same tracks, but an hour later the tracks had gone.... so back to the digging and brushing, and after a few attempts they were up. Of course the scooby just walked up up... :)
Getting to work tomorrow will be fun.
Subscribe to:
Posts (Atom)