diff options
author | hut <hut@lavabit.com> | 2009-07-18 03:37:09 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-07-18 03:37:09 +0200 |
commit | c5d445c93f54f19b17ccac44c619bb90d34d26b3 (patch) | |
tree | 3cc80ea12594753936051ef634a5df2c9bc6e2c7 | |
parent | 6754416298dc908ace08e1e7016fb33f9b869048 (diff) | |
download | ranger-c5d445c93f54f19b17ccac44c619bb90d34d26b3.tar.gz |
new screenshot
-rwxr-xr-x | data/generate.rb | 21 | ||||
-rw-r--r-- | screenshot.png | bin | 43566 -> 185832 bytes |
2 files changed, 10 insertions, 11 deletions
diff --git a/data/generate.rb b/data/generate.rb index bc85b93b..52a4c8e4 100755 --- a/data/generate.rb +++ b/data/generate.rb @@ -1,22 +1,21 @@ #!/usr/bin/ruby ## Parses mime.types and creates mime.dat -file = File.read(ARGV[0] || "mime.types") +file = File.read(ARGV.first || "mime.types") table = {} -for l in file.lines - next if l[0] == ?# - next unless l.size > 3 - next unless l.include? ?\t +for line in file.lines + next if line[0] == ?# or + line.size <= 3 or + !line.include?( ?\t ) - left, *exts = l.split(/\s+/) -# print exts.inspect - for ext in exts - table[ext] = left + name, *extensions = line.split(/\s+/) + for ext in extensions + table[ext] = name end end -File.open('mime.dat', 'w') do |f| - f.write Marshal.dump(table) +File.open( 'mime.dat', 'w' ) do |f| + f.write Marshal.dump( table ) end diff --git a/screenshot.png b/screenshot.png index 9a38dd4d..a3282d76 100644 --- a/screenshot.png +++ b/screenshot.png Binary files differ |