Skip to content

Instantly share code, notes, and snippets.

@firefart
Created December 11, 2013 21:07
Show Gist options
  • Save firefart/7918462 to your computer and use it in GitHub Desktop.
Save firefart/7918462 to your computer and use it in GitHub Desktop.
Creates a Wordpress theme with terminal escape characters in it's name
#!/usr/bin/env ruby
colored = "\e[34mColored Text\e[0m"
bold = "\e[1m Bold!\e[0m"
style_css = <<CSS.sub('{1}', colored).sub('{2}', bold).strip
/*
Theme Name: bad_theme
Theme URI: http://www.firefart.net
Description: {1}
Author: {2}
Author URI: http://www.firefart.net
Template: twentytwelve
Version: 1.0.0
*/
@import url("../twentytwelve/style.css");
CSS
File.open('style.css', 'w') { |file| file.write(style_css) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment