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.

The King of Kong

After a tip from Atle I bought “The King of Kong“. If you found “The Story of Anvil” worth watching, you will really enjoy The King of Kong. How can someone put so much effort into video games is beyond belief is you ask me. Some disputed facts of course when it comes to how the movie presents the story, but hey…you don’t ruin a good story with facts.

…but, now there is a new record set http://www.twingalaxies.com/index.aspx?c=22&pi=2&gi=3852&vi=22

[video:youtube:xMJZ-_bJKdI]

Link

New crank mounted on my commuter

Two days ago when biking from Ullevål back home, just about 400 meters from Spinn at Storo my bike broke down. The crank gear had a massive breakdown. As the picture shows, on the left just after the break down, the pedal is way to much to the left. Compare it with the picture to the right where the new crank is mounted it has a lot more space between the pedal and the frame. It started making noises on my way to Ullevål, and when I had to take a quick ride to work I was afraid that something would break down when at high speed. So I went slow and did not stand up at all, afraid that it would break down and make me fly over the handle bars. When the total breakdown was a fact it was not possible at all to use it, I had to walk the last bit. The original plan was to buy a new crank and fix it myself when at home, but no I did not bother. Luckily Pål Andre was present, so I was allowed to hand them the bike the very same day. That was on Monday, on Tuesday they where finished with it, but I was not able to pick it up before today. Now running smooth!!

Hjem