tkaczanowski

Generates text for http://wordle.net

Sep 27th, 2011
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.70 KB | None | 0 0
  1. //generates words to be used with http://www.wordle.net
  2.  
  3. //copy the output of the script to http://www.wordle.net/create and enjoy
  4.  
  5. //first number decides on the weight of words in the same line
  6. // in the example above "unit tests" will be printed with font 5 times bigger than "Ant"
  7.  
  8. def words = [
  9. [5, ["unit tests",]],
  10. [4, ["TDD", "BDD"]],
  11. [3, ["TestNG", "JUnit", "Mockito", "EasyMock", "JMock"]],
  12. [2, ["Fest", "Hamcrest", "ReportNG", "Cobertura", "Clover"]],
  13. [1, ["Ant", "Maven", "Gradle", "Intellij IDEA", "Eclipse"]]
  14. ]
  15.  
  16. for (line in words) {
  17.   for (j in 1..line[1].size) {
  18.     for (i in 1..line[0]) {
  19.       print line[1][j-1].replace(" ", " ")
  20.       print ","
  21.     }
  22.   }
  23.   println ""
  24. }
  25.  
  26.  
Add Comment
Please, Sign In to add comment