rmthemegen 0.0.38 → 0.0.39
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.
- data/.project +18 -0
- data/bin/geanyfy.rb +4 -41
- data/lib/rmthemegen/basis_theme.tmTheme +971 -0
- data/lib/rmthemegen/geany.filetypes.all +2945 -0
- data/lib/rmthemegen/plist.html +246 -0
- data/lib/rmthemegen/plist_to_tokenlist.rb +242 -0
- data/lib/rmthemegen/rmtg_rubymine.rb +196 -0
- data/lib/rmthemegen/rmtg_textmate.rb +262 -0
- data/lib/rmthemegen/rmthemegen_187.rb +32 -233
- data/lib/rmthemegen/rmthemegen_parent.rb +235 -0
- data/lib/rmthemegen/rmthemegen_to_css.rb +1 -0
- data/lib/rmthemegen/syntaxes/Apache.plist +544 -0
- data/lib/rmthemegen/syntaxes/Bibtex.plist +406 -0
- data/lib/rmthemegen/syntaxes/Blog___HTML__.plist +88 -0
- data/lib/rmthemegen/syntaxes/Blog___Markdown__.plist +89 -0
- data/lib/rmthemegen/syntaxes/Blog___Text__.plist +74 -0
- data/lib/rmthemegen/syntaxes/Blog___Textile__.plist +74 -0
- data/lib/rmthemegen/syntaxes/C.plist +1126 -0
- data/lib/rmthemegen/syntaxes/CSS.plist +543 -0
- data/lib/rmthemegen/syntaxes/C____.plist +521 -0
- data/lib/rmthemegen/syntaxes/ClojureRepl.plist +40 -0
- data/lib/rmthemegen/syntaxes/Diff.plist +229 -0
- data/lib/rmthemegen/syntaxes/GroovyRepl.plist +40 -0
- data/lib/rmthemegen/syntaxes/HTML.plist +960 -0
- data/lib/rmthemegen/syntaxes/HTML___Rails__.plist +92 -0
- data/lib/rmthemegen/syntaxes/Haskell.plist +646 -0
- data/lib/rmthemegen/syntaxes/Io.plist +225 -0
- data/lib/rmthemegen/syntaxes/Java.plist +1156 -0
- data/lib/rmthemegen/syntaxes/JavaProperties.plist +70 -0
- data/lib/rmthemegen/syntaxes/JavaScript.plist +712 -0
- data/lib/rmthemegen/syntaxes/LaTeX.plist +1601 -0
- data/lib/rmthemegen/syntaxes/LaTeX_Beamer.plist +106 -0
- data/lib/rmthemegen/syntaxes/LaTeX_Log.plist +141 -0
- data/lib/rmthemegen/syntaxes/Lisp.plist +160 -0
- data/lib/rmthemegen/syntaxes/Literate_Haskell.plist +90 -0
- data/lib/rmthemegen/syntaxes/Makefile.plist +103 -0
- data/lib/rmthemegen/syntaxes/Markdown.plist +1192 -0
- data/lib/rmthemegen/syntaxes/Mirah.plist +22 -0
- data/lib/rmthemegen/syntaxes/PHP.plist +3481 -0
- data/lib/rmthemegen/syntaxes/PHP.xml +3481 -0
- data/lib/rmthemegen/syntaxes/Perl.plist +3209 -0
- data/lib/rmthemegen/syntaxes/Plain_text.plist +83 -0
- data/lib/rmthemegen/syntaxes/Processing.plist +296 -0
- data/lib/rmthemegen/syntaxes/Rez.plist +219 -0
- data/lib/rmthemegen/syntaxes/Ruby.plist +2891 -0
- data/lib/rmthemegen/syntaxes/RubyRepl.plist +40 -0
- data/lib/rmthemegen/syntaxes/Ruby_on_Rails.plist +288 -0
- data/lib/rmthemegen/syntaxes/SQL.plist +705 -0
- data/lib/rmthemegen/syntaxes/SQL___Rails__.plist +51 -0
- data/lib/rmthemegen/syntaxes/Shell__Unix__Generic.plist +1855 -0
- data/lib/rmthemegen/syntaxes/TeX.plist +246 -0
- data/lib/rmthemegen/syntaxes/TeX_Math.plist +132 -0
- data/lib/rmthemegen/syntaxes/Textile.plist +490 -0
- data/lib/rmthemegen/syntaxes/Vala.plist +285 -0
- data/lib/rmthemegen/syntaxes/XML.plist +576 -0
- data/lib/rmthemegen/syntaxes/XSL.plist +157 -0
- data/lib/rmthemegen/syntaxes/YAML.plist +467 -0
- data/lib/rmthemegen/textmate_themes/Active4D.tmTheme +407 -0
- data/lib/rmthemegen/textmate_themes/All Hallow's Eve Custom.tmTheme +273 -0
- data/lib/rmthemegen/textmate_themes/All Hallow's Eve.tmTheme +277 -0
- data/lib/rmthemegen/textmate_themes/Amy.tmTheme +557 -0
- data/lib/rmthemegen/textmate_themes/BBEdit.tmTheme +437 -0
- data/lib/rmthemegen/textmate_themes/Black Pearl II.tmTheme +496 -0
- data/lib/rmthemegen/textmate_themes/Black Pearl.tmTheme +400 -0
- data/lib/rmthemegen/textmate_themes/Blackboard Black.tmTheme +350 -0
- data/lib/rmthemegen/textmate_themes/Blackboard.tmTheme +350 -0
- data/lib/rmthemegen/textmate_themes/Bongzilla.tmTheme +223 -0
- data/lib/rmthemegen/textmate_themes/Brilliance Black.tmTheme +2619 -0
- data/lib/rmthemegen/textmate_themes/Brilliance Dull.tmTheme +2243 -0
- data/lib/rmthemegen/textmate_themes/CSSEdit.tmTheme +203 -0
- data/lib/rmthemegen/textmate_themes/Clouds Midnight.tmTheme +361 -0
- data/lib/rmthemegen/textmate_themes/Clouds.tmTheme +348 -0
- data/lib/rmthemegen/textmate_themes/Cobalt.tmTheme +559 -0
- data/lib/rmthemegen/textmate_themes/Coda.tmTheme +313 -0
- data/lib/rmthemegen/textmate_themes/Cool Glow.tmTheme +350 -0
- data/lib/rmthemegen/textmate_themes/Dawn.tmTheme +437 -0
- data/lib/rmthemegen/textmate_themes/Django (Smoothy).tmTheme +453 -0
- data/lib/rmthemegen/textmate_themes/Django.tmTheme +436 -0
- data/lib/rmthemegen/textmate_themes/Eiffel.tmTheme +439 -0
- data/lib/rmthemegen/textmate_themes/Emacs Strict.tmTheme +241 -0
- data/lib/rmthemegen/textmate_themes/Espresso Libre.tmTheme +402 -0
- data/lib/rmthemegen/textmate_themes/Espresso Tutti.tmTheme +392 -0
- data/lib/rmthemegen/textmate_themes/Espresso.tmTheme +329 -0
- data/lib/rmthemegen/textmate_themes/Fade to Grey.tmTheme +308 -0
- data/lib/rmthemegen/textmate_themes/Fluidvision.tmTheme +443 -0
- data/lib/rmthemegen/textmate_themes/ForLaTeX.tmTheme +214 -0
- data/lib/rmthemegen/textmate_themes/Freckle.tmTheme +279 -0
- data/lib/rmthemegen/textmate_themes/Friendship Bracelet.tmTheme +303 -0
- data/lib/rmthemegen/textmate_themes/GitHub.tmTheme +653 -0
- data/lib/rmthemegen/textmate_themes/GlitterBomb.tmTheme +387 -0
- data/lib/rmthemegen/textmate_themes/Happy happy joy joy 2.tmTheme +841 -0
- data/lib/rmthemegen/textmate_themes/IDLE.tmTheme +235 -0
- data/lib/rmthemegen/textmate_themes/IR_Black.tmTheme +810 -0
- data/lib/rmthemegen/textmate_themes/IR_White.tmTheme +792 -0
- data/lib/rmthemegen/textmate_themes/LAZY.tmTheme +291 -0
- data/lib/rmthemegen/textmate_themes/Lowlight.tmTheme +605 -0
- data/lib/rmthemegen/textmate_themes/Mac Classic.tmTheme +450 -0
- data/lib/rmthemegen/textmate_themes/Made of Code.tmTheme +695 -0
- data/lib/rmthemegen/textmate_themes/MagicWB (Amiga).tmTheme +376 -0
- data/lib/rmthemegen/textmate_themes/Merbivore Soft.tmTheme +285 -0
- data/lib/rmthemegen/textmate_themes/Merbivore.tmTheme +285 -0
- data/lib/rmthemegen/textmate_themes/Monokai.tmTheme +289 -0
- data/lib/rmthemegen/textmate_themes/MultiMarkdown.tmTheme +183 -0
- data/lib/rmthemegen/textmate_themes/Pastels on Dark.tmTheme +701 -0
- data/lib/rmthemegen/textmate_themes/Pastie.tmTheme +321 -0
- data/lib/rmthemegen/textmate_themes/Putty.tmTheme +275 -0
- data/lib/rmthemegen/textmate_themes/RDark.tmTheme +235 -0
- data/lib/rmthemegen/textmate_themes/Rails Envy.tmTheme +299 -0
- data/lib/rmthemegen/textmate_themes/Railscasts.tmTheme +278 -0
- data/lib/rmthemegen/textmate_themes/Ryan Light.tmTheme +232 -0
- data/lib/rmthemegen/textmate_themes/Slush & Poppies.tmTheme +336 -0
- data/lib/rmthemegen/textmate_themes/Smoothy.tmTheme +623 -0
- data/lib/rmthemegen/textmate_themes/SpaceCadet.tmTheme +212 -0
- data/lib/rmthemegen/textmate_themes/Spectacular.tmTheme +436 -0
- data/lib/rmthemegen/textmate_themes/Starlight.tmTheme +111 -0
- data/lib/rmthemegen/textmate_themes/Summer Camp Mod.tmTheme +229 -0
- data/lib/rmthemegen/textmate_themes/Summer Camp.tmTheme +229 -0
- data/lib/rmthemegen/textmate_themes/Sunburst.tmTheme +665 -0
- data/lib/rmthemegen/textmate_themes/Swyphs II.tmTheme +306 -0
- data/lib/rmthemegen/textmate_themes/Tango.tmTheme +450 -0
- data/lib/rmthemegen/textmate_themes/Text Ex Machina.tmTheme +295 -0
- data/lib/rmthemegen/textmate_themes/Tubster.tmTheme +280 -0
- data/lib/rmthemegen/textmate_themes/Twilight.tmTheme +518 -0
- data/lib/rmthemegen/textmate_themes/Vibrant Fin.tmTheme +447 -0
- data/lib/rmthemegen/textmate_themes/Vibrant Ink.tmTheme +447 -0
- data/lib/rmthemegen/textmate_themes/Vibrant Tango.tmTheme +438 -0
- data/lib/rmthemegen/textmate_themes/WhysPoignant.tmTheme +191 -0
- data/lib/rmthemegen/textmate_themes/Zenburnesque.tmTheme +343 -0
- data/lib/rmthemegen/textmate_themes/[ Argonaut ].tmTheme +387 -0
- data/lib/rmthemegen/textmate_themes/choco.tmTheme +542 -0
- data/lib/rmthemegen/textmate_themes/fake.tmTheme +669 -0
- data/lib/rmthemegen/textmate_themes/iLife 05.tmTheme +619 -0
- data/lib/rmthemegen/textmate_themes/iPlastic.tmTheme +286 -0
- data/lib/rmthemegen/textmate_themes/idleFingers.tmTheme +380 -0
- data/lib/rmthemegen/textmate_themes/krTheme.tmTheme +551 -0
- data/lib/rmthemegen/textmate_themes/monoindustrial.tmTheme +451 -0
- data/lib/rmthemegen/token_list.rb +171 -101
- data/lib/rmthemegen/uv_addons.rb +176 -0
- data/rmthemegen.gemspec +4 -1
- data/spec/rmthemegen/plist_to_tokenlist_spec.rb +0 -0
- data/test/choco.css +138 -0
- data/test/choco.render +136 -0
- data/test/get_tm_scopes.rb +79 -0
- data/test/get_tm_tokens.rb +0 -3
- data/test/newtheme.sh +6 -0
- data/test/output +14 -0
- data/test/rexml.element.methods +100 -0
- data/test/scopes_harvested +61 -0
- data/test/scopes_harvested.rb +15 -0
- data/test/test_generate_themes.rb +75 -38
- metadata +198 -13
- data/lib/rmthemegen/index.html +0 -2
- data/lib/rmthemegen/rmthemegen_187_textmate.rb +0 -155
- data/test/rmt_beautiful_quality.tmTheme +0 -399
- data/test/rmt_beautiful_quality.xml +0 -2089
@@ -1,45 +1,82 @@
|
|
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
|
-
|
15
|
-
require File.dirname(__FILE__)+'./lib/rmthemegen/
|
16
|
-
require File.dirname(__FILE__)+'./lib/rmthemegen/
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
puts
|
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
|
+
|
15
|
+
require File.dirname(__FILE__)+'./lib/rmthemegen/rmtg_rubymine'
|
16
|
+
require File.dirname(__FILE__)+'./lib/rmthemegen/rmtg_textmate'
|
17
|
+
#require File.dirname(__FILE__)+'./lib/rmthemegen/rmthemegen_187_textmate'
|
18
|
+
# require File.dirname(__FILE__)+'./lib/rmthemegen/rmtg187_new_textmate'
|
19
|
+
#require File.dirname(__FILE__)+'./lib/rmthemegen/plist_to_tokenlist'
|
20
|
+
puts "TEST TEST TEST"
|
21
|
+
puts
|
22
|
+
puts " Mac: Copy xml files to ~/Library/Preferences/RubyMine/color. You must restart RubyMine on the Mac, then look for new color schemes. "
|
23
|
+
puts
|
21
24
|
|
22
25
|
=begin
|
23
|
-
c=Color::RGB.new(0,0,0)
|
24
|
-
1000.times do
|
25
|
-
puts c.next_gaussian(0.50 )
|
26
|
-
end
|
27
|
-
Kernel.exit
|
26
|
+
c=Color::RGB.new(0,0,0)
|
27
|
+
1000.times do
|
28
|
+
puts c.next_gaussian(0.50 )
|
29
|
+
end
|
30
|
+
Kernel.exit
|
28
31
|
=end
|
29
32
|
|
30
|
-
|
31
|
-
l = RMThemeGen::ThemeGenerator.new
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
puts l.make_theme_file(ENV["PWD"]
|
37
|
-
puts l.
|
34
|
+
l = RMThemeGen::ThemeTextmate.new
|
35
|
+
|
36
|
+
10.times do
|
37
|
+
# puts l.make_theme_file(:outputdir => ENV["PWD"],:bg_color_style => 0 )
|
38
|
+
# puts l.make_theme_file(ENV["PWD"],0,[{:r=>0.0,:g=>0.0},{:r=>1.0,:g=>0.0,:b=>0.0}])
|
39
|
+
puts l.make_theme_file(ENV["PWD"],:dark,nil,nil)
|
40
|
+
#puts newTmTheme=l.make_tm_theme_file(ENV["PWD"],(rand*2).to_i,nil,nil)
|
38
41
|
|
39
|
-
|
42
|
+
puts "testing to_css"
|
43
|
+
# puts l.to_css
|
44
|
+
puts "testing themename"
|
45
|
+
puts l.themename
|
46
|
+
puts
|
47
|
+
# Uv::Converters.tmtheme2render( File.expand_path(File.dirname(__FILE__))+"/textmate_themes/choco.tmTheme", File.dirname(__FILE__) )
|
48
|
+
# Uv::Converters.tmtheme2render( newTmTheme,"." )
|
49
|
+
=begin
|
50
|
+
puts '@for_tm_output.inspect'
|
51
|
+
# puts l.for_tm_output.inspect
|
52
|
+
token_ary = []
|
53
|
+
l.for_tm_output.each do |k,v|
|
54
|
+
# puts k.inspect
|
55
|
+
token_ary << k.to_s
|
56
|
+
end
|
57
|
+
|
58
|
+
token_ary.sort!
|
59
|
+
nary3=[]
|
60
|
+
token_ary.each do |i|
|
61
|
+
nary3 << [i,l.for_tm_output[i] ]
|
62
|
+
end
|
63
|
+
nary3.each do |i|
|
64
|
+
puts i.inspect
|
65
|
+
end
|
66
|
+
puts 'number of tokens: '
|
67
|
+
puts l.for_tm_output.size
|
68
|
+
|
69
|
+
puts 'top_level_names'
|
70
|
+
l.repository_names.each do |n|
|
71
|
+
puts n.inspect
|
72
|
+
end
|
73
|
+
puts '------------------------->>> under patterns <<<--------------------------- '
|
74
|
+
l.under_patterns.each do |p,v|
|
75
|
+
puts p.to_s+"=>"+v.to_s
|
76
|
+
end
|
77
|
+
#puts l.under_patterns.inspect
|
78
|
+
#puts "testing plist_to_tokenlist.rb"
|
79
|
+
#l.process_plists
|
80
|
+
puts
|
81
|
+
=end
|
40
82
|
end
|
41
|
-
puts "testing to_css"
|
42
|
-
puts l.to_css
|
43
|
-
puts "testing themename"
|
44
|
-
puts l.themename
|
45
|
-
puts
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rmthemegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 81
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 39
|
10
|
+
version: 0.0.39
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Heitzman
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-02-19 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: xml-simple
|
@@ -51,9 +50,57 @@ dependencies:
|
|
51
50
|
type: :runtime
|
52
51
|
version_requirements: *id002
|
53
52
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
53
|
+
name: textpow
|
55
54
|
prerelease: false
|
56
55
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - "="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 53
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 10
|
64
|
+
- 1
|
65
|
+
version: 0.10.1
|
66
|
+
type: :runtime
|
67
|
+
version_requirements: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: plist
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - "="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 3
|
79
|
+
- 1
|
80
|
+
- 0
|
81
|
+
version: 3.1.0
|
82
|
+
type: :runtime
|
83
|
+
version_requirements: *id004
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: ultraviolet
|
86
|
+
prerelease: false
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
89
|
+
requirements:
|
90
|
+
- - "="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 51
|
93
|
+
segments:
|
94
|
+
- 0
|
95
|
+
- 10
|
96
|
+
- 2
|
97
|
+
version: 0.10.2
|
98
|
+
type: :runtime
|
99
|
+
version_requirements: *id005
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: rake
|
102
|
+
prerelease: false
|
103
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
57
104
|
none: false
|
58
105
|
requirements:
|
59
106
|
- - ">="
|
@@ -63,7 +110,7 @@ dependencies:
|
|
63
110
|
- 0
|
64
111
|
version: "0"
|
65
112
|
type: :runtime
|
66
|
-
version_requirements: *
|
113
|
+
version_requirements: *id006
|
67
114
|
description: ""
|
68
115
|
email:
|
69
116
|
- evolvemeans@gmail.com
|
@@ -77,6 +124,7 @@ extra_rdoc_files: []
|
|
77
124
|
|
78
125
|
files:
|
79
126
|
- .gitignore
|
127
|
+
- .project
|
80
128
|
- Gemfile
|
81
129
|
- README
|
82
130
|
- Rakefile
|
@@ -84,6 +132,7 @@ files:
|
|
84
132
|
- bin/geanyfy.rb
|
85
133
|
- bin/generate_themes.rb
|
86
134
|
- lib/rmthemegen.rb
|
135
|
+
- lib/rmthemegen/basis_theme.tmTheme
|
87
136
|
- lib/rmthemegen/color/color.rb
|
88
137
|
- lib/rmthemegen/color/color/cmyk.rb
|
89
138
|
- lib/rmthemegen/color/color/css.rb
|
@@ -97,24 +146,161 @@ files:
|
|
97
146
|
- lib/rmthemegen/color/color/rgb.rb
|
98
147
|
- lib/rmthemegen/color/color/rgb/metallic.rb
|
99
148
|
- lib/rmthemegen/color/color/yiq.rb
|
149
|
+
- lib/rmthemegen/geany.filetypes.all
|
100
150
|
- lib/rmthemegen/geany_fix.rb
|
101
|
-
- lib/rmthemegen/
|
151
|
+
- lib/rmthemegen/plist.html
|
152
|
+
- lib/rmthemegen/plist_to_tokenlist.rb
|
102
153
|
- lib/rmthemegen/rgb_contrast_methods.rb
|
103
154
|
- lib/rmthemegen/rgb_contrast_test.rb
|
155
|
+
- lib/rmthemegen/rmtg_rubymine.rb
|
156
|
+
- lib/rmthemegen/rmtg_textmate.rb
|
104
157
|
- lib/rmthemegen/rmthemegen_187.rb
|
105
|
-
- lib/rmthemegen/
|
158
|
+
- lib/rmthemegen/rmthemegen_parent.rb
|
106
159
|
- lib/rmthemegen/rmthemegen_to_css.rb
|
160
|
+
- lib/rmthemegen/syntaxes/Apache.plist
|
161
|
+
- lib/rmthemegen/syntaxes/Bibtex.plist
|
162
|
+
- lib/rmthemegen/syntaxes/Blog___HTML__.plist
|
163
|
+
- lib/rmthemegen/syntaxes/Blog___Markdown__.plist
|
164
|
+
- lib/rmthemegen/syntaxes/Blog___Text__.plist
|
165
|
+
- lib/rmthemegen/syntaxes/Blog___Textile__.plist
|
166
|
+
- lib/rmthemegen/syntaxes/C.plist
|
167
|
+
- lib/rmthemegen/syntaxes/CSS.plist
|
168
|
+
- lib/rmthemegen/syntaxes/C____.plist
|
169
|
+
- lib/rmthemegen/syntaxes/ClojureRepl.plist
|
170
|
+
- lib/rmthemegen/syntaxes/Diff.plist
|
171
|
+
- lib/rmthemegen/syntaxes/GroovyRepl.plist
|
172
|
+
- lib/rmthemegen/syntaxes/HTML.plist
|
173
|
+
- lib/rmthemegen/syntaxes/HTML___Rails__.plist
|
174
|
+
- lib/rmthemegen/syntaxes/Haskell.plist
|
175
|
+
- lib/rmthemegen/syntaxes/Io.plist
|
176
|
+
- lib/rmthemegen/syntaxes/Java.plist
|
177
|
+
- lib/rmthemegen/syntaxes/JavaProperties.plist
|
178
|
+
- lib/rmthemegen/syntaxes/JavaScript.plist
|
179
|
+
- lib/rmthemegen/syntaxes/LaTeX.plist
|
180
|
+
- lib/rmthemegen/syntaxes/LaTeX_Beamer.plist
|
181
|
+
- lib/rmthemegen/syntaxes/LaTeX_Log.plist
|
182
|
+
- lib/rmthemegen/syntaxes/Lisp.plist
|
183
|
+
- lib/rmthemegen/syntaxes/Literate_Haskell.plist
|
184
|
+
- lib/rmthemegen/syntaxes/Makefile.plist
|
185
|
+
- lib/rmthemegen/syntaxes/Markdown.plist
|
186
|
+
- lib/rmthemegen/syntaxes/Mirah.plist
|
187
|
+
- lib/rmthemegen/syntaxes/PHP.plist
|
188
|
+
- lib/rmthemegen/syntaxes/PHP.xml
|
189
|
+
- lib/rmthemegen/syntaxes/Perl.plist
|
190
|
+
- lib/rmthemegen/syntaxes/Plain_text.plist
|
191
|
+
- lib/rmthemegen/syntaxes/Processing.plist
|
192
|
+
- lib/rmthemegen/syntaxes/Rez.plist
|
193
|
+
- lib/rmthemegen/syntaxes/Ruby.plist
|
194
|
+
- lib/rmthemegen/syntaxes/RubyRepl.plist
|
195
|
+
- lib/rmthemegen/syntaxes/Ruby_on_Rails.plist
|
196
|
+
- lib/rmthemegen/syntaxes/SQL.plist
|
197
|
+
- lib/rmthemegen/syntaxes/SQL___Rails__.plist
|
198
|
+
- lib/rmthemegen/syntaxes/Shell__Unix__Generic.plist
|
199
|
+
- lib/rmthemegen/syntaxes/TeX.plist
|
200
|
+
- lib/rmthemegen/syntaxes/TeX_Math.plist
|
201
|
+
- lib/rmthemegen/syntaxes/Textile.plist
|
202
|
+
- lib/rmthemegen/syntaxes/Vala.plist
|
203
|
+
- lib/rmthemegen/syntaxes/XML.plist
|
204
|
+
- lib/rmthemegen/syntaxes/XSL.plist
|
205
|
+
- lib/rmthemegen/syntaxes/YAML.plist
|
206
|
+
- lib/rmthemegen/textmate_themes/Active4D.tmTheme
|
207
|
+
- lib/rmthemegen/textmate_themes/All Hallow's Eve Custom.tmTheme
|
208
|
+
- lib/rmthemegen/textmate_themes/All Hallow's Eve.tmTheme
|
209
|
+
- lib/rmthemegen/textmate_themes/Amy.tmTheme
|
210
|
+
- lib/rmthemegen/textmate_themes/BBEdit.tmTheme
|
211
|
+
- lib/rmthemegen/textmate_themes/Black Pearl II.tmTheme
|
212
|
+
- lib/rmthemegen/textmate_themes/Black Pearl.tmTheme
|
213
|
+
- lib/rmthemegen/textmate_themes/Blackboard Black.tmTheme
|
214
|
+
- lib/rmthemegen/textmate_themes/Blackboard.tmTheme
|
215
|
+
- lib/rmthemegen/textmate_themes/Bongzilla.tmTheme
|
216
|
+
- lib/rmthemegen/textmate_themes/Brilliance Black.tmTheme
|
217
|
+
- lib/rmthemegen/textmate_themes/Brilliance Dull.tmTheme
|
218
|
+
- lib/rmthemegen/textmate_themes/CSSEdit.tmTheme
|
219
|
+
- lib/rmthemegen/textmate_themes/Clouds Midnight.tmTheme
|
220
|
+
- lib/rmthemegen/textmate_themes/Clouds.tmTheme
|
221
|
+
- lib/rmthemegen/textmate_themes/Cobalt.tmTheme
|
222
|
+
- lib/rmthemegen/textmate_themes/Coda.tmTheme
|
223
|
+
- lib/rmthemegen/textmate_themes/Cool Glow.tmTheme
|
224
|
+
- lib/rmthemegen/textmate_themes/Dawn.tmTheme
|
225
|
+
- lib/rmthemegen/textmate_themes/Django (Smoothy).tmTheme
|
226
|
+
- lib/rmthemegen/textmate_themes/Django.tmTheme
|
227
|
+
- lib/rmthemegen/textmate_themes/Eiffel.tmTheme
|
228
|
+
- lib/rmthemegen/textmate_themes/Emacs Strict.tmTheme
|
229
|
+
- lib/rmthemegen/textmate_themes/Espresso Libre.tmTheme
|
230
|
+
- lib/rmthemegen/textmate_themes/Espresso Tutti.tmTheme
|
231
|
+
- lib/rmthemegen/textmate_themes/Espresso.tmTheme
|
232
|
+
- lib/rmthemegen/textmate_themes/Fade to Grey.tmTheme
|
233
|
+
- lib/rmthemegen/textmate_themes/Fluidvision.tmTheme
|
234
|
+
- lib/rmthemegen/textmate_themes/ForLaTeX.tmTheme
|
235
|
+
- lib/rmthemegen/textmate_themes/Freckle.tmTheme
|
236
|
+
- lib/rmthemegen/textmate_themes/Friendship Bracelet.tmTheme
|
237
|
+
- lib/rmthemegen/textmate_themes/GitHub.tmTheme
|
238
|
+
- lib/rmthemegen/textmate_themes/GlitterBomb.tmTheme
|
239
|
+
- lib/rmthemegen/textmate_themes/Happy happy joy joy 2.tmTheme
|
240
|
+
- lib/rmthemegen/textmate_themes/IDLE.tmTheme
|
241
|
+
- lib/rmthemegen/textmate_themes/IR_Black.tmTheme
|
242
|
+
- lib/rmthemegen/textmate_themes/IR_White.tmTheme
|
243
|
+
- lib/rmthemegen/textmate_themes/LAZY.tmTheme
|
244
|
+
- lib/rmthemegen/textmate_themes/Lowlight.tmTheme
|
245
|
+
- lib/rmthemegen/textmate_themes/Mac Classic.tmTheme
|
246
|
+
- lib/rmthemegen/textmate_themes/Made of Code.tmTheme
|
247
|
+
- lib/rmthemegen/textmate_themes/MagicWB (Amiga).tmTheme
|
248
|
+
- lib/rmthemegen/textmate_themes/Merbivore Soft.tmTheme
|
249
|
+
- lib/rmthemegen/textmate_themes/Merbivore.tmTheme
|
250
|
+
- lib/rmthemegen/textmate_themes/Monokai.tmTheme
|
251
|
+
- lib/rmthemegen/textmate_themes/MultiMarkdown.tmTheme
|
252
|
+
- lib/rmthemegen/textmate_themes/Pastels on Dark.tmTheme
|
253
|
+
- lib/rmthemegen/textmate_themes/Pastie.tmTheme
|
254
|
+
- lib/rmthemegen/textmate_themes/Putty.tmTheme
|
255
|
+
- lib/rmthemegen/textmate_themes/RDark.tmTheme
|
256
|
+
- lib/rmthemegen/textmate_themes/Rails Envy.tmTheme
|
257
|
+
- lib/rmthemegen/textmate_themes/Railscasts.tmTheme
|
258
|
+
- lib/rmthemegen/textmate_themes/Ryan Light.tmTheme
|
259
|
+
- lib/rmthemegen/textmate_themes/Slush & Poppies.tmTheme
|
260
|
+
- lib/rmthemegen/textmate_themes/Smoothy.tmTheme
|
261
|
+
- lib/rmthemegen/textmate_themes/SpaceCadet.tmTheme
|
262
|
+
- lib/rmthemegen/textmate_themes/Spectacular.tmTheme
|
263
|
+
- lib/rmthemegen/textmate_themes/Starlight.tmTheme
|
264
|
+
- lib/rmthemegen/textmate_themes/Summer Camp Mod.tmTheme
|
265
|
+
- lib/rmthemegen/textmate_themes/Summer Camp.tmTheme
|
266
|
+
- lib/rmthemegen/textmate_themes/Sunburst.tmTheme
|
267
|
+
- lib/rmthemegen/textmate_themes/Swyphs II.tmTheme
|
268
|
+
- lib/rmthemegen/textmate_themes/Tango.tmTheme
|
269
|
+
- lib/rmthemegen/textmate_themes/Text Ex Machina.tmTheme
|
270
|
+
- lib/rmthemegen/textmate_themes/Tubster.tmTheme
|
271
|
+
- lib/rmthemegen/textmate_themes/Twilight.tmTheme
|
272
|
+
- lib/rmthemegen/textmate_themes/Vibrant Fin.tmTheme
|
273
|
+
- lib/rmthemegen/textmate_themes/Vibrant Ink.tmTheme
|
274
|
+
- lib/rmthemegen/textmate_themes/Vibrant Tango.tmTheme
|
275
|
+
- lib/rmthemegen/textmate_themes/WhysPoignant.tmTheme
|
276
|
+
- lib/rmthemegen/textmate_themes/Zenburnesque.tmTheme
|
277
|
+
- lib/rmthemegen/textmate_themes/[ Argonaut ].tmTheme
|
278
|
+
- lib/rmthemegen/textmate_themes/choco.tmTheme
|
279
|
+
- lib/rmthemegen/textmate_themes/fake.tmTheme
|
280
|
+
- lib/rmthemegen/textmate_themes/iLife 05.tmTheme
|
281
|
+
- lib/rmthemegen/textmate_themes/iPlastic.tmTheme
|
282
|
+
- lib/rmthemegen/textmate_themes/idleFingers.tmTheme
|
283
|
+
- lib/rmthemegen/textmate_themes/krTheme.tmTheme
|
284
|
+
- lib/rmthemegen/textmate_themes/monoindustrial.tmTheme
|
107
285
|
- lib/rmthemegen/token_list.rb
|
286
|
+
- lib/rmthemegen/uv_addons.rb
|
108
287
|
- lib/rmthemegen/version.rb
|
109
288
|
- lib/rmthemegen/xmlsimple.rb
|
110
289
|
- license.txt
|
111
290
|
- rmthemegen.gemspec
|
291
|
+
- spec/rmthemegen/plist_to_tokenlist_spec.rb
|
112
292
|
- test/.~lock.mean65#
|
293
|
+
- test/choco.css
|
294
|
+
- test/choco.render
|
295
|
+
- test/get_tm_scopes.rb
|
113
296
|
- test/get_tm_tokens.rb
|
114
297
|
- test/index.html
|
115
|
-
- test/
|
116
|
-
- test/
|
298
|
+
- test/newtheme.sh
|
299
|
+
- test/output
|
300
|
+
- test/rexml.element.methods
|
117
301
|
- test/sample_ruby_source
|
302
|
+
- test/scopes_harvested
|
303
|
+
- test/scopes_harvested.rb
|
118
304
|
- test/tc_themename.rb
|
119
305
|
- test/test_generate_themes.rb
|
120
306
|
- test/textmate_themes/Active4D.tmTheme
|
@@ -197,7 +383,6 @@ files:
|
|
197
383
|
- test/textmate_themes/krTheme.tmTheme
|
198
384
|
- test/textmate_themes/monoindustrial.tmTheme
|
199
385
|
- test/tm_token_to_scope_list
|
200
|
-
has_rdoc: true
|
201
386
|
homepage: http://aptifuge.com
|
202
387
|
licenses: []
|
203
388
|
|
@@ -231,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
416
|
requirements: []
|
232
417
|
|
233
418
|
rubyforge_project: rmthemegen
|
234
|
-
rubygems_version: 1.
|
419
|
+
rubygems_version: 1.8.10
|
235
420
|
signing_key:
|
236
421
|
specification_version: 3
|
237
422
|
summary: Generates RubyMine >= 3.0 editor color themes
|
data/lib/rmthemegen/index.html
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
<style type="text/css"> #parallel_deer { background-color: #8d8d8d; } #parallel_deer .RUBY_ATTR_ACCESSOR_CALL {color: #03ba39;} #parallel_deer .RUBY_ATTR_READER_CALL {color: #6c7cf6;} #parallel_deer .RUBY_ATTR_WRITER_CALL {color: #c57fe6;} #parallel_deer .RUBY_BACK_REF {color: #3e96bf;} #parallel_deer .RUBY_BAD_CHARACTER {color: #76ee3a;} #parallel_deer .RUBY_BRACKETS {color: #976135;} #parallel_deer .RUBY_COMMA {color: #53916d;} #parallel_deer .RUBY_COMMENT {color: #6411a2;} #parallel_deer .RUBY_CONSTANT {color: #da7576;} #parallel_deer .RUBY_CONSTANT_DEF_ID {color: #ce7e67;} #parallel_deer .RUBY_CVAR {color: #c604c2;} #parallel_deer .RUBY_ESCAPE_SEQUENCE {color: #0496ec;} #parallel_deer .RUBY_EXPR_IN_STRING {color: #2cdd0e;} #parallel_deer .RUBY_GVAR {color: #606793;} #parallel_deer .RUBY_HASH_ASSOC {color: #e998e5;} #parallel_deer .RUBY_HEREDOC_CONTENT {color: #98de89;} #parallel_deer .RUBY_HEREDOC_ID {color: #afff5f;} #parallel_deer .RUBY_IDENTIFIER {color: #84e154;} #parallel_deer .RUBY_IMPORT_CALL {color: #eed612;} #parallel_deer .RUBY_INVALID_ESCAPE_SEQUENCE {color: #9ba096;} #parallel_deer .RUBY_IVAR {color: #50ef78;} #parallel_deer .RUBY_KEYWORD {color: #e58b1c;} #parallel_deer .RUBY_LINE_CONTINUATION {color: #e4a7b1;} #parallel_deer .RUBY_LOCAL_VAR_ID {color: #74b866;} #parallel_deer .RUBY_METHOD_NAME {color: #e32fa9;} #parallel_deer .RUBY_NTH_REF {color: #a4f790;} #parallel_deer .RUBY_NUMBER {color: #4ddf25;} #parallel_deer .RUBY_OPERATION_SIGN {color: #84533d;} #parallel_deer .RUBY_PARAMDEF_CALL {color: #91b115;} #parallel_deer .RUBY_PARAMETER_ID {color: #2172b2;} #parallel_deer .RUBY_PRIVATE_CALL {color: #3feb91;} #parallel_deer .RUBY_PROTECTED_CALL {color: #af4c49;} #parallel_deer .RUBY_PUBLIC_CALL {color: #8739a3;} #parallel_deer .RUBY_REGEXP {color: #de3f70;} #parallel_deer .RUBY_REQUIRE_ARG_CALL {color: #c85191;} #parallel_deer .RUBY_REQUIRE_CALL {color: #a15d1b;} #parallel_deer .RUBY_SEMICOLON {color: #5ade3f;} #parallel_deer .RUBY_SPECIFIC_CALL {color: #17f67a;} #parallel_deer .RUBY_STRING {color: #c73c3f;} #parallel_deer .RUBY_SYMBOL {color: #6755e1;} #parallel_deer .RUBY_WORDS {color: #c27f35;} </style>
|
2
|
-
<div id='parallel_deer'><span class='RUBY_ATTR_ACCESSOR_CALL'>RUBY_ATTR_ACCESSOR_CALL</span><span class='RUBY_ATTR_READER_CALL'>RUBY_ATTR_READER_CALL</span><span class='RUBY_ATTR_WRITER_CALL'>RUBY_ATTR_WRITER_CALL</span><span class='RUBY_BACK_REF'>RUBY_BACK_REF</span><span class='RUBY_BAD_CHARACTER'>RUBY_BAD_CHARACTER</span><span class='RUBY_BRACKETS'>RUBY_BRACKETS</span><span class='RUBY_COMMA'>RUBY_COMMA</span><span class='RUBY_COMMENT'>RUBY_COMMENT</span><span class='RUBY_CONSTANT'>RUBY_CONSTANT</span><span class='RUBY_CONSTANT_DEF_ID'>RUBY_CONSTANT_DEF_ID</span><span class='RUBY_CVAR'>RUBY_CVAR</span><span class='RUBY_ESCAPE_SEQUENCE'>RUBY_ESCAPE_SEQUENCE</span><span class='RUBY_EXPR_IN_STRING'>RUBY_EXPR_IN_STRING</span><span class='RUBY_GVAR'>RUBY_GVAR</span><span class='RUBY_HASH_ASSOC'>RUBY_HASH_ASSOC</span><span class='RUBY_HEREDOC_CONTENT'>RUBY_HEREDOC_CONTENT</span><span class='RUBY_HEREDOC_ID'>RUBY_HEREDOC_ID</span><span class='RUBY_IDENTIFIER'>RUBY_IDENTIFIER</span><span class='RUBY_IMPORT_CALL'>RUBY_IMPORT_CALL</span><span class='RUBY_INVALID_ESCAPE_SEQUENCE'>RUBY_INVALID_ESCAPE_SEQUENCE</span><span class='RUBY_IVAR'>RUBY_IVAR</span><span class='RUBY_KEYWORD'>RUBY_KEYWORD</span><span class='RUBY_LINE_CONTINUATION'>RUBY_LINE_CONTINUATION</span><span class='RUBY_LOCAL_VAR_ID'>RUBY_LOCAL_VAR_ID</span><span class='RUBY_METHOD_NAME'>RUBY_METHOD_NAME</span><span class='RUBY_NTH_REF'>RUBY_NTH_REF</span><span class='RUBY_NUMBER'>RUBY_NUMBER</span><span class='RUBY_OPERATION_SIGN'>RUBY_OPERATION_SIGN</span><span class='RUBY_PARAMDEF_CALL'>RUBY_PARAMDEF_CALL</span><span class='RUBY_PARAMETER_ID'>RUBY_PARAMETER_ID</span><span class='RUBY_PRIVATE_CALL'>RUBY_PRIVATE_CALL</span><span class='RUBY_PROTECTED_CALL'>RUBY_PROTECTED_CALL</span><span class='RUBY_PUBLIC_CALL'>RUBY_PUBLIC_CALL</span><span class='RUBY_REGEXP'>RUBY_REGEXP</span><span class='RUBY_REQUIRE_ARG_CALL'>RUBY_REQUIRE_ARG_CALL</span><span class='RUBY_REQUIRE_CALL'>RUBY_REQUIRE_CALL</span><span class='RUBY_SEMICOLON'>RUBY_SEMICOLON</span><span class='RUBY_SPECIFIC_CALL'>RUBY_SPECIFIC_CALL</span><span class='RUBY_STRING'>RUBY_STRING</span><span class='RUBY_SYMBOL'>RUBY_SYMBOL</span><span class='RUBY_WORDS'>RUBY_WORDS</span>
|
@@ -1,155 +0,0 @@
|
|
1
|
-
#**********************************************************************
|
2
|
-
#* *
|
3
|
-
#* RmThemeGen - a ruby script to create random, usable themes for *
|
4
|
-
#* text editors. Currently supports RubyMine 3.X.X *
|
5
|
-
#* *
|
6
|
-
#* By David Heitzman, 2011 *
|
7
|
-
#* *
|
8
|
-
#**********************************************************************
|
9
|
-
|
10
|
-
#this is a version of the software that should work with ruby 1.8.7
|
11
|
-
#originally it was written and tested for ruby 1.9.2
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
require 'rubygems'
|
16
|
-
require 'color'
|
17
|
-
require 'xmlsimple'
|
18
|
-
require 'rexml/document'
|
19
|
-
require File.dirname(__FILE__)+"/token_list"
|
20
|
-
require File.dirname(__FILE__)+'/rgb_contrast_methods'
|
21
|
-
require File.dirname(__FILE__)+'/rmthemegen_to_css'
|
22
|
-
|
23
|
-
module RMThemeGen
|
24
|
-
|
25
|
-
class ThemeGenerator < RMThemeParent
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
def to_textmate
|
30
|
-
#it will save the theme file ".tmTheme" in the same directory as other themes
|
31
|
-
#it will return the full name and path of that theme file.
|
32
|
-
|
33
|
-
#has a theme been generated? if not, return nil
|
34
|
-
#read_tmfile
|
35
|
-
if !@theme_successfully_created then return nil end
|
36
|
-
|
37
|
-
#bg_color_style: 0 = blackish, 1 = whitish, 2 = any color
|
38
|
-
@theme_successfully_created=false
|
39
|
-
@xml_textmate_out = {
|
40
|
-
:plist => [{:version=>"1.0"}],
|
41
|
-
:dict=> [{:key=>["name"],
|
42
|
-
:string =>[@themename],
|
43
|
-
:array=>[
|
44
|
-
{
|
45
|
-
:dict => [{
|
46
|
-
:key =>["settings"],
|
47
|
-
:dict=> [{"string"=>["#000000","#FFFFFF"],
|
48
|
-
"key"=>["background","foreground"]
|
49
|
-
}]
|
50
|
-
}]}]
|
51
|
-
}]
|
52
|
-
}
|
53
|
-
@savefile = "rmt_"+@themename+".tmTheme"
|
54
|
-
@outf = File.new(@opts[:outputdir]+"/"+@savefile, "w+")
|
55
|
-
#set_tm_doc_options
|
56
|
-
#set_tm_doc_colors
|
57
|
-
#set_tm_element_colors
|
58
|
-
#XmlSimple.xml_out(@xml_textmate_out,{:keeproot=>false,:xmldeclaration=>true,:outputfile=> @outf, :rootname => ""})
|
59
|
-
rexmlout = REXML::Document.new
|
60
|
-
rexmlout << REXML::DocType.new('plist','PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"')
|
61
|
-
rexmlout << REXML::XMLDecl.new("1.0","UTF-8",nil)
|
62
|
-
plist = REXML::Element.new "plist"
|
63
|
-
plist.add_attributes( "version"=>"1.0")
|
64
|
-
dict = REXML::Element.new( "dict", plist) #causes plist to be the parent of dict
|
65
|
-
dict.add_text(REXML::Element.new("key").add_text("name") )
|
66
|
-
dict.add_text(REXML::Element.new("string").add_text( @themename ) )
|
67
|
-
dict.add_text(REXML::Element.new("key").add_text("author") )
|
68
|
-
dict.add_text(REXML::Element.new("string").add_text("David Heitzman") )
|
69
|
-
dict.add_text(REXML::Element.new("key").add_text("settings") )
|
70
|
-
main_array = REXML::Element.new("array",dict)
|
71
|
-
doc_dict = REXML::Element.new("dict",main_array)
|
72
|
-
doc_dict.add_text(REXML::Element.new("key").add_text("settings") )
|
73
|
-
doc_dict.add_element(
|
74
|
-
make_dict(
|
75
|
-
:background=>"#"+@document_globals[:backgroundcolor].upcase,
|
76
|
-
:caret=>"#"+ @document_globals[:CARET_COLOR].upcase ,
|
77
|
-
:foreground=>"#"+@document_globals[:TEXT].upcase,
|
78
|
-
:invisibles=>"#"+@document_globals[:backgroundcolor].upcase,
|
79
|
-
:lineHighlight=>"#"+@document_globals[:CARET_ROW_COLOR].upcase,
|
80
|
-
:selection=>"#"+@document_globals[:SELECTION_BACKGROUND].upcase)
|
81
|
-
)
|
82
|
-
|
83
|
-
#puts @@document_opts_to_textmate.to_s
|
84
|
-
@@document_opts_to_textmate.each do |k,v|
|
85
|
-
main_array.add_element(
|
86
|
-
make_name_scope_settings(k,v)
|
87
|
-
) if @textmate_hash[k]
|
88
|
-
end
|
89
|
-
|
90
|
-
|
91
|
-
uuid_key = REXML::Element.new("key")
|
92
|
-
uuid_key.add_text("uuid")
|
93
|
-
uuid_element = REXML::Element.new("string")
|
94
|
-
uuid_element.add_text( gen_uuid)
|
95
|
-
dict.add_element uuid_key
|
96
|
-
dict.add_element uuid_element
|
97
|
-
|
98
|
-
rexmlout << plist
|
99
|
-
# rexmlout.write(@outf)
|
100
|
-
formatter = REXML::Formatters::Pretty.new
|
101
|
-
formatter.compact=true
|
102
|
-
formatter.write(rexmlout, @outf)
|
103
|
-
@outf.close
|
104
|
-
@theme_successfully_created = true
|
105
|
-
return File.expand_path(@outf.path)
|
106
|
-
end
|
107
|
-
|
108
|
-
|
109
|
-
def make_dict(a_hash)
|
110
|
-
new_dict = REXML::Element.new("dict")
|
111
|
-
a_hash.each do |k,v|
|
112
|
-
te1 = REXML::Element.new("key")
|
113
|
-
te1.add_text(k.to_s)
|
114
|
-
te2 = REXML::Element.new("string")
|
115
|
-
te2.add_text(v.to_s)
|
116
|
-
new_dict.add_element te1
|
117
|
-
new_dict.add_element te2
|
118
|
-
end
|
119
|
-
return new_dict
|
120
|
-
end
|
121
|
-
|
122
|
-
def make_name_scope_settings(ruby_symbol,an_array)
|
123
|
-
fontstyles = ["","bold","italic", "bold italic"]
|
124
|
-
#the array looks like ["name","scope",{}] . the third element in the array is a hash for "settings"
|
125
|
-
new_dict = REXML::Element.new("dict")
|
126
|
-
te1 = REXML::Element.new("key")
|
127
|
-
te1.add_text("name")
|
128
|
-
te2 = REXML::Element.new("string")
|
129
|
-
te2.add_text(an_array[0])
|
130
|
-
te3 = REXML::Element.new("key")
|
131
|
-
te3.add_text("scope")
|
132
|
-
te4 = REXML::Element.new("string")
|
133
|
-
te4.add_text(an_array[1])
|
134
|
-
te5 = REXML::Element.new("key")
|
135
|
-
te5.add_text("settings")
|
136
|
-
new_dict.add_element te1
|
137
|
-
new_dict.add_element te2
|
138
|
-
new_dict.add_element te3
|
139
|
-
new_dict.add_element te4
|
140
|
-
new_dict.add_element te5
|
141
|
-
fontStyle = fontstyles[@textmate_hash[ruby_symbol][:FONT_TYPE].to_i ]
|
142
|
-
di1 = make_dict(:foreground => "#"+@textmate_hash[ruby_symbol][:FOREGROUND].upcase, :fontStyle=>fontStyle)
|
143
|
-
new_dict.add_element di1
|
144
|
-
return new_dict
|
145
|
-
end
|
146
|
-
|
147
|
-
def gen_uuid
|
148
|
-
nn = sprintf("%X",rand(99999999999999999999999999999999999999999999999999).abs)
|
149
|
-
nn = nn[0,8]+"-"+nn[12,4]+"-4"+nn[17,3]+"-"+["8","9","A","B"].shuffle[0]+nn[21,3]+"-"+nn[24,12]
|
150
|
-
end
|
151
|
-
|
152
|
-
end #class
|
153
|
-
|
154
|
-
|
155
|
-
end #module
|