rmthemegen 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. data/lib/rmthemegen/geany_fix.rb +8 -7
  2. data/lib/rmthemegen/rmthemegen_187.rb +11 -6
  3. data/lib/rmthemegen/rmthemegen_187_textmate.rb +88 -0
  4. data/lib/rmthemegen/token_list.rb +1 -1
  5. data/lib/rmthemegen/version.rb +1 -1
  6. data/rmthemegen.gemspec +1 -1
  7. data/test/Active4D.tmTheme +407 -0
  8. data/test/All Hallow's Eve Custom.tmTheme +273 -0
  9. data/test/All Hallow's Eve.tmTheme +277 -0
  10. data/test/Amy.tmTheme +557 -0
  11. data/test/BBEdit.tmTheme +437 -0
  12. data/test/Black Pearl II.tmTheme +496 -0
  13. data/test/Black Pearl.tmTheme +400 -0
  14. data/test/Blackboard Black.tmTheme +350 -0
  15. data/test/Blackboard.tmTheme +350 -0
  16. data/test/Bongzilla.tmTheme +223 -0
  17. data/test/Brilliance Black.tmTheme +2619 -0
  18. data/test/Brilliance Dull.tmTheme +2243 -0
  19. data/test/CSSEdit.tmTheme +203 -0
  20. data/test/Clouds Midnight.tmTheme +361 -0
  21. data/test/Clouds.tmTheme +348 -0
  22. data/test/Cobalt.tmTheme +559 -0
  23. data/test/Coda.tmTheme +313 -0
  24. data/test/Cool Glow.tmTheme +350 -0
  25. data/test/Dawn.tmTheme +437 -0
  26. data/test/Django (Smoothy).tmTheme +453 -0
  27. data/test/Django.tmTheme +436 -0
  28. data/test/Eiffel.tmTheme +439 -0
  29. data/test/Emacs Strict.tmTheme +241 -0
  30. data/test/Espresso Libre.tmTheme +402 -0
  31. data/test/Espresso Tutti.tmTheme +392 -0
  32. data/test/Espresso.tmTheme +329 -0
  33. data/test/Fade to Grey.tmTheme +308 -0
  34. data/test/Fluidvision.tmTheme +443 -0
  35. data/test/ForLaTeX.tmTheme +214 -0
  36. data/test/Freckle.tmTheme +279 -0
  37. data/test/Friendship Bracelet.tmTheme +303 -0
  38. data/test/GitHub.tmTheme +653 -0
  39. data/test/GlitterBomb.tmTheme +387 -0
  40. data/test/Happy happy joy joy 2.tmTheme +841 -0
  41. data/test/IDLE.tmTheme +235 -0
  42. data/test/IR_Black.tmTheme +810 -0
  43. data/test/IR_White.tmTheme +792 -0
  44. data/test/LAZY.tmTheme +291 -0
  45. data/test/Lowlight.tmTheme +605 -0
  46. data/test/Mac Classic.tmTheme +450 -0
  47. data/test/Made of Code.tmTheme +695 -0
  48. data/test/MagicWB (Amiga).tmTheme +376 -0
  49. data/test/Merbivore Soft.tmTheme +285 -0
  50. data/test/Merbivore.tmTheme +285 -0
  51. data/test/Monokai.tmTheme +289 -0
  52. data/test/MultiMarkdown.tmTheme +183 -0
  53. data/test/Pastels on Dark.tmTheme +701 -0
  54. data/test/Pastie.tmTheme +321 -0
  55. data/test/Putty.tmTheme +275 -0
  56. data/test/RDark.tmTheme +235 -0
  57. data/test/Rails Envy.tmTheme +299 -0
  58. data/test/Railscasts.tmTheme +278 -0
  59. data/test/Ryan Light.tmTheme +232 -0
  60. data/test/Slush & Poppies.tmTheme +336 -0
  61. data/test/Smoothy.tmTheme +623 -0
  62. data/test/SpaceCadet.tmTheme +212 -0
  63. data/test/Spectacular.tmTheme +436 -0
  64. data/test/Starlight.tmTheme +111 -0
  65. data/test/Summer Camp Mod.tmTheme +229 -0
  66. data/test/Summer Camp.tmTheme +229 -0
  67. data/test/Sunburst.tmTheme +665 -0
  68. data/test/Swyphs II.tmTheme +306 -0
  69. data/test/Tango.tmTheme +450 -0
  70. data/test/Text Ex Machina.tmTheme +295 -0
  71. data/test/Tubster.tmTheme +280 -0
  72. data/test/Twilight.tmTheme +518 -0
  73. data/test/Vibrant Fin.tmTheme +447 -0
  74. data/test/Vibrant Ink.tmTheme +447 -0
  75. data/test/Vibrant Tango.tmTheme +438 -0
  76. data/test/WhysPoignant.tmTheme +191 -0
  77. data/test/Zenburnesque.tmTheme +343 -0
  78. data/test/[ Argonaut ].tmTheme +387 -0
  79. data/test/choco.tmTheme +542 -0
  80. data/test/fake.tmTheme +669 -0
  81. data/test/get_tm_tokens.rb +100 -0
  82. data/test/iLife 05.tmTheme +619 -0
  83. data/test/iPlastic.tmTheme +286 -0
  84. data/test/idleFingers.tmTheme +380 -0
  85. data/test/krTheme.tmTheme +551 -0
  86. data/test/monoindustrial.tmTheme +451 -0
  87. data/test/test_generate_themes.rb +3 -1
  88. metadata +85 -5
  89. data/test/rmthemegen_spec.rb +0 -9
