author Robert O'Callahan <>
Sat, 10 Oct 2009 00:48:30 +1300
changeset 34505 af45ce6dc57520066bbcd2c92b11d4dacb4a3821
parent 11101 8e89edc6d4c2f86916ad8fbd17d0e58f366c8685
child 56642 882525a981190253d2f010b3266138fddab294fb
permissions -rwxr-xr-x
Bug 521176. Don't unnecessarily start an HTTP transaction when cloning a media resource. r=doublec

#!/usr/bin/perl -w
# This is a script to take a long list of Initial Developers on stdin and
# output a de-duped, munged list suitable for putting into about:licence or
# other similar place in order to comply with the MPL section 3.3

# Equivalence mappings; having these is easier than updating hundreds of files
# to make them all use the same variant of each name.
# Procedure:
# relic -I -f * > names.txt
# make-id-list < names.txt > final.txt

my %equivalents = (
  "ActiveState Tool Corporation" => "ActiveState Tool Corp",
  "Activestate Tool Corp" => "ActiveState Tool Corp",
  "ActiveState Tool Corp." => "ActiveState Tool Corp",

  "Crocodile Clips Ltd." => "Crocodile Clips Ltd",

  "Hewlett-Packard Company. Portions created by Hewlett-Packard Company are Copyright" => "Hewlett-Packard Company",
  "IBM" => "IBM Corporation",
  "IBM Corp" => "IBM Corporation",
  "International Business Machines Corporation" => "IBM Corporation",

  "None" => "Mozilla Foundation",
  "a contributor" => "Mozilla Foundation",
  "person recorded in the version control logs" => "Mozilla Foundation",
  "Mozilla" => "Mozilla Foundation",
  "" => "Mozilla Corporation",
  "" => "Mozilla Foundation",
  "Mozilla Organization" => "Mozilla Foundation",
  "" => "Mozilla Foundation",
  " SeaMonkey project" => "Mozilla Foundation",
  "SeaMonkey project" => "Mozilla Foundation",
  "SeaMonkey project at" => "Mozilla Foundation",
  "Mozilla Calendar Squad" => "Mozilla Foundation",
  "Mozilla Corp" => "Mozilla Corporation",

  "Netscape" => "Netscape Communications Corporation",
  "Netscape Corp" => "Netscape Communications Corporation",
  "Netscape Communications" => "Netscape Communications Corporation",
  "Netscape Communications, Inc" => "Netscape Communications Corporation",
  "Netscape Communications Corp" => "Netscape Communications Corporation",
  "Netscape Communications Corp." => "Netscape Communications Corporation",
  "Netscape Commmunications Corp" => "Netscape Communications Corporation",
  "Netscape Communications Corp, Inc" => "Netscape Communications Corporation",
  "Netscape Communication Corporation" => "Netscape Communications Corporation",
  "Netscape Communications Corporation." => "Netscape Communications Corporation",  

  "Novell" => "Novell Inc",
  "Novell, Inc" => "Novell Inc",
  "Novell Corporation" => "Novell Inc",
  "Red Hat Software" => "Red Hat Inc",
  "Red Hat" => "Red Hat Inc",
  "Red Hat, Inc" => "Red Hat Inc",

  "RSA Security INC" => "RSA Security Inc",
  "RSA Security" => "RSA Security Inc",
  "RSA Security, Inc" => "RSA Security Inc",

  "Sun Microsystem" => "Sun Microsystems Inc",
  "Sun Microsystems" => "Sun Microsystems Inc",
  "Sun Microsystems, Inc." => "Sun Microsystems Inc",
  "Sun Microsystems, Inc" => "Sun Microsystems Inc",

  "bmlk\" => "Bernd Mielke",
  "davel\" => "Dave Liebreich",
  "Digital Creations 2" => "Digital Creations 2 Inc",
  "Douglas F. Turner II" => "Doug Turner",
  "Kenneth Herron" => "Ken Herron",
  "sqlite3", "Sqlite Project",
  "University Of Queensland" => "University of Queensland",
  "OEOne Corporation" => "OEone Corporation",
  "Paul Kocher of Cryptography Research" => "Paul Kocher",
  "QUALCOMM incorporated" => "Qualcomm Inc",
  "QUALCOMM Incorporated" => "Qualcomm Inc",
  "Simdesk Technologies" => "Simdesk Technologies Inc",
  "Google" => "Google Inc",
  "Telephone Corporation)" => "NTT",
  "Disruptive Innovations" => "Disruptive Innovations SARL",
  "Florian QUEZE" => "Florian Queze",
  "Nelson B Bolyard" => "Nelson B. Bolyard",
  "Richard L Walsh" => "Richard L. Walsh",
  "timeless" => "Josh Soref",
  "Olivier Parniere BT Global Services / Etat francais Ministere de la Defense" => "Olivier Parniere",
  "Frank Schoenheit" => "Frank Sch&ouml;nheit",
  "Frank Schnheit" => "Frank Sch&ouml;nheit",
  "Håkan Waara" => "H&aring;kan Waara",
  "Hkan Waara" => "H&aring;kan Waara",
  "Karsten Düsterloh" => "Karsten D&uuml;sterloh",
  "Simon Bünzli" => "Simon B&uuml;nzli",
  "Vincent Béron" => "Vincent B&eacute;ron",
  "Tomas Mller" => "Tomas M&uuml;ller",
  "Dão Gottwald" => "D&atilde;o Gottwald",
  "Lszl Nmeth" => "L&aacute;szl&oacute; N&eacutre;meth",
  "Bjrn Jacke" => "Bj&ouml;rn Jacke",
  "example Inc" => "Mozilla Foundation",
  "SeaMonkey team" => "Mozilla Foundation",
  "person recorded in the version control logs" => "Mozilla Foundation",
  "None" => "Mozilla Foundation"

# 'indevs' == "Initial Developers"
my %indevs;

while (<>)
  my @candidates = split(" and ", $_);
  foreach my $indev (@candidates)
    # Chop off email addresses and suchlike
    $indev =~ s/[<,\(].*$//;
    $indev =~ s/^The\s+//i;

    # Trim whitespace
    $indev =~ s/^\s*//;
    $indev =~ s/\s*$//;

    $indev = $equivalents{$indev} || $indev;
    $indevs{$indev} = 1;

# Print out the list in a form suitable for pasting into about:licence.
print join (",\n", sort {lc $a cmp lc $b} keys %indevs);
print ".\n";