DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
#!/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:
# Need to be in the top-level dir otherwise relic exclusions don't work.
# Edit relic to set quiet to 1 on line 1471 or thereabouts
# relic -I -f * > names.txt
# Tidy up names.txt
# and make one unified file if you ran relic over multiple trees.
# 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",

  "Mozilla.com" => "Mozilla Corporation",
  "Mozilla Corp" => "Mozilla Corporation",
  
  "None" => "Mozilla Foundation",
  "a mozilla.org contributor" => "Mozilla Foundation",
  "person recorded in the version control logs" => "Mozilla Foundation",
  "Mozilla" => "Mozilla Foundation",
  "Mozilla.org" => "Mozilla Foundation",
  "Mozilla Organization" => "Mozilla Foundation",
  "mozilla.org" => "Mozilla Foundation",
  "example Inc" => "Mozilla Foundation",
  "SeaMonkey team" => "Mozilla Foundation",  
  "mozilla.org SeaMonkey project" => "Mozilla Foundation",
  "SeaMonkey project" => "Mozilla Foundation",
  "SeaMonkey project at mozilla.org" => "Mozilla Foundation",
  "Mozilla Calendar Squad" => "Mozilla Foundation",
  "mozilla.org code" => "Mozilla Foundation",
  
  "Mozilla Messaging Corporation" => "Mozilla Messaging",
  
  "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\@gmx.de" => "Bernd Mielke",
  "davel\@mozilla.com" => "Dave Liebreich",
  "dschaffe\@adobe.com" => "Dan Schaffer",
  "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",
  "Craig Toppper" => "Craig Topper",
  "Mook" => "Mark 'Mook' Yen",
  
  "Frank Schoenheit" => "Frank Sch&ouml;nheit",
  "Frank Schönheit" => "Frank Sch&ouml;nheit",
  "HĂĽkan Waara" => "H&aring;kan Waara",
  "Hĺkan 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 Mšller" => "Tomas M&uuml;ller",
  "DĂŁo Gottwald" => "D&atilde;o Gottwald",
  "László Németh" => "L&aacute;szl&oacute; N&eacute;meth",
  "Björn Jacke" => "Bj&ouml;rn Jacke",
  "Žiga Sancin" => "&#x017d;iga Sancin",
);

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

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

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

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

# 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";