rblog

Create a blog post in Confluence using Groovy

Needed a way to publish a file containing a list of application versions installed in our WebSphere environment. What better to use than Groovy and XML-RPC for Atlassian Confluence. Tested on version 3.5


import groovy.net.xmlrpc.*

// ************** Set according to your environment ********
def SERVER = "http://<YOUR_SERVER_NAME>/rpc/xmlrpc"
def UID = "<UID>"
def PWD = "<PWD>"
def SPACEKEY = "<SPACEKEY>"
def BLOGTITLE = "<BLOGTITLE>"
def CONTENTTXT = "<TEXT WITH MACROS AND SUCH>"
// *******************************************************

println "Connect to server"
def c = new XMLRPCServerProxy(SERVER)

println "Login to server"
def token = c.confluence1.login(UID,PWD)

// Example found at http://confluence.atlassian.com/display/DISC/XML-RPC+Page+Updater+Example
println "Create blog and then save it"
def newBlogdata = [space:SPACEKEY,title:BLOGTITLE,content:CONTENTTXT]
c.confluence1.storeBlogEntry(token, newBlogdata)

// Clean up by logging out
println "Logout"
c.confluence1.logout(token)

Update:
In additon you would off course need to download the needed jar file, get it at http://groovy.codehaus.org/XMLRPC

Oh joy!!! New bike: Everest Twenty9

After having considered for a while whether to buy a Scott Scale 29 Expert or the Everest Twenty9 I decided yesterday to go for less weight – so here it is in our living room, the brand new 2011 Everest Twenty9…even Elin accepted the fact that the bike is placed here for a while. Can’t take it outside just yet… So now it is truly all up to me when heading for Germany in June.

All the technical details can be found here www.oslosportslager.no/…/everest-twenty9-carbon-2011-terrengsykkel

Can’t wait to test the SRAM 2×10, I read the thread found here forums.mtbr.com/…/why-3×10-vs-2×10-662945.html and what some points out that the overlap is decreased a lot it just what I was hoping for…spring, come and get me!!

My latest book – Kai Eide “Høyt spill om Afghanistan”

Kai Aage Eide (born 28 February 1949 in Sarpsborg) is a Norwegian diplomat. He was appointed the United Nations Special Representative to Afghanistan and Head of the United Nations Assistance Mission in Afghanistan (UNAMA) on 7 March 2008,[1] a position he held until March 2010 when Staffan de Mistura took over….

http://en.wikipedia.org/wiki/Kai_Eide

Well worth reading!

What a view!

Got a spinning bike in the basement. Just had to share the view…thank god for the mp3-player with A Perfect Circle, Iron Maiden, Depeche and more, without it I would have gone mad…or at least I would never have spent any time there.

Moist…sweat…

Hjem