diff --git a/extractor/extract.rb b/extractor/extract.rb index a0f9ce8a7..633772a36 100644 --- a/extractor/extract.rb +++ b/extractor/extract.rb @@ -1,18 +1,44 @@ icons = {} +glyphs = {} sass_file = File.open('../sass/font-awesome.sass') -lines = sass_file.readlines +sass_lines = sass_file.readlines +sass_file.close + +svg_file = File.open('../font/fontawesome-webfont.svg') +svg_lines = svg_file.readlines +svg_file.close index = 0 -while(index < lines.length) - line = lines[index] +while index < sass_lines.length + line = sass_lines[index] if line.start_with? '.icon' colon_index = line.index ':' icon_name = line[1 .. colon_index - 1] index += 1 - line = lines[index] + line = sass_lines[index] icon_code = line[13 .. 16] - puts "#{icon_name}: #{icon_code}" + icons[icon_name] = icon_code + #puts "#{icon_name}: #{icon_code}" end index += 1 +end +puts icons.length + +index = 0 +while index < svg_lines.length + line = svg_lines[index] + d_index = line.index 'd="' + if line.start_with? '