@@ -0,0 +1,100 @@
1
+ #! /usr/bin/ruby
2
+ #**********************************************************************
3
+ #* *
4
+ #* RmThemeGen - a ruby script to create random, usable themes for *
5
+ #* text editors. Currently supports RubyMine 3.X.X *
6
+ #* *
7
+ #* By David Heitzman, 2011 *
8
+ #* *
9
+ #**********************************************************************
10
+
11
+ #this is a version of the software that should work with ruby 1.8.7
12
+ #originally it was written and tested for ruby 1.9.2
13
+
14
+ require 'rubygems'
15
+ require File.dirname(__FILE__)+'./lib/rmthemegen/rmthemegen_187'
16
+ require File.dirname(__FILE__)+'./lib/rmthemegen/rmthemegen_187_textmate'
17
+ require 'xmlsimple'
18
+
19
+ puts "TEST TEST TEST"
20
+ puts
21
+ puts " Mac: Copy xml files to ~/Library/Preferences/RubyMine/color. You must restart RubyMine on the Mac, then look for new color schemes. "
22
+ puts
23
+
24
+ =begin
25
+ c=Color::RGB.new(0,0,0)
26
+ 1000.times do
27
+ puts c.next_gaussian(0.50 )
28
+ end
29
+ Kernel.exit
30
+ =end
31
+
32
+ tm_files = Dir.glob("*.tmTheme")
33
+ puts tm_files.inspect
34
+ @doc_opts_accum = Hash.new
35
+ @element_tokens = {}
36
+ @element_scopes = {}
37
+ @token_to_scope = {}
38
+
39
+ tm_files.each do |inf|
40
+ puts "xml_in for "+inf.to_s
41
+ @inf = File.open(inf,"r")
42
+ @tm_xml_in = XmlSimple.xml_in(@inf)
43
+ # puts @tm_xml_in.inspect
44
+
45
+ @doc_opts_accum.merge!( @tm_xml_in["dict"][0]["array"][0]["dict"][0]["dict"][0])
46
+
47
+ @tm_xml_in["dict"][0]["array"][0]["dict"].each_index do |i|
48
+ #find index of "scope" in array "key"
49
+ # puts i.to_s+" |e| |e| "+@tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][1].inspect if @tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"]
50
+ if @tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"]
51
+ token = @tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][0]
52
+ scope =@tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][1]
53
+ @token_to_scope[token.to_s] = scope.to_s
54
+ end
55
+ # @element_tokens[@tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][0].to_s]=1 if @tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"]
56
+ # @element_scopes[@tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][1].to_s ]=1 if @tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"]
57
+ # @token_to_scope[@tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][0].to_s]=@tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][1]
58
+ # @element_tokens.add( @tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"][1].to_s]) if @tm_xml_in["dict"][0]["array"][0]["dict"][i]["string"]
59
+
60
+ #scope_ind = e[:key].index_of["scope"]
61
+ #puts "scope_ind = "+scope_ind
62
+
63
+ end
64
+
65
+ # @outf = File.new("zxzxzxzxzx.tmTheme","w+")
66
+ # XmlSimple.xml_out(@tm_xml_in, {:keeproot=>true,:xmldeclaration=>true,:outputfile=> @outf, :rootname => "scheme"})
67
+ # @outf.close
68
+ end
69
+ puts "@doc_opts_accum: "+@doc_opts_accum.inspect
70
+ puts "@element_tokens: " + (@element_tokens.keys.collect do |e|
71
+ e
72
+ end).to_s
73
+ puts @element_tokens.size.to_s
74
+ puts "@element_scopes: " + (@element_scopes.collect do |s|
75
+ s
76
+ end).to_s
77
+ puts @element_scopes.size.to_s
78
+ tts=""
79
+ @token_to_scope.each do |k,v|
80
+ tts +=k.to_s + " => "+v.to_s+"\n"
81
+ end
82
+ puts "@token_to_scope: " + tts
83
+ puts @token_to_scope.size.to_s
84
+
85
+
86
+ Kernel.exit
87
+
88
+ l = RMThemeGen::ThemeGenerator.new
89
+
90
+ 1.times do
91
+ # puts l.make_theme_file(:outputdir => ENV["PWD"],:bg_color_style => 0 )
92
+ # puts l.make_theme_file(ENV["PWD"],0,[{:r=>0.0,:g=>0.0},{:r=>1.0,:g=>0.0,:b=>0.0}])
93
+ puts l.make_theme_file(ENV["PWD"],0,nil)
94
+ puts l.to_textmate
95
+ # puts l.make_theme_file(:outputdir => ENV["PWD"],:bg_color_style => 2 )
96
+ end
97
+ puts "testing to_css"
98
+ puts l.to_css
99
+
100
+ puts