Wednesday 18 November 2009

Making a recording of a little drumming bear toy for a Play

I have now a recording of the little drumming bear toy which is pretty good.
It's a rather specific sound, "squeak squeak squeak squeak squeak *drum*  *drum* *drum*" and it's good the sound we've recorded matches the toy (who will be on stage an performing also! :)
I haven't done sounds before for something like this.


This is my recording setup now:

Karaoke microphones -> DVD -> TV -> laptop (TV has audio out).
Works pretty well. The microphones are from Lidl or Aldi.
I first used mobile phone to record stuff. Then Bluetooth sounds -> laptop. (and ffmpeg enabled for amr converting) That's not great. Flat
 

I'm using linux so mostly Audacity for sound editing, Ardour for playing, VLC/ffmpeg for converting.
We shall see this weekend how they sound in the theatre! Ulp! :)


This is what it is for: http://www.milltheatre.com/shows/seasons-greetings
Season's Greetings by playwright Alan Ayckbourn.   (in Dundrum on 24-28 Nov)
Glencullen Musical and Dramatic Society.
Season's Greetings is a black, though often farcical comedy about a dysfunctional family Christmas, set over Christmas Eve, Christmas Day and St Stephen's Day in an average suburban house.

happy-shiny jolly Christmas song

We're still selecting happy-jolly tunes but we've some from hi5 and Johnny Mathis and others which are good: kids songs with singing .... I was up till 5am on Monday grepping youtube.
I'm looking for a very happy-shiny jolly Christmas song.
Alvin and the Chipmunks are not jolly enough.
 Looney Tunes are not jolly enough!

TODO: links
http://www.youtube.com/my_playlists?pi=7&ps=20&sf=&sa=0&sq=&dm=0&p=41D83C5287331CCB
http://www.youtube.com/my_playlists?pi=7&ps=20&sf=&sa=0&sq=&dm=0&p=D531FB80CBB0916E
Some possibilities: Boney M, Hi5, Johnny Mathis, The Supremes, Michael Jackson, Slade, The Wiggles, Claymation

This is what it is for: http://www.milltheatre.com/shows/seasons-greetings
Season's Greetings by playwright Alan Ayckbourn.   (in Dundrum on 24-28 Nov)
Glencullen Musical and Dramatic Society.
Season's Greetings is a black, though often farcical comedy about a dysfunctional family Christmas, set over Christmas Eve, Christmas Day and St Stephen's Day in an average suburban house.
And incidentally on the odd musical note, my brother is releasing a single:
 http://www.youtube.com/watch?v=HQPh7SBUoec
 http://music.bcoleman.com/

Eclipse regexp Find/Replace error "Incompatible line delimiter near index"

Eclipse Find/Replace error:  "Incompatible line delimiter near index"
Searching for: " - %i,*" replace with "0\\\n"

Because you have dos line ending in file, eclipse will be happier with this:
Searching for: " - %i,*" replace with "0\\\r\n"

Or better make sure everything is dos2unix converted if touched by something which converts it the other way. In eclipse you can select File -> Convert line delimiters to ...

WARNING: Don't mess with file encoding unless you know what you'er doing!
In eclipse these other settings are relevant:
 Right-click on Project -> Properties
    Resource -> Text File Encoding
      Might be best to leave this (Inherited from container Cp1252 for windows)

    Resource -> New Text File Line Delimiter
      Change to "unix"
 Windows -> Preferences
    General -> Editors -> Text Editors
      Select "Insert spaces for tabs"
    General -> Content types -> Text -> Tcl Content Type
Set default enccoding (leave it alone is probably best policy!)

Saturday 14 November 2009

bt-sync-mobile.sh script handle files with spaces in names.

bt-sync-mobile.sh updated with a bit of grief to allow sync files with spaces in file names. Could not do it "properly" and get quoting/slashifying correct. Hacked s/ /_SPACE_/g when getting file list then iterate lists and s/_SPACE_/ / when needed.

Used to sync mobile sounds.

And photos, here's one photo synced:
http://www.facebook.com/home.php?ref=home#/photo.php?pid=30466015&id=1118555017

And here's one that got a bit washed out:



Here's the script:
Presumably cut&pasting it from here might not work ... depending ... oh well ...
See below below for script, embed from github:


#!/bin/bash

