rblog

Creating my first Build Forge adaptor

This week I’m attending a two day course as an intro to Build Forge, followed up by a two day workshop on the use of RAFW. Between the lessons I have tried to create a simple adaptor to Build Forge which does nothing more than call a batch file and return the current date to the Bill of Materials. Not rocket science, but I need to start simple to learn it 🙂

I got the bat file from http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/ I just edited it a bit, making this the last line

echo Current date: %dd%.%mm%.%yyyy%

Calling a bat file like this might seem kinda stupid, but since adaptors are meant to enable you to call executables using command line, stupid is ok for now. The XML for the adaptor calling the bat file is like this

<?xml version="1.0"?>
<!DOCTYPE PROJECT_INTERFACE SYSTEM "interface.dtd">
<PROJECT_INTERFACE IFTYPE="Source" INSTANCE="7.02">
<template>
<env name="FILEPATH" value="path_to_file_with_ending_slash" />
<env name="FILENAME" value="name_of_bat_file_to_run" />

</template>
<interface name="ByDate">
<run command="command" params="$FILEPATH $FILENAME" server="$BF_SERVER" dir="/" timeout="360"/>
</interface>
<command name="command">
<execute>
$FILEPATH$FILENAME
</execute>
<resultsblock>
<match pattern="^Current date: (.*)">
<bom category="Result" section="CurrentDate">
<field name="currdate" text="$1"/>
</bom>
</match>
</resultsblock>
</command>
<bomformat category="Result" title="Current Date">
<section name="CurrentDate">
<field order="1" name="currdate" title="Date"/>
</section>
</bomformat>
</PROJECT_INTERFACE>


(Using Blogcrowds to escape the XML)

Note that you also need to create an environment in Build Forge containing the two variables in the template-section. The adaptor xml only describes them, it does not instantiates them. So create the environment and refer to it in your project or the step.

I would also recommend playing around with the bomformat-tag, which enables you to format the “Bill Of Material format”, creating headers, sections and fields.

Sheep rustling / Cattle rustling

I heard on the radio yesterday that farmers in England had started to worry about the rising of sheep rustling (Cattle rustling). The article they referred to on the radio was this one http://www.nrk.no/nyheter/verden/1.7125165. Did a further check on that one, and found this article on the BBC website. The last one is a bit more specific saying “Farmers raise Lothian and Borders sheep rustling fear”. So not a national plaque after all 🙂

Just do it!

Found this amazing clip when browsing Youtube – the Norwegian cross country national team back in 1961 preparing for the next season. First logging, then training, and to finish the day coffee and cards…

[video:youtube:sz30lTaKHDE]

Link

TLC for my bikes

Cleaning all my bikes when at Vestreng. Washed them, applied wax, took off all three chains and cleaned them using diesel, then I bent all the chain links one by one to remove as much dirt as possible. A few hours of quality time

Yesterdays bike ride – downtown Oslo

Had to take my camera to service at Foto Video, and what better to do than use my bike and not go the shortest way? I headed off to Ekebergsletta, then via Sjursøya to downtown Oslo. When finished at Foto Video I followed Akerselva up to Maridalsvannet and to Grefsenkollen. Surprised by the very good conditions riding my bike down the trails from the top down to Årvoll.

Picture taken above Sjursøya

See the route at Sportstracker

Das Boot visting Oslo

On Saturday me and Anders took the subway and got of at the Central Station and walked over to the Opera, to let him run around and let me have a look at the German submarine U-33.

Together with the submarine you can also see two other German boats, the tugboat A1452 Spiekeroog and the mine hunter Datteln. All the details to be found in the article from Dagbladet.

Must say I thought the submarine should be bigger, my cell phone camera did not manage to capture it any good all the way from the Opera.

And here a follow up from my post from the 3’rd of March this year, about the house being teared down. Now there is no traces from the house, just a parking lot.

¤%&#”!! music industry

Try watching some of the videos from Robyn at http://www.youtube.com/profile?user=Robynmusic&view=videos “This video is not available in your country” My ass!!! If it is available on Youtube, why on earth should they control it to only certain countries? It’s stupid like the DVD region zones. A very fast Google-search shows me ways around this http://googlesystem.blogspot.com/2008/04/watch-restricted-youtube-videos.html, just like you can buy a DVD region free player.

Can’t see the reason why to use such limitations when each time “they” try to implement them, workaround are available on the fly…

Disturbance

Sitting with the porch door open watching Topgear on Youtube when all of a suddne this terrible noice disturbs me. It is the police helicopter hoovering just above our house. Wonder who they where looking for.

Hjem