summary refs log tree commit diff stats
path: root/data/generate.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-03 20:05:48 +0100
committerhut <hut@lavabit.com>2009-12-03 20:05:48 +0100
commit4cb54d3819d8a58d0bd07b8da0c4a978807c44ec (patch)
tree89b6dcee7f4c72deb0c0b4746740dbb983106e58 /data/generate.rb
parente6dfc442a984bc50a70be5017f4ab9a0e6efadef (diff)
downloadranger-4cb54d3819d8a58d0bd07b8da0c4a978807c44ec.tar.gz
translated mime type db generator into python
Diffstat (limited to 'data/generate.rb')
-rwxr-xr-xdata/generate.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/data/generate.rb b/data/generate.rb
deleted file mode 100755
index 52a4c8e4..00000000
--- a/data/generate.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/ruby
-## Parses mime.types and creates mime.dat
-
-file = File.read(ARGV.first || "mime.types")
-
-table = {}
-for line in file.lines
-	next if line[0] == ?# or
-		line.size <= 3 or
-		!line.include?( ?\t )
-
-	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 )
-end
-