#INVOCATION:
#$ bt-sync-mobile.sh [device [dir]]
#$ bt-sync-mobile.sh Pooky 'C:\Data\Images\' 2>&1 |tee .btsync/bt_sync_images.log
#Stuff is synched to ~/.btsync/`echo $dir |sed 's/[\/ \\"]/_/g'`
#wami*.gpx and *.jpg files are cleared off device if synced successfully and mp4 or png
#
#REQUIREMENTS:
#linux with bluetooth hardware
#various bluetooth linux utils, these ubuntu packages:
#bluez bluez-utils(?) obexftp openobex-apps
#
# some of these come by default, and some are not needed, but this is on the system the script was tested on
#$ dpkg -l |egrep "bluez|hci|obex" |sed 's/  */ /g'
#ii bluez 4.32-0ubuntu4.1 Bluetooth tools and daemons
#ii bluez-alsa 4.32-0ubuntu4.1 Bluetooth audio support
#ii bluez-cups 4.32-0ubuntu4.1 Bluetooth printer driver for CUPS
#ii bluez-gnome 1.8-0ubuntu5 Bluetooth utilities for GNOME
#ii bluez-gstreamer 4.32-0ubuntu4.1 Bluetooth gstreamer support
#ii bluez-utils 4.32-0ubuntu4.1 Transitional package
#ii gnome-vfs-obexftp 0.4-1build1 GNOME VFS module for OBEX FTP
#ii libopenobex1 1.5-1 OBEX protocol library
#ii libopenobex1-dev 1.5-1 OBEX protocol library - development files
#ii obex-data-server 0.4.4-0ubuntu1 D-Bus service for OBEX client and server sid
#ii obexftp 0.19-7ubuntu2 file transfer utility for devices that use t
#ii openobex-apps 1.5-1 Applications for OpenOBEX
#ii python-bluez 0.16-1ubuntu1 Python wrappers around BlueZ for rapid bluet
#
#NOTES:
#The bluetooth connect seems to fail sometimes.
#Files with funny chars in name could cause a problem. maybe. () are okay
#Files to clear out are hardcoded.
#It's simple - just syncs files up if they don't exist on host.
#There are various other TODOs
#
### TODO: hey look at Images\_PAlbTN\ dir ! every thumbnail since year DOT! sneaky !
# nokia E65 phone
#
#I've thrown together an ugly script to automate sync (a dumb enough sync) of files from my phone.
#And made an ugly blog post about the ugly script also:
#http://gaoithe.livejournal.com/33541.html
#
#It would be nice to sync properly like rsync (i.e. check files size and date/times on host and device).
#It would be nice to use rsync itself! :)
#Possibly obexftp could be improved, commands like "get-if-changed, put-if-not-up-to-date", recursive ability.
#Hmm. Hmm.
#mount could mount some ugly thing + obexftp interface?   then rsync away
# Hmmm.
#
# 14/11/2009 Fix allow spaces in file names.
#     probably also allow spaces in dirs and device name
#     for F in *.amr ; do echo F=$F; done
#     for F in *.amr ; do echo F=$F; N=${F%%.amr}; if [[ ! -e $N.ogg ]] ; then ffmpeg -i $F $N.ogg; fi; done
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
# for F in *.amr ; do echo F=$F; N=${F%%.amr}; if [[ ! -e $N.ogg ]] ; then ffmpeg-amr -i "$F" "$N.ogg"; fi; done
#
# f=Sound\ clip\(10\).ogg; n=${f%%.amr}; mv "$f" "${n}_DragonSoup.ogg"
# for f in DataSoundsDigital/Sound\ clip\({1,2}*\).ogg; do vlc "$f"; done
# for f in DataSoundsDigital/Sound\ clip\({1*,20,21,22,23}\).ogg; do n=${f%%.ogg}; mv "$f" "${n}_DragonSoup.ogg"; done
#
# for f in DataSoundsDigital/Sound\ clip\(*\).ogg; do vlc "$f"; done
# for f in *.flv; do n=${f%%.flv}; if [[ ! -e "$n.wav" ]] ; then ffmpeg -i "$f" "$n.wav"; fi; done




DEVICENAME="$1"
#echo all is $*
BTSYNCHOME=~/.btsync

# DEVICENAME can be blank (scans all devices)
HCISCAN=`hcitool scan |grep "$DEVICENAME" |grep -v ^Scanning `
#Scanning ...
#    00:1F:5D:BF:29:39    Nokia 3120 fionnuala
#    00:17:E5:EE:29:18    Pooky
#check for duplicates
DEVCOUNT=`echo "$HCISCAN" |wc -l`
HCISCAN_S=`echo "$HCISCAN" |sed 's/[\t ][\t ]*/ /g;s/^ *//;'`
BTADDR=`echo "$HCISCAN_S" |cut -d' ' -f1`
DEVNAME=`echo "$HCISCAN_S" |cut -d' ' -f2-`

#echo "DEVCOUNT=$DEVCOUNT HCISCAN=$HCISCAN
#BTADDR=$BTADDR DEVNAME=$DEVNAME"

if [[ $DEVCOUNT -ne 1 ]] ; then
    echo "usage: $0  
  e.g. $0 42:54:41:44:44:52 \"C:/Data/\"
Which device?
$HCISCAN
"
    exit;
fi

echo "BTADDR=$BTADDR DEVNAME=$DEVNAME"
#sudo hcitool info $BTADDR

DIRTOSYNC="$2"
# TODO pass in dir/file to sync on cmd line in $2
if [[ -z $DIRTOSYNC ]] ; then
    echo "usage: $0  
  e.g. $0 42:54:41:44:44:52 \"C:/Data/\"
  e.g. $0 \$BTADDR \"C:/Data/Images/\"
  e.g. $0 $BTADDR \"C:/Data/Videos/\"
  e.g. $0 42:54:41:44:44:52 \"C:/Data/Sounds/\"
"
    DIRTOSYNC="C:/Data/"
    #exit;
fi

mkdir -p $BTSYNCHOME

DIRTOSYNC_HASH=`echo "$DIRTOSYNC" |sed 's/[\/ \\"]/_/g'`
# cd to where we are getting files
mkdir -p $BTSYNCHOME/$DIRTOSYNC_HASH
cd /tmp
cd  $BTSYNCHOME/$DIRTOSYNC_HASH
pwd

