%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
#!/usr/bin/perl -w # mailcap to elinks.conf converter (aka quick hack) # version 1.00 by <grin@tolna.net> # Released under GPLv2 or later # # Usage: mailcap-convert.pl /etc/mailcap >> ~/.elinks/elinks.conf # print "association \"-=BEGIN DEBIAN CONVERT=-\" \"\" \"\" 23 1\n"; while( <> ) { chomp; next if /^\s*(#|$)/; @fields = split /;\s*/; # change %s to % in the command $fields[1] =~ s/%s/%/g; my @out = ( "External association", $fields[0], $fields[1] ); for( my $i=2; $i<=$#fields; $i++ ) { if( $fields[$i] =~ m/description="?([^"]+)"?/ ) { # description $out[0] = $1; } elsif( $fields[$i] =~ m/nametemplate=(.+)/ ) { # extension for the mime type my $ext = $1; $ext =~ s/%s\.(.+)$/$1/; &new_ext($ext,$fields[0]); } } &new_assoc( \@out ); } print "association \"-=END DEBIAN CONVERT=-\" \"\" \"\" 23 1\n"; sub new_assoc { my $aref = shift; print "association "; for my $i (0..2) { print "\"$aref->[$i]\" "; } print "23 1\n"; } sub new_ext { print "extension"; for my $i (0..1) { print " \"$_[$i]\""; } print "\n"; }