giovedì 22 maggio 2014
formatTextInColumns.groovy
just made a small #groovylang gist to format text with elements separated by char/string to fixed column:https:/:
https://gist.github.com/bartoleo/aab5ad2a8164eeae527b
example:
println "example1 without separators"
println formatTextInColumns("""\
aaa|bbbb|ccc
d|e|f|g
h|iiiiiiiiiii
jjjjjjj
end""","|",false)
println "example2 with separators"
println formatTextInColumns("""\
aaa|bbbb|ccc
d|e|f|g
h|iiiiiiiiiii
jjjjjjj
end""","|",true)
output:
example1 without separators
aaa bbbb ccc
d e f g
h iiiiiiiiiii
jjjjjjj
end
example2 with separators
aaa |bbbb |ccc|
d |e |f |g|
h |iiiiiiiiiii|
jjjjjjj|
|
end |
mercoledì 14 maggio 2014
GFlappyAsciiBird in one groovyscript file
Download this gist https://gist.github.com/bartoleo/3392215d144130164a04
Run it with groovy groovy GFlappyAsciiBird_v1.0.groovy
It needs groovy installed
Run it with groovy groovy GFlappyAsciiBird_v1.0.groovy
It needs groovy installed
venerdì 9 maggio 2014
Groovy experiments
Just sharing my groovy experiments on Github:
GFlappyAsciiBird
Flappy Bird ascii clone made in Groovy
GroovyAnsiMatrix
Matrix Falling Chars made in Ansi with Groovy
GRogueLike
Groovy RogueLike (not working ... sorry)
GPoly
Groovy Random Content with easy DSL declaration
GroovyAsciiTwitter
Twitter Ascii Viewer made with Groovy
Iscriviti a:
Post (Atom)