From 95f9fec7a9fef8a937823752681208cfc52cb4cb Mon Sep 17 00:00:00 2001 From: Jake Pearson Date: Fri, 4 May 2012 11:00:57 -0600 Subject: [PATCH] Printing all icon name/code mappings --- extractor/empty.svg | 62 ++++++++++++++++++++++++++++++++++++++++++++ extractor/extract.rb | 18 +++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 extractor/empty.svg create mode 100644 extractor/extract.rb diff --git a/extractor/empty.svg b/extractor/empty.svg new file mode 100644 index 000000000..d5aa47d65 --- /dev/null +++ b/extractor/empty.svg @@ -0,0 +1,62 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/extractor/extract.rb b/extractor/extract.rb new file mode 100644 index 000000000..a0f9ce8a7 --- /dev/null +++ b/extractor/extract.rb @@ -0,0 +1,18 @@ +icons = {} + +sass_file = File.open('../sass/font-awesome.sass') +lines = sass_file.readlines + +index = 0 +while(index < lines.length) + line = lines[index] + if line.start_with? '.icon' + colon_index = line.index ':' + icon_name = line[1 .. colon_index - 1] + index += 1 + line = lines[index] + icon_code = line[13 .. 16] + puts "#{icon_name}: #{icon_code}" + end + index += 1 +end \ No newline at end of file