#obexftp -b $BTADDR -v -l ""
#obexftp -b $BTADDR -v -l "C:/"
echo DIRTOSYNC=$DIRTOSYNC DIRTOSYNC_HASH=$DIRTOSYNC_HASH
obexftp -b $BTADDR -v -l "$DIRTOSYNC" |tee $BTSYNCHOME/$DIRTOSYNC_HASH.list




echo get list of all files
echo TODO: parse xml safely/properly
#

#FILES=$(grep "
FILES=$(grep "

date >> $BTSYNCHOME/$DIRTOSYNC_HASH.log
echo FILES=$FILES |tee -a $BTSYNCHOME/$DIRTOSYNC_HASH.log


## forget about first retrieve or not, just check files on each system
#if [[ -f $BTSYNCHOME/$DIRTOSYNC_HASH.success ]] ; then
#echo for second/.. retrieve just get differences

echo TODO: recurse into directories

echo TODO get updated files, now we get new files only


function wipe_existing_files_from_list () {
    echo for now we check if file exists already and wipe from list
    ##file list to retrieve by eliminating ones already retrieved
    FILESTOGET=
    for F in $FILES ; do
        #F=$(echo $F|sed 's/_SPACE_/ /g')
        if [[ ! -f $F ]] ; then
            FILESTOGET="$FILESTOGET $F"
        fi
    done  
    FILES="$FILESTOGET"
#diff $BTSYNCHOME/$DIRTOSYNC_HASH $BTSYNCHOME/$DIRTOSYNC_HASH.success
#mv $BTSYNCHOME/$DIRTOSYNC_HASH $BTSYNCHOME/$DIRTOSYNC_HASH.success
}

function get_the_files () {
    if [[ ! -z $FILES ]] ; then
        echo get the files
        date >> $BTSYNCHOME/$DIRTOSYNC_HASH.get
        SP_Q=$(echo $FILES|grep _SPACE_)
        if [[ "$SP_Q" != "" ]] ; then
            # spaces in file names so must do them induhvidually
            for F in $FILES; do
                F=$(echo $F|sed 's/_SPACE_/ /g')
                echo "obexftp get $F"
                echo obexftp -b $BTADDR -v -c \"$DIRTOSYNC\" -g \"$F\"
                obexftp -b $BTADDR -v -c "$DIRTOSYNC" -g "$F" |tee -a $BTSYNCHOME/$DIRTOSYNC_HASH.get
            done
        else
            echo "obexftp get $FILES"
            echo obexftp -b $BTADDR -v -c \"$DIRTOSYNC\" -g $FILES
            obexftp -b $BTADDR -v -c "$DIRTOSYNC" -g $FILES |tee -a $BTSYNCHOME/$DIRTOSYNC_HASH.get
        fi
 
        # can obexftp do a dir? would be handy.
        #obexftp -b $BTADDR -v -g "$DIRTOSYNC" |tee $BTSYNCHOME/$DIRTOSYNC_HASH.getdir
        # also -G (get and delete) could be used for some files
    fi
}



# TODO/half DONE track and check each file seperately
# TODO maybe if we got the file, store the associated line then in .success file
# use size/date in xml and  on file system.
# ideally we want commands: GET[and remove] if newer/different

function track_the_files () {
#CHECKFILES=`echo $FILES |sed 's/ / && -f /g'`
#if [[ $CHECKFILES ]] ; then
#   mv $BTSYNCHOME/$DIRTOSYNC_HASH $BTSYNCHOME/$DIRTOSYNC_HASH.success
    date >> $BTSYNCHOME/$DIRTOSYNC_HASH.success
    for F in $FILES ; do
        F=$(echo $F|sed 's/_SPACE_/ /g')
        if [[ -f $F ]] ; then
            # a file name which is part of others will cause problems
            FILEINFO=`grep "> $BTSYNCHOME/$DIRTOSYNC_HASH.success
        fi
    done
}


## TODO cleanup all files  on mobile retrieved this time or previous
##   allows syncing as soon as possible but cleaning after longer (keep recent photos, traces, ...)

# cleanup files matching certain patterns on mobile if they were successfully retrieved
# we could use -G earlier (get and delete)
function clean_the_files () {
    for F in $FILES ; do
        F=$(echo $F|sed 's/_SPACE_/ /g')
###if [[ -f bin/eirkey.pl && ( -n ${FG#wami-2} || -n ${F%gpx} ) ]] ; then echo yep; fi
       
        if [[ -f $F && ( -n ${F#wami-2*.gpx} || -n ${F#*.jpg} || -n ${F#*.mp4} || -n ${F#*.png} ) ]] ; then
            obexftp -b $BTADDR -v -c "$DIRTOSYNC" -k $F |tee -a $BTSYNCHOME/$DIRTOSYNC_HASH.clean
        fi
    done
}




wipe_existing_files_from_list
echo "files to get FILES=$FILES"

get_the_files

track_the_files

clean_the_files


collecting sounds for theatre, ffmpeg converting, howto ffmpeg + amr


I'm collecting sounds for the theatre people. Need a cassette tape screech sound, doorbell, jolly Christmas song. It's jolly difficult to find jolly christmas songs jollily sung! :) We don't have

This is for the play Season's Greetings.
 http://www.milltheatre.com/shows/seasons-greetings
 http://www.facebook.com/group.php?gid=6065036825

 http://en.wikipedia.org/wiki/Season%27s_Greetings_(play)
 http://seasonsgreetings.alanayckbourn.net/


I'm recording sounds with my mobile phone (Nokia E65). Converting sounds and vids with ffmpeg.

Ubuntu jaunty default ffmpeg kindof did amr to wav or ogg. But didn't mostly. I first tried ffmpeg source + older amr codecs with licencing problems. Found ffmpeg now uses libopencore. AND actually also I have the older amr codecs installed already as ubuntu packages  anyway. Anyway fresh built ffmpeg converts all amr ro wav or ogg.

So 15/Nov/2009 how to get ffmpeg working a bit better with amr format:

http://opencore-amr.sourceforge.net/
  tar -zxvf opencore-amr-0.1.2.tar.gz
  cd opencore-amr-0.1.2/
  less README
  ./configure --prefix=/usr/local
  make
  sudo make install

  cd ../
  svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg-svn
  cd ffmpeg-svn
  ./configure --prefix=/usr/local --enable-gpl --enable-pthreads --enable-version3  --enable-libopencore-amrnb --enable-libopencore-amrwb
  make
  sudo make install


  # if you install in /usr/local you'll need to set the LIBRARY path:
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

  # This converts all .amr files in dir to .ogg (and doesn't do it if already done)
  for F in *.amr ; do
    echo F=$F;
    N=${F%%.amr};
    if [[ ! -e $N.ogg ]] ; then
      ffmpeg-amr -i "$F" "$N.ogg";
    fi;
  done

Songs of the 80s.
http://www.afn.org/~afn30091/


Also. VLC crashes if try to do things  with playlist?
Individual VLCs are fine open and playing together which is  what is wanted.

Wednesday 11 November 2009

SalomeToXQual.pl


#!/usr/bin/perl -w


=head1 NAME


Read in Salomé_TMF exported .xml file.
Choose a Test Plan and set of tests to import.
Write out .xml or .csv that XQual can read.


=head1 SYNOPSIS


Salomé project INX8000-OLC
-> Data exchange format -> Export xml xml_export_olc_all.xml (file saved to Desktop)


Read in that file (as XML).
Read in Famille Nom, offer user choice of Famille Nom and/or SuiteTest Nom to choose.
Read in all wanted particular items matching Famille and SuiteTest.
Save to ; delimited .csv (awkward with excel) and " " indented for "with testplan" option.
Write fields out (some values merged, others generated/hardcoded).


=head1 SPEC


I tried doing this Salome_TMF export -> excel -> .csv -> XStudio.
But excel .csv output is annoyingly limited.
Possibly could get closer with openoffice but feh.


=head2 INPUT Salome_TMF .xml format




.


OLC
.

SU_A2 OLC
Area for tests which are parts of this phase of testing


SU_A2


=head2 Mapping Salomé .xml/.xls fields to XStudio format


A+BI+BJ (projet+id_famille+Nom) category; (set to 4) priority; (set to "") canonicalPath;(set to test script name) path
BM (id_test) index; (set to 1) implemented; BP (Nom) name;
CK+CL+CM step;param1,param2,...; CN check1,check2,...


=head2 XQual XStudio .csv and .xml import format


Format .xml or .csv or .csv with test plan
The .xml format (detailed below) for import I have not tested.
The IDs are in the .xml, how would we decide on those when importing?
So I'm using use .csv to import.


Tests and Testcases (without testplan)
category;implemented;priority;canonicalPath;path;indexTestcase1,indexTestcase2,...


OR Tests and Testcases (with testplan>, indentation spaces matter)
category;priority;canonicalPath;path(script name)
index;implemented;name
step;param1,param2,...;check1,check2,...


=head2 OUTPUT XStudio .csv in format


# the indentation whitespace matters
# test path must begin with /
# numeric fields must be numeric
# ColdRestartsOfTCS.tcl is the script for this example (one script for all test cases in category)


SU_A2;4;TestCanPathIsScriptNameMaybe;/TestPath/ColdRestartsOfTCS


1159;0;Cold Restarts of TCS with no input power


Action_1075 A0 Check bringup wait time for WSS;;"20 minutes, or longer. [HLD.OPTA.BLK_E.0010]"
Action_1076,A1,There is no optical output during this startup phase [Bringup slides] & R[HLD.OPTA.BLK_E.0011];;Using a power meter confirm
Action_1077,A2,"After warm-up phase complete if BI available, manufacture and calibration phase available then the following three tasks commence \n1) CC TX - CC laser and APR ON \n2) CC RX - Coarse RX Loop starts \n3) Data plane 1st powers and warms up \n";;Confirm these tasks commence.
Action_1090,A3,###############################################################################################################################################################################################################################################################;;Due to the fact that only part of the functionally is available cannot see without that stubbing that the bring can complete. This step attempts to highlight this issue.


=head2 running


I'm using cygwin's perl for now. By default XML/LibXML.pm is available.


#!/cygdrive/c/Perl/bin/perl -w
$ perl c:/Perl/scripts/SalomeToXQual.pl
Can't locate XML/LibXML.pm in @INC (@INC contains: c:/Perl/site/lib c:/Perl/lib .) at c:/Perl/scripts/SalomeToXQual.pl line 283.


=head2 DESIGN


http://perl-xml.sourceforge.net/faq/#quick_choice


=cut


use strict;


use XML::LibXML;


# defaults
my $filename = shift;
my $ofilename;
my $match = shift;
$filename="c:/Documents and Settings/james.coleman/Desktop/xml_export_olc_all.xml" if (!defined $filename);
#$match = "SU_A2 OLC" if (undef $match);
$match = "" if (!defined($match));
my $matchhash = $match;
$matchhash =~ s/[^\w\d]/_/g;
if (!defined $ofilename) {
$ofilename=$filename;
$ofilename =~ s/.xml$//;
$ofilename .= "_${matchhash}.csv";
}
print "$0 filename=$filename ofilename=$ofilename match=$match\n";


my $parser = XML::LibXML->new();
my $doc = $parser->parse_file($filename);


# TODO user passes in filename [optional outfile] [optional regexp/list of famille to take]
#my $c = $#ARGV + 1;
#print FILE "ARGC=$c\n";
#foreach my $i (0 .. $#ARGV) {
# print FILE "arg ARGV[$i]=$ARGV[$i]\n";
#}


open(FILE, '>', $ofilename) or die $!;


# ct = current test
my %ct;
my ($category,$priority,$canonicalPath,$path);
my ($index,$impl,$name);
my ($step,$param1,$param2,$check1,$check2);


$ct{'category'} = "0xdeadbeef";
$ct{'path'} = "0xdeadbeef";
$ct{'index'} = "0xdeadbeef";
$ct{'name'} = "0xdeadbeef";
$ct{'step'} = "0xdeadbeef";
$ct{'param1'} = "";
$ct{'param2'} = "";
$ct{'check1'} = "";
$ct{'check2'} = "";


$ct{'priority'} = 4;
$ct{'canonicalPath'} = "";
$ct{'impl'} = 0;


$ct{'project'} = $doc->findnodes('//Nom')->to_literal;


foreach my $f ($doc->findnodes('//Familles/Famille')) {
my($n) = $f->findnodes('./Nom');
print $n->to_literal, "\n";


next if ($match eq "");


$_ = $n->to_literal;
if (m/$match/) {
print "MATCH ", $n->to_literal, "\n";
$ct{'category'} = $n->to_literal;
$ct{'cathash'} = $ct{'category'};
$ct{'cathash'} =~ s/ /_/g;
### PATH MUST BEGIN WITH /
$ct{'path'} = "/IntuneTest/".$ct{'cathash'}."TestScript";


#my $s = $f->findnodes('./SuiteTests');
#print "Suite: ", $s->to_literal, "\n";
my($tests) = $f->findnodes('.//Tests');
#print "Tests: ", $tests->to_literal, "\n";


#category;priority;canonicalPath;path(script name)
# index;implemented;name
# step;param1,param2,...;check1,check2,...
print FILE "\n$ct{'category'};$ct{'priority'};$ct{'canonicalPath'};$ct{'path'}\n";


foreach my $t ($tests->findnodes('.//Test')) {


my @a0 = $t->attributes();
#$ct{'index'} = $t->getAttribute('test_id');
$ct{'index'} = $a0[0]->getValue();
$ct{'index'} =~ s/[^0-9]//g;


my $tn = $t->findnodes('./Nom');
$ct{'name'} = $tn->to_literal;


# no test name in .csv :( NO, actually yuou can do it (and must I think) - had a different problem
# AND two \n's are VITAL!
print FILE "\n $ct{'index'};$ct{'impl'};$ct{'name'}\n\n";
#print FILE "\n $ct{'index'};$ct{'impl'}\n\n";
# place test name in 1st test step
#print FILE " $ct{'name'};;\n";

### TODO Test Description not included
# my $desc = $tests->findnodes('./Description')) {
foreach my $step ($t->findnodes('./TestManuel/ActionTest')) {
my @stepa0 = $step->attributes();
$ct{'step'} = $stepa0[0]->getValue();
$ct{'step'} .= "," . $step->findnodes('./Nom')->to_literal;
$ct{'step'} .= "," . $step->findnodes('./Description')->to_literal;
$ct{'check1'} = $step->findnodes('./ResultAttendu')->to_literal;
#print FILE " $ct{'step'};$ct{'param1'},$ct{'param2'},;$ct{'check1'},$ct{'check2'},\n";
$ct{'step'} =~ s/[;,]/_/g;
$ct{'param1'} =~ s/[;,]/_/g;
$ct{'check1'} =~ s/[;,]/_/g;
print FILE " $ct{'step'};$ct{'param1'};$ct{'check1'}\n";
}
}
}
}


my $ts = time();


close FILE;


Sunday 8 November 2009

Curtlestown Woods walk: buggyable*with lift

Walk in Curtlestown Woods, Kilmalin, past Pet Cemetary near Enniskerry, Wicklow. With Brian and Trinh and their and our kids. ... and very very few other people. Lovely sunny day in Nov.

We're trying out some of the walks in the "Ten Walks in the district of Enniskerry" book by Albert Smith and Kevin Warner and others. (the revised and updated edition replacing the walks with disputed section with others and notes on the legal proceedings - added interest for Irish walking books!).

Walk 6 in book. Kilmolin loop walk. This was a lovely walk and lovely day for it too. The bus turning circle looks like a great place to park until you see a double-decker bus trying to turn in it and having to reverse blind out into the road, wheels going down into potholes and underneath of front of bus scraping on road. There is lots of parking a little further on as noted in the book.



Books could have a buggyable rating for walks :) A 4k est 50 mins walk took us 2 hrs I think. Kids were very good. All of them walked the whole way except Maeve who got a shoulder for a short bit and Mark who is 2 was main user of buggy and inside it most of the time. Buggy lifted in 2 places: over coilte gate 5ft (easiest with two lifting buggy high and walking through gate step-through - make sure kids if they're still in buggy are well strapped in!!!) and over coilte bar 3 feet.

The map in the book doesn't have contour lines on it. :) Steepish uphill for whole 1st half of walk.

Daire went ahead of us in the woods. And somehow got a bit lost. At a fork we called him but not sure if he heard. We went past and he somehow missed us and started back even though we could still see the turn-off fork? He's gone ahead and gone straight on and had to be chased on walks before. Good man but hello! Fionn shouted for him and went back with Brian to collect him.

We had little oranges and banana at the view of Killiney, the Lead mines, Bray. Saw the ferry going out of Dun Laoghaire.

After the walk we were hUnGrY. Eat ouyt? Go home? We stopped in Enniskerry. Fionn and Trinh went to buy tasty food in delicatessen there. Home and ham and cheese rolls, homemade Fionn scones and other yummy stuff. Kids play. Maeve takes 93 photos with my phone and it's battery dies. :)

The same view in OpenStreetMaps and GoogleMaps:
  http://www.openstreetmap.org/?lat=53.1936&lon=-6.2043&zoom=14&layers=B000FTF
  http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Enniskerry,+Co.&sll=53.19287,-6.208649&sspn=0.026534,0.090895&ie=UTF8&radius=1.88&rq=1&ev=zo&hq=Enniskerry,+Co.&hnear=&ll=53.191842,-6.194401&spn=0.025249,0.090895&z=14
Impressed with OpenStreetMap's details. GoogleMaps have satellite overlay which is good for details though.

More pics here:
http://picasaweb.google.com/gaoithe/SchoolActivityPlaygroundBuildAndWalkUpCountryLanes#

Tuesday 3 November 2009

VM setup. Problem copying VM with cygwin. dir/file group ownership


Had a problem copying a VM with cygwin, it won't import “Add VM to inventory”. The directory copy did not work. “Add to VM Inventory” could see dir but not browse inside. Symptom: you see group names like “????????” and “mkgroup-l-d” in cygwin (ls).
Copy dir with windows works, then rename. But wished to script the VM creation and using xcopy and copy (cmd built in) wasn't easy enough. Script does copy of the whole VM directory and contents then edit the .vmx file inside, just change the “displayName”. This does the copy and rename:
FROM=Node2_XXX
TO=Node3_XXX
cp -R -p -a $FROM $TO
perl -i.bak -pe 's/(displayName *= *").*(")/$1'$TO'$2/' $TO/*.vmx
# we're matching this one: displayName = "Node2_XXX"
# and ignoring this and all others: extendedConfigFile = "QNX_641_xxx.vmxf"
After thisscript is run in VM interface do “Add VM to Inventory", browse to dir. Select the vmx file. Select “I copied it” (this assigns a new mac address). Then power on machine. Edit network settings etc..


We can copy it with cygwin, if we fix up groups. It was a wrong group problem.  Solution do this: cp /etc/group /etc/group.bak; mkgroup -l -d >/etc/group
See below for more detail.

I'm sure this groups thing has caused me trouble before. e.g. the mysterious differences running sshd as windows service vs running on command-line. (Note: running on command-line can change permissions/ownership on files used and make it not work when running as server).

More details (cygwin mkgroup -l -d and {set,get}facl )

Copying one file example:
# BEFORE:
$ cp -a -p VM1_lab/*.vmx test.vmx
$ ls -al VM1_lab/*.vmx test*.vmx
-rwx------+ 1 me ????????    0 Nov 2 18:51 VM1_lab/QNX_641_xxx.vmx
-rwx------  1 me mkgroup-l-d 0 Nov 3 11:35 test.vmx

# AFTER:
$ cp /etc/group /etc/group.bak; mkgroup -l -d >/etc/group
$ cp -a -p VM1_lab/*.vmx test2.vmx
$ ls -al VM1_lab/*.vmx test*.vmx
-rwx------+ 1 me Domain Users 2189 Nov 2 18:51 VM1_lab/QNX_641_xxx.vmx
-rwx------  1 me Users 2196        Nov 3 11:35 test.vmx
-rwx------  1 me Domain Users 2189 Nov 2 18:51 test2.vmx

See below the result of cygwin cp VM1_lab Node2_XXX make the group owner of dir mkgroup-l-d. Highlighted in orange. That dir shows up in VM Add machine to inventory but the .vmx files inside are not visible.
me@mine /cygdrive/c/Virtual Machines
$ ls -al
total 1967096
drwxrwx---+ 14 Administrators SYSTEM 0 Nov 2  18:15 .
drwxrwxr-x+ 25 Administrators SYSTEM 0 Oct 30 14:48 ..
drwx------+ 2 me mkgroup-l-d 0         Nov 2  18:25 Node2_XXX
-rwx------+ 1 me ???????? 643830909    Aug 4  18:15 QNX641_XXX_template.tar.gz
drwx------+ 3 me ???????? 0            Nov 2  17:55 VM1_lab
drwx------+ 4 me ???????? 0            Oct 30 13:33 VM2_lab
-rwx------+ 1 me ???????? 732909568    Aug 31 14:14 ubuntu-9.04-desktop-i386.iso
drwx------+ 2 me ???????? 0            Oct 27 09:35 zenoss-2.4.5-380-x86

Re: CYGWIN=ntsec, "cp -a", and NT acls

It's worth fixing/using cygwin because md/mkdir/copy is cmd builtin, xcopy is prompty-fussy (prompts Y/N file copy can be overcome but prompts File/Dir cannot?)

$ getfacl $FROM>moo.facl; setfacl -f moo.gfacl $TO
setfacl: illegal acl entries
More direct: getfacl $FROM | setfacl -f - $TO


me@mine /cygdrive/c/Virtual Machines
$ cat moo.facl
# file: VM1_lab
# owner: me
# group: ????????
user::rwx
group::---
group:root:rwx
group:SYSTEM:rwx
group:mkgroup-l-d:rwx
mask:rwx
other:---
default:user::rwx
default:group:root:rwx
default:group:SYSTEM:rwx
default:group:mkgroup-l-d:rwx
default:mask:rwx

For reference, a VM template dir contents might be somthing like this:
$ tar -zxvf QNX641_xxx_template.tar.gz
drwxr-xr-x root/root 0 2009-08-04 17:06 QNX641_xxx/
-rw------- root/root 8684 2009-08-04 17:05 QNX641_xxx/QNX_641_xxx.nvram
-rw-r--r-- root/root 44488 2009-08-04 17:05 QNX641_xxx/vmware-0.log
-rw-r--r-- root/root 43871 2009-08-04 17:05 QNX641_xxx/vmware-2.log
-rw-r--r-- root/root 45331 2009-08-04 17:05 QNX641_xxx/vmware-1.log
-rw------- root/root 0 2009-08-04 17:05 QNX641_xxx/QNX_641_xxx.vmsd
-rwxr-xr-x root/root 2037 2009-08-04 17:05 QNX641_xxx/QNX_641_xxx.vmx
-rw-r--r-- root/root 240400 2009-08-04 17:05 QNX641_xxx/vmware.log
-rw------- root/root 2147483648 2009-08-04 17:06 QNX641_xxx/QNX_641_xxx-flat.vmdk

Brother Bill new single: Welcome to the Breakdown

Brother Bill new single just being launched into the general-whatever-o-sphere. Hentertaining :)

Welcome to the Breakdown



More info and MP3 available from http://music.bcoleman.com - Brian Cowen does his utmost to save the Irish economy when someone kidnaps the Celtic Tiger.

Bill says:

The new single 'Welcome to the Breakdown' is hereby released !  What fun...

It's all about getting laid off and spending the ill-gotten-gains recording and making music.  You can buy it by clicking on the download link on the music widget you can see to the right of the screen or, if you're in ROI you can buy by texting 'music 4175' to '57501'.  Texts will cost €1.

Everyone who buys the single will get two bonus tracks.  Simply mail your receipt/pin number (depending on whether you bought by widget/sms) to adminbcolemancom and we'll send you back a download code.

As it's a somewhat recessiony kind of a tale I put together a flash video to go with the song.  It features Brian Cowen, man boobs, the invention of NAMA, a strangely Star Wars-y like Banker creature, a new Super Hero for the Times We Live In and builders arse (blink and you'll miss it).  Oh, and there's ninjas.  And a dust up - along the lines of the gunfight at the OK Corral, only the offensive weapons are hurleys and sliothars.  Those poor ninjas didn't stand a chance...

It's come out a little clunky, by virtue of the fact that I gave myself a month to figure out how to use Flash.  Not because I like putting myself under pressure or anything, it's just that's how long the free trial of Flash lasts before you have to hand over some serious wonga to Adobe for the full version.

Funk that for a game of soldiers...

Anyway, warts (and there are many, many warts) and all.  Here's the vidjo.  http://www.youtube.com/watch?v=HQPh7SBUoec

Finally, I'm doing a fair few gigs over November - full listing as follow - would be great to see you at one  :-)

2 Nov 2009      20:00     Everyman Palace Theatre Bar - The KC Sessions w/ Andy Wilson and Lynda Cullen     Cork
5 Nov 2009     20:30    Whelan’s - Upstairs - Supporting Identity Parade and Pocket Promise     Dublin
10 Nov 2009     21:00    Doyles Pub - Ruby Sessions - SINGLE LAUNCH TOUR     Dublin
11 Nov 2009     20:00    An Cruibin - Triple Headliner - Cork - SINGLE LAUNCH TOUR w/ Justin Grounds and Niamh Murphy     Cork
12 Nov 2009     21:00    Boyles - Boyles, Slane - SINGLE LAUNCH TOUR w/ Wayne O’Connor     Slane, Meath
17 Nov 2009     21:00    Downstairs in the Spirit Store - The Spirit Store - SINGLE LAUNCH TOUR     Dundalk, Louth
20 Nov 2009     20:00    Roisin Dubh - Double Headliner - SINGLE LAUNCH TOUR w/ Justin Grounds     Galway
28 Nov 2009     20:00    Academy 2 - Double Headliner - SINGLE LAUNCH TOUR w/ GDC and Alan Marshall     Dublin

That's all for now - Cheerio,

Sunday 1 November 2009

Is Leopardstown Heights more important than Sandyford Hall? post

Interesting here, someone in Sandyford hall seems quite jealous of playground, MUGA, not having roads/greens dug up so much:
http://www.sandyfordhall.com/forum/read.php?1,126
"Is Leopardstown Heights more important than Sandyford Hall?"
 
I don't know what they think they'll achieve with that attitude? They might have forgotten to put in lots of smileys :-) hurr. :-7 yeah. maybe not. I think any Residents Committee might get low enough support and it comes down to a few of the same people putting in time to keep up contact with council + councillors + whole of the body of residents to try and get something close to what you want. And neighbouring residents associations should be working together ... anyway ... must say something over there and find out more.
 
Fionnuala was talking to the people putting the playground. They're busy despite the recession thank goodness. I'm not sure how come the council had money for the playground here. Not like Irish people to realise that investing in play equipment is VERY worthwhile!
http://www.thechildrensplayground.com/


 




Leopardstown Heights Residents' Assoc page:
http://www.lhra.info
 
Not much on here really but related:http://www.neighbours.ie/dublin18/index.php

Playground survives Halloween. Younger residents relieved.

New playground in Leop Heights survived Halloween very well. We picked up loads of rubbish and drink cans and bottles and swept up broken glass today after the bonfire. Good healthy outdoor fun :)


As usual there was a bit of "fun" over the bonfire this year.

We stayed away again, Not pleasant atmosphere with alcohol and horizontal fireworks. Big teenage crowd, some other bonfires were not happening in the area so that probably swelled the crowd at our one.

Note to parents in Leopardstown and miles around: if your kid or teen is out unsupervised on Halloween there's a good bit of messing and alcohol around. That includes the days and evenings the whole week running up to Halloween. If you don't mind your kids indulging or ending up in hospital then it's very inconsiderate of you inflicting them on the rest of us! Who buys the kids the bangers anyway!? They seem to have an endless supply. You know that after exploding the first one the only fun thing to do is to throw it at your friends and other people or put them in road diggers or skips to set them on fire!

Grr. I sound like a terrible grumpy-head!
Anyway today was nice. New playground still standing. One half is quite muddy though. There was loads of rubbish around. It looked really bad. Drink cans most obviously. We went out with the kids to playground and around and we brought rubbish bags. Picked up loads of cans and bottles and spent firework casings and general rubbish. Joined by 4 other people picking rubbish. The weather was v windy and a bit cold but dry. Very good day for picking rubbish. And we swept up broken glass from the  paths and  MUGA. Stiff and tired now. Bins stuffed full.

Note to non-residents of Ireland that the bonfires are still supposedly illegal of course like the fireworks that have been firing all week. :-P :) We even use helicopters now to spot fires from the air so as to stop the practice of burning waste on farms. They're illegal because Irish people (adults and kids) are so immature! I'm normally in favour of not over-controlling what people are allowed to do and allowing kids to learn from experiance but when the neighbourhood and kids play space becomes uncomfortable and unsafe over an extended period it gets really annoying.

On our estate there is private waste-ground nearby and the council will not collect bonfire material from there. If they do come and collect it they quickly have a mini rioting hoarde of snotty upper-middle class kids indignant at their rights of having bonfires infringed upon. Immensely annoying. Also the week before Halloween handily co-incides with mid-term break from school so there is a good week free for the kids to collect vast amounts of rubbish and wood to burn.

On Saturday the kids started constructing the bonfire in the afternoon. Our house looks onto the Green so we can see what happens over in the distance. The Gardai came after a while - someone must have phoned them - and I guess they checked out the area, they seemed to stay for 20 mins or so and the crowds of kids engaged or ran away from them depending.

Our residents' association after trying to control it the last few years decided to leave it this year. Not worth the hassle and not many residents supported any effort of limiting or supervising it the last few years.  I had a much less stressful Halloween as a result :)


Interesting to note that supervisors of bonfires in Sandyford Hall and Dun Emer were contacted directly by Gardai and asked to desist. I don't know if stopping all the safer supervised bonfires and leaving the unsupervised ones is such a good idea? Hmm.

Leopardstown Heights Residents' Assoc page:
http://www.lhra.info
http://www.dlrcoco.ie/env/Halloween_Bonfires.htm
http://www.dlrcoco.ie/env/Halloween_Bonfires.htm


We need a website like http://www.rateyourteenagers.ie with names and mugshots. ;) It's difficult talking with the kids who are not too bad but who are vandalizing or smashing bottles on the playground or causing other trouble when you don't know who you're talking with. I know a few of them and where they live but they all know who we are and where we live! ulp!