{"id":2036,"date":"2012-12-08T09:22:00","date_gmt":"2012-12-08T18:22:00","guid":{"rendered":"https:\/\/www.kellyrob99.com\/blog\/?p=2036"},"modified":"2012-12-08T09:22:00","modified_gmt":"2012-12-08T18:22:00","slug":"kuler-iterm2-themes-with-groovy-scripting","status":"publish","type":"post","link":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/","title":{"rendered":"Kuler iTerm2 Themes with Groovy Scripting"},"content":{"rendered":"<p>Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the <a href=\"http:\/\/www.iterm2.com\">iTerm2<\/a> terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily <a href=\"http:\/\/code.google.com\/p\/iterm2\/wiki\/ColorGallery\">import and export color themes for sharing<\/a>. I, of course, got immediately distracted with a shiny new feature and ended up spending an afternoon writing some code to try it out. Along the way I grabbed some color themes from the <a href=\"http:\/\/kuler.adobe.com\">Adobe Kuler site<\/a>, built a quick and dirty SwingBuilder script to visualize the themes and wrote a script for emitting <a href=\"https:\/\/developer.apple.com\/library\/mac\/#documentation\/Darwin\/Reference\/Manpages\/man5\/plist.5.html\">Apple plist files<\/a> suitable for import into iTerm2. <\/p>\n<h2>Adobe Kuler<\/h2>\n<p>This is a nice resource for finding and building color themes primarily intended for web consumption. Each theme boils down to five colors represented as hexadecimal which can be applied to a layout design in a fairly predictable pattern. In addition to using the website directly, <a href=\"http:\/\/learn.adobe.com\/wiki\/display\/kulerdev\/B.+Feeds\">RSS feeds<\/a> are made available for accessing shared themes. This makes grabbing a handful of themes for experimentation very easy to accomplish with the Groovy XmlSlurper.<\/p>\n<p>Here&#8217;s an excerpt of the RSS feed we&#8217;re parsing, representing a five color theme named &#8216;Feeling Etsy&#8217;.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;item&gt;\r\n      &lt;title&gt;Theme Title: Feeling Etsy&lt;\/title&gt;\r\n      &lt;link&gt;http:\/\/kuler.adobe.com\/index.cfm#themeID\/1892986&lt;\/link&gt;\r\n      &lt;guid&gt;http:\/\/kuler.adobe.com\/index.cfm#themeID\/1892986&lt;\/guid&gt;\r\n      &lt;enclosure xmlns=&quot;http:\/\/www.solitude.dk\/syndication\/enclosures\/&quot;&gt;\r\n        &lt;title&gt;Feeling Etsy&lt;\/title&gt;\r\n        &lt;link length=&quot;1&quot; type=&quot;image\/png&quot;&gt;\r\n          &lt;url&gt;http:\/\/kuler-api.adobe.com\/kuler\/themeImages\/theme_1892986.png&lt;\/url&gt;\r\n        &lt;\/link&gt;\r\n      &lt;\/enclosure&gt;\r\n      &lt;description&gt;\r\n\t\t\t\t &amp;lt;img src=&quot;http:\/\/kuler-api.adobe.com\/kuler\/themeImages\/theme_1892986.png&quot; \/&amp;gt;&amp;lt;br \/&amp;gt;\r\n\t\t\t\t \r\n\t\t\t\t Artist: kenzia.studio&amp;lt;br \/&amp;gt;\r\n\t\t\t\t ThemeID: 1892986&amp;lt;br \/&amp;gt;\r\n\t\t\t\t Posted: 05\/02\/2012&amp;lt;br \/&amp;gt;\r\n\t\t\t\t \r\n\t\t\t\t\t Tags: \r\n\t\t\t\t\t community...., join, lifestyle, share, vintage\r\n\t\t\t\t &amp;lt;br \/&amp;gt;\t\r\n\t\t\t\t \r\n\t\t\t\t\tHex:\r\n\t\t\t\t\tDCEBDD, A0D5D6, 789AA1, 304345, AD9A27&lt;\/description&gt;\r\n\r\n...\r\n<\/pre>\n<p>And <a href=\"https:\/\/gist.github.com\/2945511\">here&#8217;s parsing code<\/a> that queries for 100 of the &#8216;top rated&#8217; and 100 of the &#8216;popular&#8217; themes, serializing them out to a Groovy script file. There&#8217;s going to be some overlap in these two sets, so the end result is somewhat less than 200 themes.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\n\/**\r\n * Reads RSS feeds from kuler and extracts the hexadecimal representation of each five element theme, writing those\r\n * values to a file.\r\n *\/\r\ndef feeds = &#x5B;\r\n        new URL(&quot;http:\/\/kuler-api.adobe.com\/feeds\/rss\/get.cfm?itemsPerPage=100&amp;listType=rating&quot;),\r\n        new URL(&quot;http:\/\/kuler-api.adobe.com\/feeds\/rss\/get.cfm?itemsPerPage=100&amp;listType=popular&quot;)\r\n]\r\ndef mappedThemes = &#x5B;:]\r\ndef slurp = {rssXML, themes -&gt;\r\n    def xml = new XmlSlurper().parseText(rssXML)\r\n    xml.channel.item.each { theme -&gt;\r\n        println theme.title\r\n        def desc = theme.description.toString().split('\\n')\r\n        def hex = desc&#x5B;-1]\r\n        hex = hex.replaceAll('\\t', '')\r\n        hex = hex.replaceAll(' ', '')\r\n        themes.put(theme.title.toString().replaceAll('Theme Title:', '').trim().replaceAll(' ', '_')\r\n                .replaceAll('\\'', '_').toLowerCase(), hex.split(','))\r\n    }\r\n}\r\n\r\nfeeds.each { URL url -&gt;\r\n    slurp(url.text, mappedThemes)\r\n}\r\n\r\nprintln mappedThemes.keySet().size()\r\n\r\ndef themeMapFile = new File(&quot;kulerThemeMap-${new Date().format('yyMMddHHmmss')}.groovy&quot;)\r\nthemeMapFile &lt;&lt; &quot;themeMap = ${mappedThemes.inspect()}&quot;\r\nthemeMapFile.absolutePath\r\n<\/pre>\n<p>The end result is a Groovy script file containing a single Map type variable named &#8216;themeMap&#8217; in the global scope. This file can be interpreted by a GroovyShell to extract the Map of themes easily &#8211; not the best way to serialize the data but I actually wrote this parsing code a couple of years back and just wanted to quickly incorporate it into today&#8217;s efforts so I left it as is. <\/p>\n<p>Output in the file is just a Map of the theme name to the five corresponding hexadecimal color codes.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\nthemeMap = &#x5B;'pie_party__for_all_kulerist!!!':&#x5B;'690011', 'BF0426', 'CC2738', 'F2D99C', 'E5B96F'],\r\n 'pear_lemon_fizz':&#x5B;'04BFBF', 'CAFCD8', 'F7E967', 'A9CF54', '588F27'],\r\n 'feeling_etsy':&#x5B;'DCEBDD', 'A0D5D6', '789AA1', '304345', 'AD9A27'],\r\n 'phaedra':&#x5B;'FF6138', 'FFFF9D', 'BEEB9F', '79BD8F', '00A388'], \r\n...\r\n<\/pre>\n<h2>Visualizing the Themes<\/h2>\n<p>In order to see which of these themes might look OK in iTerm I wrote a SwingBuilder script that reads in the script file output from the last step, like so:<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\nassert args.size() == 1, '''The name or path to a file containing a themeMap \r\nscript variable must be supplied on the command line'''\r\n\r\ndef themeMapFileName = args&#x5B;0]\r\nBinding binding = new Binding()\r\nnew GroovyShell(binding).evaluate(new File(themeMapFileName))\r\nassert binding.hasVariable('themeMap'), &quot;${args&#x5B;0]} file must contain a Map variable named themeMap&quot;\r\ndef themeMap = binding.themeMap as TreeMap\r\n<\/pre>\n<p>The Swing app just has a simple 2 column layout to display the name of the theme on the left and colored labels for each of the theme colors. Looks like this:<\/p>\nngg_shortcode_0_placeholder\n<p>Having worked on Swing apps in plain-Jane Java professionally before, I&#8217;m still always astounded at how much less code you can write with Groovy and SwingBuilder. Here&#8217;s the 30 lines it takes to do the GUI and here&#8217;s <a href=\"https:\/\/gist.github.com\/2945613\">the full file on github<\/a>.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\ndef swing = new groovy.swing.SwingBuilder()\r\ndef mainPanel = swing.panel() {\r\n    boxLayout(axis: javax.swing.BoxLayout.Y_AXIS)\r\n    label(text: &quot;Showing ${themeMap.size()} themes&quot;)\r\n    scrollPane() {\r\n        panel() {\r\n            boxLayout(axis: javax.swing.BoxLayout.Y_AXIS)\r\n            themeMap.each { key, value -&gt;\r\n                panel(border:  emptyBorder(3)) {\r\n                    gridLayout(columns: 2, rows: 1)\r\n                    label(text: key)\r\n                    value.each {\r\n                        def color = Color.decode(&quot;#&quot; + it)\r\n                        int colorSize = 50\r\n                        label(opaque: true, toolTipText: it, background: color, foreground: color,\r\n                                preferredSize: &#x5B;colorSize, colorSize] as Dimension,\r\n                                border: lineBorder(color:Color.WHITE, thickness:1))\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\ndef frame = swing.frame(title: 'Frame') {\r\n    scrollPane(constraints: SwingConstants.CENTER) {\r\n        widget(mainPanel)\r\n    }\r\n}\r\nframe.pack()\r\nframe.show()\r\n<\/pre>\n<h2>Creating the iTerm plist Files<\/h2>\n<p>The iTerm color presets define some &#8216;Basic Colors&#8217; and some &#8216;ANSI Colors&#8217;. The basic ones cover: Foreground, Background, Bold, Selection, Selected Text, Cursor and Cursor Text. Seeing as we&#8217;ve got seven of these to map to five colors, I&#8217;ve(arbitrarily) chosen to make the Cursor and Cursor Text values depend upon the Foreground and Background colors, plus a fixed increment value. Here&#8217;s a picture to help explain.<\/p>\nngg_shortcode_1_placeholder\n<p>And here is the configuration screen for this new profile in iTerm.<\/p>\nngg_shortcode_2_placeholder\n<p>Each of the ANSI colors maps a standard color onto our color scheme and provides &#8216;Normal&#8217; and &#8216;Bright&#8217; variations for each color. I&#8217;ve (again arbitrarily) decided to map each of these by randomly selecting a color from the theme and determining a &#8216;Bright&#8217; version of it. This leads to some themes where colors won&#8217;t show up very well if there is a conflict with the &#8216;Basic&#8217; colors but it&#8217;s sufficient for my use case. In the end we want to write out an xml file for each theme which looks something like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;plist version=&quot;1.0&quot;&gt;\r\n  &lt;dict&gt;\r\n    &lt;key&gt;Ansi 0 Color&lt;\/key&gt;\r\n    &lt;dict&gt;\r\n      &lt;key&gt;Blue Component&lt;\/key&gt;\r\n      &lt;real&gt;0.2705882353&lt;\/real&gt;\r\n      &lt;key&gt;Green Component&lt;\/key&gt;\r\n      &lt;real&gt;0.2627450980&lt;\/real&gt;\r\n      &lt;key&gt;Red Component&lt;\/key&gt;\r\n      &lt;real&gt;0.1882352941&lt;\/real&gt;\r\n    &lt;\/dict&gt;\r\n    &lt;key&gt;Ansi 8 Color&lt;\/key&gt;\r\n    &lt;dict&gt;\r\n...\r\n<\/pre>\n<p>This repeating structure is easy to create using Groovy&#8217;s built in xml functionality. Because we want to include the DOCTYPE and xml header, I&#8217;m using StreamingMarkupBuilder and it&#8217;s handy <em>yieldUnescaped<\/em> function. Full source code is <a href=\"https:\/\/gist.github.com\/2945752\">available on github<\/a>, but here&#8217;s the bit which generates the two ANSI color definitions shown in the xml above.<\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\nfinal Closure buildColors = { builder, Color color -&gt;\r\n    builder.dict {\r\n        key('Blue Component')\r\n        real(normalize(color.blue))\r\n        key('Green Component')\r\n        real(normalize(color.green))\r\n        key('Red Component')\r\n        real(normalize(color.red))\r\n    }\r\n}\r\n\r\nfinal Closure buildComponentColors = { builder, colors, i -&gt;\r\n    final hex = colors&#x5B;random.nextInt(colors.size())]\r\n\r\n    \/\/Normal\r\n    final Color color = extractColor(hex)\r\n    builder.key(&quot;Ansi $i Color&quot;)\r\n    buildColors(builder, color)\r\n\r\n    \/\/Bright\r\n    final Color brighterColor = color.brighter()\r\n    builder.key(&quot;Ansi ${i + 8} Color&quot;)\r\n    buildColors(builder, brighterColor)\r\n}\r\n<\/pre>\n<p>Each theme results in a PLIST xml file ready to import into iTerm. <\/p>\n<h1>Conclusion<\/h1>\n<p>I continue to be impressed with how easy Groovy makes it to solve common programming problems. Within a very small space of time I was able to:<\/p>\n<ul>\n<li>parse multiple RSS feeds<\/li>\n<li>create a Swing application to visualize results<\/li>\n<li>transform the previously parsed results into an xml document usable in iTerm<\/li>\n<li>do it all in a couple of hundred lines of code<\/li>\n<li>publish the individual scripts on github<\/li>\n<\/ul>\n<p>Hopefully this gives you some ideas on how to do some Groovy hacking of your own. I know it was a fun afternoon for me \ud83d\ude42 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6],"tags":[257,251,258,112,249,28,148,109,50,113,250],"class_list":["post-2036","post","type-post","status-publish","format-standard","hentry","category-dev","tag-groovy","tag-iterm","tag-java","tag-kellyrob99","tag-kuler","tag-open-source","tag-source-code","tag-streamingmarkupbuilder","tag-swingbuilder","tag-thekaptain","tag-xmlslurper"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"TheKaptain\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"The Kaptain on ... stuff | Tales of development, life and the folly that goes along with both\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff\" \/>\n\t\t<meta property=\"og:description\" content=\"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2012-12-08T18:22:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2012-12-08T18:22:00+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#article\",\"name\":\"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff\",\"headline\":\"Kuler iTerm2 Themes with Groovy Scripting\",\"author\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#organization\"},\"datePublished\":\"2012-12-08T09:22:00-09:00\",\"dateModified\":\"2012-12-08T09:22:00-09:00\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#webpage\"},\"articleSection\":\"Development, Groovy, iTerm, Java, kellyrob99, kuler, Open source, Source code, StreamingMarkupBuilder, SwingBuilder, theKaptain, XmlSlurper\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/#listItem\",\"name\":\"Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/#listItem\",\"position\":2,\"name\":\"Development\",\"item\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#listItem\",\"name\":\"Kuler iTerm2 Themes with Groovy Scripting\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#listItem\",\"position\":3,\"name\":\"Kuler iTerm2 Themes with Groovy Scripting\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/category\\\/dev\\\/#listItem\",\"name\":\"Development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#organization\",\"name\":\"The Kaptain on ... stuff\",\"description\":\"Tales of development, life and the folly that goes along with both\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"TheKaptain\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e41f09f3548f065fe6967ac904d3ea2a638614c16d879cac47cfad64e5b1426a?s=96&d=monsterid&r=g\",\"width\":96,\"height\":96,\"caption\":\"TheKaptain\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#webpage\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/\",\"name\":\"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff\",\"description\":\"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/2012\\\/12\\\/08\\\/kuler-iterm2-themes-with-groovy-scripting\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2012-12-08T09:22:00-09:00\",\"dateModified\":\"2012-12-08T09:22:00-09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/\",\"name\":\"The Kaptain on ... stuff\",\"description\":\"Tales of development, life and the folly that goes along with both\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.kellyrob99.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff","description":"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got","canonical_url":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#article","name":"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff","headline":"Kuler iTerm2 Themes with Groovy Scripting","author":{"@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.kellyrob99.com\/blog\/#organization"},"datePublished":"2012-12-08T09:22:00-09:00","dateModified":"2012-12-08T09:22:00-09:00","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#webpage"},"isPartOf":{"@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#webpage"},"articleSection":"Development, Groovy, iTerm, Java, kellyrob99, kuler, Open source, Source code, StreamingMarkupBuilder, SwingBuilder, theKaptain, XmlSlurper"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.kellyrob99.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/#listItem","name":"Development"}},{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/#listItem","position":2,"name":"Development","item":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#listItem","name":"Kuler iTerm2 Themes with Groovy Scripting"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#listItem","position":3,"name":"Kuler iTerm2 Themes with Groovy Scripting","previousItem":{"@type":"ListItem","@id":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/#listItem","name":"Development"}}]},{"@type":"Organization","@id":"https:\/\/www.kellyrob99.com\/blog\/#organization","name":"The Kaptain on ... stuff","description":"Tales of development, life and the folly that goes along with both","url":"https:\/\/www.kellyrob99.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author","url":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/","name":"TheKaptain","image":{"@type":"ImageObject","@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e41f09f3548f065fe6967ac904d3ea2a638614c16d879cac47cfad64e5b1426a?s=96&d=monsterid&r=g","width":96,"height":96,"caption":"TheKaptain"}},{"@type":"WebPage","@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#webpage","url":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/","name":"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff","description":"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.kellyrob99.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/#breadcrumblist"},"author":{"@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.kellyrob99.com\/blog\/author\/admin\/#author"},"datePublished":"2012-12-08T09:22:00-09:00","dateModified":"2012-12-08T09:22:00-09:00"},{"@type":"WebSite","@id":"https:\/\/www.kellyrob99.com\/blog\/#website","url":"https:\/\/www.kellyrob99.com\/blog\/","name":"The Kaptain on ... stuff","description":"Tales of development, life and the folly that goes along with both","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.kellyrob99.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"The Kaptain on ... stuff | Tales of development, life and the folly that goes along with both","og:type":"article","og:title":"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff","og:description":"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got","og:url":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/","article:published_time":"2012-12-08T18:22:00+00:00","article:modified_time":"2012-12-08T18:22:00+00:00","twitter:card":"summary","twitter:title":"Kuler iTerm2 Themes with Groovy Scripting | The Kaptain on ... stuff","twitter:description":"Having recently purchased a new MBP laptop, I was going through the usual new computer activities and installing one of my favorite apps, the iTerm2 terminal program. This program really shines for managing multiple terminal windows, and recently they added the ability to easily import and export color themes for sharing. I, of course, got"},"aioseo_meta_data":{"post_id":"2036","title":null,"description":null,"keywords":[{"label":"Groovy","value":"Groovy"},{"label":"Java","value":"Java"},{"label":"kellyrob99","value":"kellyrob99"},{"label":"theKaptain","value":"theKaptain"},{"label":"Open source","value":"Open source"},{"label":"Source code","value":"Source code"},{"label":"HTTPBuilder","value":"HTTPBuilder"},{"label":"kuler","value":"kuler"},{"label":"SwingBuilder","value":"SwingBuilder"},{"label":"XmlSlurper","value":"XmlSlurper"},{"label":"StreamingMarkupBuilder","value":"StreamingMarkupBuilder"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-02-09 05:15:21","updated":"2025-11-29 20:28:39","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.kellyrob99.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/\" title=\"Development\">Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tKuler iTerm2 Themes with Groovy Scripting\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.kellyrob99.com\/blog"},{"label":"Development","link":"https:\/\/www.kellyrob99.com\/blog\/category\/dev\/"},{"label":"Kuler iTerm2 Themes with Groovy Scripting","link":"https:\/\/www.kellyrob99.com\/blog\/2012\/12\/08\/kuler-iterm2-themes-with-groovy-scripting\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/prjtg-wQ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/2036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/comments?post=2036"}],"version-history":[{"count":49,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/2036\/revisions"}],"predecessor-version":[{"id":2094,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/posts\/2036\/revisions\/2094"}],"wp:attachment":[{"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/media?parent=2036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/categories?post=2036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kellyrob99.com\/blog\/wp-json\/wp\/v2\/tags?post=2036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}