Skip to content

Instantly share code, notes, and snippets.

@irof
Created November 5, 2011 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irof/1341152 to your computer and use it in GitHub Desktop.
Save irof/1341152 to your computer and use it in GitHub Desktop.
jggugcamp2011の自己紹介
def file = new File('./outout.html')
String.metaClass.each = { Closure c -> c(delegate) }
def map = [
なまえ:'@irof',
年齢:'0x10代',
生息地:'大阪',
しごと:['主にJava','だけど1.4とか…。','超レガシー',],
クラスタ?:['関西ジャバエンジニアの会','TDDBC'],
Groovy:['@kiy0takaさんに釣られて…','けどあまり使えてませんorz'],
近況:'両足捻挫中'
]
def t='Groovy合宿 自己紹介'
new groovy.xml.MarkupBuilder(file.newPrintWriter()).html {
head {
meta('http-equiv': 'Content-type', content:'text.html:charset=UTF-8')
title(t)
}
body {
h1(t)
map.each {k,v ->
ul {
li(k){ ul { v.each {li(it)} } }
}
}
}
}
java.awt.Desktop.desktop.browse(file.toURI())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment