[Blends-commit] r2621 - in /blends/trunk/team_analysis_tools: ./ archives.sql archives_01.sql archives_02.sql archives_03.sql author_stats author_stats_9 author_stats_create_graph author_stats_pdf create_bad_names.sql get-archive-pages render-all-graphs upload_history.py

tille at users.alioth.debian.org tille at users.alioth.debian.org
Wed Jan 26 11:00:27 UTC 2011


Author: tille
Date: Wed Jan 26 11:00:24 2011
New Revision: 2621

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=2621
Log:
Inject tools to analyse the commitments of team members (mailing list activity and upload statistics)

Added:
    blends/trunk/team_analysis_tools/
    blends/trunk/team_analysis_tools/archives.sql   (with props)
    blends/trunk/team_analysis_tools/archives_01.sql   (with props)
    blends/trunk/team_analysis_tools/archives_02.sql   (with props)
    blends/trunk/team_analysis_tools/archives_03.sql   (with props)
    blends/trunk/team_analysis_tools/author_stats   (with props)
    blends/trunk/team_analysis_tools/author_stats_9   (with props)
    blends/trunk/team_analysis_tools/author_stats_create_graph   (with props)
    blends/trunk/team_analysis_tools/author_stats_pdf   (with props)
    blends/trunk/team_analysis_tools/create_bad_names.sql
    blends/trunk/team_analysis_tools/get-archive-pages   (with props)
    blends/trunk/team_analysis_tools/render-all-graphs   (with props)
    blends/trunk/team_analysis_tools/upload_history.py   (with props)

Added: blends/trunk/team_analysis_tools/archives.sql
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/archives.sql?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/archives.sql (added)
+++ blends/trunk/team_analysis_tools/archives.sql Wed Jan 26 11:00:24 2011
@@ -1,0 +1,253 @@
+#!/bin/sh
+
+createdb --encoding SQL_ASCII --template template0 listarchives
+
+psql listarchives <<EOT
+
+BEGIN;
+
+CREATE TABLE listarchive (
+   project   text,
+   yearmonth date,
+   author    text,
+   subject   text,
+   url       text,
+   ts        date
+);
+
+CREATE LANGUAGE plpgsql ;
+
+/*
+ * Build a query string for several purposes
+ *   ARG1: Query to obtain wanted columns
+ *   ARG2: Feature that is queried
+ * See below how this helper is used.
+ */
+CREATE OR REPLACE FUNCTION BuildQueryCDDsHelper(text, text)
+    RETURNS text AS '
+    DECLARE
+       IterQuery  ALIAS FOR \$1 ;
+       Feature    ALIAS FOR \$2 ;
+       ret        text ;
+       union      text ;
+       query1     text ;
+       query2     text ;
+       r1         RECORD ;
+       r2         RECORD ;
+       ri         RECORD ;
+       qi         RECORD ;
+    BEGIN
+
+    query1 := IterQuery ;
+    query2 := query1;
+    union  := '''' ;
+    ret    := ''SELECT yearmonth'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+    	ret := ret || '', CAST(SUM("'' || r1.feature || ''") AS int) AS "'' || r1.feature || ''"'' ;
+    END LOOP;
+
+    ret := ret || ''
+  FROM (
+'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+       ret   := ret || union || ''    SELECT yearmonth'' ;
+       union := ''
+    UNION
+'';
+       FOR r2 IN EXECUTE query2 LOOP
+       	   IF r1.feature = r2.feature THEN
+	      ret := ret || '', COUNT(*)'' ;
+	   ELSE
+	      ret := ret || '', 0'' ;
+	   END IF;
+	   ret := ret || '' AS "'' || r2.feature || ''"'';
+       END LOOP ;
+       ret := ret || ''
+       FROM listarchive 
+       WHERE '' || Feature || '' = '''''' || r1.feature || '''''' GROUP BY yearmonth'';
+    END LOOP ;
+
+    ret := ret || ''
+  ) zw
+  GROUP BY yearmonth
+  ORDER BY yearmonth;'' ;
+
+    RETURN ret;
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * This query returns stats about all mailing lists
+ */
+
+CREATE OR REPLACE FUNCTION BuildQueryCDDs()
+    RETURNS text AS '
+    DECLARE
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsHelper(
+               ''SELECT project AS feature, COUNT(*) AS num FROM listarchive GROUP BY project ORDER BY num DESC;'',
+               ''project'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * This query returns stats about the ARG2 most active authors in a specific
+ * Mailing list (ARG1)
+ */
+
+CREATE OR REPLACE FUNCTION BuildQueryAuthors(text, int)
+    RETURNS text AS '
+    DECLARE
+       Project    ALIAS FOR \$1 ;
+       NumAuthors ALIAS FOR \$2 ;
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsHelper(
+               ''SELECT author AS feature, COUNT(*) AS num FROM listarchive
+                 WHERE project = '''''' || Project || '''''' AND author IN (
+      SELECT author FROM (SELECT author, count(*) as anz From listarchive where project = '''''' || Project || ''''''
+           GROUP BY author ORDER BY anz DESC LIMIT '' || NumAuthors || '') AS zw)
+   GROUP BY author ORDER BY num DESC;'',
+               ''project = '''''' || Project || '''''' AND author'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+
+CREATE OR REPLACE FUNCTION CompareCDDs()
+    RETURNS SETOF RECORD AS '
+    DECLARE
+       ret        text ;
+       query      text ;
+       r          RECORD ;
+
+    BEGIN
+
+    SELECT INTO query BuildQueryCDDs() ;
+
+    FOR r IN EXECUTE query LOOP
+        RETURN NEXT r;
+    END LOOP;
+
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * You might call this as, but there is less chance to get column names right.
+ *  SELECT * FROM CompareCDDs() AS
+ *   ( yearmonth date, cdd1 int, cdd2 int, cdd3 int, cdd4 int, cdd5 int, cdd6 int, cdd7 int, cdd8 int );
+ *
+ * That's why we use the shell script wrappers ...
+ */
+
+
+/*******************************************
+ *
+ * Same thing as above but for whole year
+ *
+ *******************************************/
+
+/*
+ * Build a query string for several purposes
+ *   ARG1: Query to obtain wanted columns
+ *   ARG2: Feature that is queried
+ * See below how this helper is used.
+ */
+CREATE OR REPLACE FUNCTION BuildQueryCDDsYearHelper(text, text)
+    RETURNS text AS '
+    DECLARE
+       IterQuery  ALIAS FOR \$1 ;
+       Feature    ALIAS FOR \$2 ;
+       ret        text ;
+       union      text ;
+       query1     text ;
+       query2     text ;
+       r1         RECORD ;
+       r2         RECORD ;
+       ri         RECORD ;
+       qi         RECORD ;
+    BEGIN
+
+    query1 := IterQuery ;
+    query2 := query1;
+    union  := '''' ;
+    ret    := ''SELECT EXTRACT(''''year'''' FROM year) AS year'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+    	ret := ret || '', CAST(SUM("'' || r1.feature || ''") AS int) AS "'' || r1.feature || ''"'' ;
+    END LOOP;
+
+    ret := ret || ''
+  FROM (
+'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+       ret   := ret || union || ''    SELECT date_trunc(''''year'''', yearmonth)::date AS year'' ;
+       union := ''
+    UNION
+'';
+       FOR r2 IN EXECUTE query2 LOOP
+       	   IF r1.feature = r2.feature THEN
+	      ret := ret || '', COUNT(*)'' ;
+	   ELSE
+	      ret := ret || '', 0'' ;
+	   END IF;
+	   ret := ret || '' AS "'' || r2.feature || ''"'';
+       END LOOP ;
+       ret := ret || ''
+       FROM listarchive 
+       WHERE '' || Feature || '' = '''''' || replace(r1.feature, '''''''', '''''''''''') || '''''' GROUP BY year''; -- There are names containing apostrophs ...
+    END LOOP ;
+
+    ret := ret || ''
+  ) zw
+  GROUP BY year
+  ORDER BY year;'' ;
+
+    RETURN ret;
+  END; ' LANGUAGE 'plpgsql';
+
+CREATE OR REPLACE FUNCTION BuildQueryCDDsYear()
+    RETURNS text AS '
+    DECLARE
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsYearHelper(
+               ''SELECT project AS feature, COUNT(*) AS num FROM listarchive GROUP BY project ORDER BY num DESC;'',
+               ''project'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * This query returns stats about the ARG2 most active authors in a specific
+ * Mailing list (ARG1)
+ */
+
+CREATE OR REPLACE FUNCTION BuildQueryAuthorsYear(text, int)
+    RETURNS text AS '
+    DECLARE
+       Project    ALIAS FOR \$1 ;
+       NumAuthors ALIAS FOR \$2 ;
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsYearHelper(
+               ''SELECT author AS feature, COUNT(*) AS num FROM listarchive
+                 WHERE project = '''''' || Project || '''''' AND author IN (
+      SELECT author FROM (SELECT author, count(*) as anz From listarchive where project = '''''' || Project || ''''''
+           GROUP BY author ORDER BY anz DESC LIMIT '' || NumAuthors || '') AS zw)
+   GROUP BY author ORDER BY num DESC;'',
+               ''project = '''''' || Project || '''''' AND author'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+COMMIT;
+EOT
+

Propchange: blends/trunk/team_analysis_tools/archives.sql
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/archives_01.sql
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/archives_01.sql?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/archives_01.sql (added)
+++ blends/trunk/team_analysis_tools/archives_01.sql Wed Jan 26 11:00:24 2011
@@ -1,0 +1,240 @@
+#!/bin/sh
+
+psql listarchives <<EOT
+
+BEGIN;
+
+/*
+ * Build a query string for several purposes
+ *   ARG1: Query to obtain wanted columns
+ *   ARG2: Feature that is queried
+ * See below how this helper is used.
+ */
+CREATE OR REPLACE FUNCTION BuildQueryCDDsHelper(text, text)
+    RETURNS text AS '
+    DECLARE
+       IterQuery  ALIAS FOR \$1 ;
+       Feature    ALIAS FOR \$2 ;
+       ret        text ;
+       union      text ;
+       query1     text ;
+       query2     text ;
+       r1         RECORD ;
+       r2         RECORD ;
+       ri         RECORD ;
+       qi         RECORD ;
+    BEGIN
+
+    query1 := IterQuery ;
+    query2 := query1;
+    union  := '''' ;
+    ret    := ''SELECT yearmonth'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+    	ret := ret || '', CAST(SUM("'' || r1.feature || ''") AS int) AS "'' || r1.feature || ''"'' ;
+    END LOOP;
+
+    ret := ret || ''
+  FROM (
+'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+       ret   := ret || union || ''    SELECT yearmonth'' ;
+       union := ''
+    UNION
+'';
+       FOR r2 IN EXECUTE query2 LOOP
+       	   IF r1.feature = r2.feature THEN
+	      ret := ret || '', COUNT(*)'' ;
+	   ELSE
+	      ret := ret || '', 0'' ;
+	   END IF;
+	   ret := ret || '' AS "'' || r2.feature || ''"'';
+       END LOOP ;
+       ret := ret || ''
+       FROM listarchive 
+       WHERE '' || Feature || '' = '''''' || r1.feature || '''''' GROUP BY yearmonth'';
+    END LOOP ;
+
+    ret := ret || ''
+  ) zw
+  GROUP BY yearmonth
+  ORDER BY yearmonth;'' ;
+
+    RETURN ret;
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * This query returns stats about all mailing lists
+ */
+
+CREATE OR REPLACE FUNCTION BuildQueryCDDs()
+    RETURNS text AS '
+    DECLARE
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsHelper(
+               ''SELECT project AS feature, COUNT(*) AS num FROM listarchive GROUP BY project ORDER BY num DESC;'',
+               ''project'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * This query returns stats about the ARG2 most active authors in a specific
+ * Mailing list (ARG1)
+ */
+
+CREATE OR REPLACE FUNCTION BuildQueryAuthors(text, int)
+    RETURNS text AS '
+    DECLARE
+       Project    ALIAS FOR \$1 ;
+       NumAuthors ALIAS FOR \$2 ;
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsHelper(
+               ''SELECT author AS feature, COUNT(*) AS num FROM listarchive
+                 WHERE project = '''''' || Project || '''''' AND author IN (
+      SELECT author FROM (SELECT author, count(*) as anz From listarchive where project = '''''' || Project || ''''''
+           GROUP BY author ORDER BY anz DESC LIMIT '' || NumAuthors || '') AS zw)
+   GROUP BY author ORDER BY num DESC;'',
+               ''project = '''''' || Project || '''''' AND author'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+
+CREATE OR REPLACE FUNCTION CompareCDDs()
+    RETURNS SETOF RECORD AS '
+    DECLARE
+       ret        text ;
+       query      text ;
+       r          RECORD ;
+
+    BEGIN
+
+    SELECT INTO query BuildQueryCDDs() ;
+
+    FOR r IN EXECUTE query LOOP
+        RETURN NEXT r;
+    END LOOP;
+
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * You might call this as, but there is less chance to get column names right.
+ *  SELECT * FROM CompareCDDs() AS
+ *   ( yearmonth date, cdd1 int, cdd2 int, cdd3 int, cdd4 int, cdd5 int, cdd6 int, cdd7 int, cdd8 int );
+ *
+ * That's why we use the shell script wrappers ...
+ */
+
+
+/*******************************************
+ *
+ * Same thing as above but for whole year
+ *
+ *******************************************/
+
+/*
+ * Build a query string for several purposes
+ *   ARG1: Query to obtain wanted columns
+ *   ARG2: Feature that is queried
+ * See below how this helper is used.
+ */
+CREATE OR REPLACE FUNCTION BuildQueryCDDsYearHelper(text, text)
+    RETURNS text AS '
+    DECLARE
+       IterQuery  ALIAS FOR \$1 ;
+       Feature    ALIAS FOR \$2 ;
+       ret        text ;
+       union      text ;
+       query1     text ;
+       query2     text ;
+       r1         RECORD ;
+       r2         RECORD ;
+       ri         RECORD ;
+       qi         RECORD ;
+    BEGIN
+
+    query1 := IterQuery ;
+    query2 := query1;
+    union  := '''' ;
+    ret    := ''SELECT EXTRACT(''''year'''' FROM year) AS year'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+    	ret := ret || '', CAST(SUM("'' || r1.feature || ''") AS int) AS "'' || r1.feature || ''"'' ;
+    END LOOP;
+
+    ret := ret || ''
+  FROM (
+'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+       ret   := ret || union || ''    SELECT date_trunc(''''year'''', yearmonth)::date AS year'' ;
+       union := ''
+    UNION
+'';
+       FOR r2 IN EXECUTE query2 LOOP
+       	   IF r1.feature = r2.feature THEN
+	      ret := ret || '', COUNT(*)'' ;
+	   ELSE
+	      ret := ret || '', 0'' ;
+	   END IF;
+	   ret := ret || '' AS "'' || r2.feature || ''"'';
+       END LOOP ;
+       ret := ret || ''
+       FROM listarchive 
+       WHERE '' || Feature || '' = '''''' || replace(r1.feature, '''''''', '''''''''''') || '''''' GROUP BY year''; -- There are names containing apostrophs ...
+    END LOOP ;
+
+    ret := ret || ''
+  ) zw
+  GROUP BY year
+  ORDER BY year;'' ;
+
+    RETURN ret;
+  END; ' LANGUAGE 'plpgsql';
+
+CREATE OR REPLACE FUNCTION BuildQueryCDDsYear()
+    RETURNS text AS '
+    DECLARE
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsYearHelper(
+               ''SELECT project AS feature, COUNT(*) AS num FROM listarchive GROUP BY project ORDER BY num DESC;'',
+               ''project'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+/*
+ * This query returns stats about the ARG2 most active authors in a specific
+ * Mailing list (ARG1)
+ */
+
+CREATE OR REPLACE FUNCTION BuildQueryAuthorsYear(text, int)
+    RETURNS text AS '
+    DECLARE
+       Project    ALIAS FOR \$1 ;
+       NumAuthors ALIAS FOR \$2 ;
+       ret        text ;
+
+    BEGIN
+
+    ret := BuildQueryCDDsYearHelper(
+               ''SELECT author AS feature, COUNT(*) AS num FROM listarchive
+                 WHERE project = '''''' || Project || '''''' AND author IN (
+      SELECT author FROM (SELECT author, count(*) as anz From listarchive where project = '''''' || Project || ''''''
+           GROUP BY author ORDER BY anz DESC LIMIT '' || NumAuthors || '') AS zw)
+   GROUP BY author ORDER BY num DESC;'',
+               ''project = '''''' || Project || '''''' AND author'') ;
+    return ret ;
+  END; ' LANGUAGE 'plpgsql';
+
+COMMIT;
+EOT
+

Propchange: blends/trunk/team_analysis_tools/archives_01.sql
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/archives_02.sql
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/archives_02.sql?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/archives_02.sql (added)
+++ blends/trunk/team_analysis_tools/archives_02.sql Wed Jan 26 11:00:24 2011
@@ -1,0 +1,75 @@
+#!/bin/sh
+
+psql listarchives <<EOT
+
+BEGIN;
+
+/*******************************************
+ *
+ * Same thing as above but for whole year
+ *
+ *******************************************/
+
+/*
+ * Build a query string for several purposes
+ *   ARG1: Query to obtain wanted columns
+ *   ARG2: Feature that is queried
+ * See below how this helper is used.
+ */
+CREATE OR REPLACE FUNCTION BuildQueryCDDsYearHelper(text, text)
+    RETURNS text AS '
+    DECLARE
+       IterQuery  ALIAS FOR \$1 ;
+       Feature    ALIAS FOR \$2 ;
+       ret        text ;
+       union      text ;
+       query1     text ;
+       query2     text ;
+       r1         RECORD ;
+       r2         RECORD ;
+       ri         RECORD ;
+       qi         RECORD ;
+    BEGIN
+
+    query1 := IterQuery ;
+    query2 := query1;
+    union  := '''' ;
+    ret    := ''SELECT EXTRACT(''''year'''' FROM year) AS year'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+    	ret := ret || '', CAST(SUM("'' || r1.feature || ''") AS int) AS "'' || r1.feature || ''"'' ;
+    END LOOP;
+
+    ret := ret || ''
+  FROM (
+'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+       ret   := ret || union || ''    SELECT date_trunc(''''year'''', yearmonth)::date AS year'' ;
+       union := ''
+    UNION
+'';
+       FOR r2 IN EXECUTE query2 LOOP
+       	   IF r1.feature = r2.feature THEN
+	      ret := ret || '', COUNT(*)'' ;
+	   ELSE
+	      ret := ret || '', 0'' ;
+	   END IF;
+	   ret := ret || '' AS "'' || r2.feature || ''"'';
+       END LOOP ;
+       ret := ret || ''
+       FROM listarchive 
+       WHERE '' || Feature || '' = '''''' || replace(r1.feature, '''''''', '''''''''''') || '''''' GROUP BY year'';
+    END LOOP ;
+
+    ret := ret || ''
+  ) zw
+  GROUP BY year
+  ORDER BY year;'' ;
+
+    RETURN ret;
+  END; ' LANGUAGE 'plpgsql';
+
+COMMIT;
+EOT
+

Propchange: blends/trunk/team_analysis_tools/archives_02.sql
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/archives_03.sql
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/archives_03.sql?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/archives_03.sql (added)
+++ blends/trunk/team_analysis_tools/archives_03.sql Wed Jan 26 11:00:24 2011
@@ -1,0 +1,75 @@
+#!/bin/sh
+
+psql listarchives <<EOT
+
+BEGIN;
+
+/*******************************************
+ *
+ * Same thing as above but for whole year
+ *
+ *******************************************/
+
+/*
+ * Build a query string for several purposes
+ *   ARG1: Query to obtain wanted columns
+ *   ARG2: Feature that is queried
+ * See below how this helper is used.
+ */
+CREATE OR REPLACE FUNCTION BuildQueryCDDsYearHelper(text, text)
+    RETURNS text AS '
+    DECLARE
+       IterQuery  ALIAS FOR \$1 ;
+       Feature    ALIAS FOR \$2 ;
+       ret        text ;
+       union      text ;
+       query1     text ;
+       query2     text ;
+       r1         RECORD ;
+       r2         RECORD ;
+       ri         RECORD ;
+       qi         RECORD ;
+    BEGIN
+
+    query1 := IterQuery ;
+    query2 := query1;
+    union  := '''' ;
+    ret    := ''SELECT EXTRACT(''''year'''' FROM year) AS year'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+    	ret := ret || '', CAST(SUM("'' || r1.feature || ''") AS int) AS "'' || replace(r1.feature,'' '',''_'') || ''"'' ;
+    END LOOP;
+
+    ret := ret || ''
+  FROM (
+'' ;
+
+    FOR r1 IN EXECUTE query1 LOOP
+       ret   := ret || union || ''    SELECT date_trunc(''''year'''', yearmonth)::date AS year'' ;
+       union := ''
+    UNION
+'';
+       FOR r2 IN EXECUTE query2 LOOP
+       	   IF r1.feature = r2.feature THEN
+	      ret := ret || '', COUNT(*)'' ;
+	   ELSE
+	      ret := ret || '', 0'' ;
+	   END IF;
+	   ret := ret || '' AS "'' || r2.feature || ''"'';
+       END LOOP ;
+       ret := ret || ''
+       FROM listarchive 
+       WHERE '' || Feature || '' = '''''' || replace(r1.feature, '''''''', '''''''''''') || '''''' GROUP BY year'';
+    END LOOP ;
+
+    ret := ret || ''
+  ) zw
+  GROUP BY year
+  ORDER BY year;'' ;
+
+    RETURN ret;
+  END; ' LANGUAGE 'plpgsql';
+
+COMMIT;
+EOT
+

Propchange: blends/trunk/team_analysis_tools/archives_03.sql
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/author_stats
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/author_stats?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/author_stats (added)
+++ blends/trunk/team_analysis_tools/author_stats Wed Jan 26 11:00:24 2011
@@ -1,0 +1,29 @@
+#!/bin/sh -e
+# This script draws a plot to compare mailing list activities
+
+# set -x
+if [ "$1" = "" ] ; then
+    echo "Usage: `basename $0` <listname>"
+    exit 1
+fi
+
+NUM=10
+
+NAME=authorstat_"$1"
+DATFILE="${NAME}_year.txt"
+QUERYFILE=`mktemp`
+psql -t listarchives -c "SELECT BuildQueryAuthorsYear('$1', $NUM) ;" | sed '1s/\( CAST(SUM([^)]\+) AS int) AS "[^"]\+[ _]\w\)[^ ^_]\+"/\1."/g' > $QUERYFILE
+cat $QUERYFILE | \
+   psql listarchives \
+   >"$DATFILE"
+rm $QUERYFILE
+
+sed -i -e '/^[-+]\+$/d' -e '/^([0-9]\+ [A-Za-z]\+)$/d' \
+       -e 's/[[:space:]]*|[[:space:]]*/\t/g'           \
+       "$DATFILE"
+
+##       -e 's/&#xAE;//g'  -e 's/&#xE9;/e/' \
+##       -e 's/&#xE1;/á/g' -e 's/&#xF1;/ñ/' \
+##       -e 's/&#xE8;/è/g' -e 's/&#xF6;/ö/g' \
+
+./author_stats_create_graph $DATFILE $NUM "List activities for $1 list"

Propchange: blends/trunk/team_analysis_tools/author_stats
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/author_stats_9
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/author_stats_9?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/author_stats_9 (added)
+++ blends/trunk/team_analysis_tools/author_stats_9 Wed Jan 26 11:00:24 2011
@@ -1,0 +1,25 @@
+#!/bin/sh -e
+# This script draws a plot to compare mailing list activities
+
+# set -x
+if [ "$1" = "" ] ; then
+    echo "Usage: `basename $0` <listname>"
+    exit 1
+fi
+
+NUM=9
+
+NAME=authorstat_"$1"
+DATFILE="${NAME}_year.txt"
+QUERYFILE=`mktemp`
+psql -t listarchives -c "SELECT BuildQueryAuthorsYear('$1', $NUM) ;" | sed '1s/\( CAST(SUM([^)]\+) AS int) AS "[^"]\+ \w\)[^ ]\+"/\1."/g' > $QUERYFILE
+cat $QUERYFILE | \
+   psql listarchives \
+   >"$DATFILE"
+rm $QUERYFILE
+
+sed -i -e '/^[-+]\+$/d' -e '/^([0-9]\+ [A-Za-z]\+)$/d' \
+       -e 's/[[:space:]]*|[[:space:]]*/\t/g'           \
+       "$DATFILE"
+
+./author_stats_create_graph $DATFILE $NUM "List activities for $1 list"

Propchange: blends/trunk/team_analysis_tools/author_stats_9
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/author_stats_create_graph
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/author_stats_create_graph?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/author_stats_create_graph (added)
+++ blends/trunk/team_analysis_tools/author_stats_create_graph Wed Jan 26 11:00:24 2011
@@ -1,0 +1,55 @@
+#!/bin/sh -e
+# This script draws a bar plot from a given text file
+# parameters: <datafile> <number_of_value_columns> <headline>
+
+if [ $# -ne 3 ] ; then
+    echo "Usage: `basename $0` <datafile> <number_of_value_columns> <headline>"
+    exit
+fi
+
+DATFILE=$1
+
+if [ ! -e $DATFILE ] ; then
+    echo "File not found: $DATFILE"
+    exit
+fi
+
+NAME=`basename $DATFILE .txt`
+# strip '_year' in the end of NAME if exists
+NAME=`basename $NAME _year`
+
+NUM=$2
+ENDCOL=$((NUM+1))
+
+R --no-save >/dev/null <<EOT
+library(plotrix)
+dmstats <- read.table(file='$DATFILE', sep = '\t', fill=TRUE, header=TRUE )
+# textcolor="yellow"
+textcolor="black"
+# pdf("${NAME}.pdf", fg=textcolor, width=9, height=7)
+png("${NAME}.png", width = 800, height = 600)
+par(col.axis=textcolor,col.main=textcolor)
+dmstats.mat <- as.matrix(dmstats)[,2:$ENDCOL]
+rownames(dmstats.mat) <- dmstats[['year']]
+dmstats.mat <- t(dmstats.mat)
+
+mycolors=c("red", "blue", "darkorange", "darkgreen", "darkorchid", 
+           "brown", "cornflowerblue", "brown2", "chartreuse3", "aquamarine4")
+
+plotcolors <- mycolors[1:$NUM]
+if ( $NUM > length(mycolors) )
+    plotcolors <- rainbow($NUM)
+
+barplot(dmstats.mat,beside=TRUE,col=plotcolors,
+        main = "$3")
+tmpfx <- format(colnames(dmstats[,2:$ENDCOL]))
+legendnames <- paste(gsub('_', ' ', tmpfx), format(colSums(dmstats[2:$ENDCOL]),justify="right"),sep='\t')
+legend(x="topleft", legendnames,fill=plotcolors, inset=0.05,
+       text.col=textcolor
+      )
+
+dev.off()
+
+EOT
+
+# rm $DATFILE

Propchange: blends/trunk/team_analysis_tools/author_stats_create_graph
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/author_stats_pdf
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/author_stats_pdf?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/author_stats_pdf (added)
+++ blends/trunk/team_analysis_tools/author_stats_pdf Wed Jan 26 11:00:24 2011
@@ -1,0 +1,65 @@
+#!/bin/sh -e
+# This script draws a plot to compare mailing list activities
+
+# set -x
+if [ "$1" = "" ] ; then
+    echo "Usage: `basename $0` <listname>"
+    exit 1
+fi
+
+TEXTCOLOR=black
+if [ "$2" = "presentation" ] ; then
+    TEXTCOLOR=white
+fi
+
+NUM=10
+
+NAME=authorstat_"$1"
+DATFILE="${NAME}_year.txt"
+QUERYFILE=`mktemp`
+psql -t listarchives -c "SELECT BuildQueryAuthorsYear('$1', $NUM) ;" | sed '1s/\( CAST(SUM([^)]\+) AS int) AS "[^"]\+[ _]\w\)[^ ^_]\+"/\1."/g' > $QUERYFILE
+cat $QUERYFILE | \
+   psql listarchives \
+   >"$DATFILE"
+rm $QUERYFILE
+
+sed -i -e '/^[-+]\+$/d' -e '/^([0-9]\+ [A-Za-z]\+)$/d' \
+       -e 's/[[:space:]]*|[[:space:]]*/\t/g'           \
+       "$DATFILE"
+
+##       -e 's/&#xAE;//g'  -e 's/&#xE9;/e/' \
+##       -e 's/&#xE1;/á/g' -e 's/&#xF1;/ñ/' \
+##       -e 's/&#xE8;/è/g' -e 's/&#xF6;/ö/g' \
+
+ENDCOL=$((NUM+1))
+
+R --no-save >/dev/null <<EOT
+library(plotrix)
+dmstats <- read.table(file='$DATFILE', sep = '\t', fill=TRUE, header=TRUE )
+# textcolor="yellow"
+textcolor="$TEXTCOLOR"
+pdf("${NAME}.pdf", fg=textcolor, width=9, height=7)
+# png("${NAME}.png", width = 800, height = 600)
+par(col.axis=textcolor,col.main=textcolor)
+dmstats.mat <- as.matrix(dmstats)[,2:$ENDCOL]
+rownames(dmstats.mat) <- dmstats[['year']]
+dmstats.mat <- t(dmstats.mat)
+
+mycolors=c("red", "blue", "darkorange", "darkgreen", "darkorchid", 
+           "brown", "cornflowerblue", "brown2", "chartreuse3", "aquamarine4")
+# plotcolors=rainbow($NUM)
+plotcolors=mycolors[1:$NUM]
+
+barplot(dmstats.mat,beside=TRUE,col=plotcolors,
+        main = "List activities for $1 list")
+# legendnames <- paste(format(colnames(dmstats[,2:$ENDCOL]),width=max(nchar(colnames(dmstats[,2:$ENDCOL])))), format(colSums(dmstats[2:$ENDCOL]),width=5,justify="right"))
+legendnames <- paste(gsub('_', ' ', format(colnames(dmstats[,2:$ENDCOL]))), format(colSums(dmstats[2:$ENDCOL]),justify="right"),sep='\t')
+legend(x="topleft", legendnames,fill=plotcolors, inset=0.05,
+       text.col=textcolor
+      )
+
+dev.off()
+
+EOT
+
+# rm $DATFILE

Propchange: blends/trunk/team_analysis_tools/author_stats_pdf
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/create_bad_names.sql
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/create_bad_names.sql?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/create_bad_names.sql (added)
+++ blends/trunk/team_analysis_tools/create_bad_names.sql Wed Jan 26 11:00:24 2011
@@ -1,0 +1,747 @@
+DROP TABLE IF EXISTS carnivore_bad_names;
+
+CREATE TABLE carnivore_bad_names (
+  id   int,
+  name text,
+ FOREIGN KEY (id, name) REFERENCES carnivore_names DEFERRABLE);
+GRANT SELECT ON carnivore_bad_names TO PUBLIC;
+
+
+INSERT INTO carnivore_bad_names VALUES (  14, 'Nelson Antonio de Oliveira' );
+INSERT INTO carnivore_bad_names VALUES (  14, 'Nelson A. de Oliveira' );
+INSERT INTO carnivore_bad_names VALUES (  20, 'martin f krafft' );
+INSERT INTO carnivore_bad_names VALUES (  20, 'Martin Krafft' );
+INSERT INTO carnivore_bad_names VALUES (  20, 'martin f. krafft' );
+INSERT INTO carnivore_bad_names VALUES (  32, 'Roberto A. Lumbreras Pastor' );
+INSERT INTO carnivore_bad_names VALUES (  32, 'Roberto Lumbreras Pastor' );
+INSERT INTO carnivore_bad_names VALUES (  32, 'Roberto Lumbreras' );
+INSERT INTO carnivore_bad_names VALUES (  37, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES (  37, 'Chris   Vanden Berghe' );
+INSERT INTO carnivore_bad_names VALUES (  48, 'Luca Capello aka gismo' );
+INSERT INTO carnivore_bad_names VALUES (  54, 'Drs T.P.T. Dijkstra' );
+INSERT INTO carnivore_bad_names VALUES (  57, 'Bernd `Siggy'' Brentrup' );
+INSERT INTO carnivore_bad_names VALUES (  57, 'Siggy Brentrup' );
+
+-- Mazen Neifer                |     12 | 58
+-- Abou Al Montacir            |     16 | 58
+
+INSERT INTO carnivore_bad_names VALUES (  62, 'Patrick Ouellette NE4PO' );
+INSERT INTO carnivore_bad_names VALUES (  69, 'jon middleton' );
+INSERT INTO carnivore_bad_names VALUES (  86, 'Tiago   Bortoletto Vaz' );
+INSERT INTO carnivore_bad_names VALUES (  87, 'Timshel Knoll' );
+INSERT INTO carnivore_bad_names VALUES (  92, 'Elie Rosenblum' );
+INSERT INTO carnivore_bad_names VALUES ( 103, 'Atsushi Kamoshida' );
+INSERT INTO carnivore_bad_names VALUES ( 111, 'The Debichem Group' );
+INSERT INTO carnivore_bad_names VALUES ( 116, 'polyxmass maintainer' );
+INSERT INTO carnivore_bad_names VALUES ( 128, 'Xavier Luthi' );
+INSERT INTO carnivore_bad_names VALUES ( 132, 'Stephen J. Carpenter' );
+INSERT INTO carnivore_bad_names VALUES ( 135, 'Oriole' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 143 AND name != 'Damyan Ivanov';
+INSERT INTO carnivore_bad_names VALUES ( 155, 'John Ferlito' );
+INSERT INTO carnivore_bad_names VALUES ( 156, '_Stratus' );
+INSERT INTO carnivore_bad_names VALUES ( 156, 'Gustavo Franco' );
+INSERT INTO carnivore_bad_names VALUES ( 164, 'Trygve Laugstol' );
+INSERT INTO carnivore_bad_names VALUES ( 168, 'Jan Camenisch' );
+INSERT INTO carnivore_bad_names VALUES ( 175, 'Ramakrishnan M' );
+INSERT INTO carnivore_bad_names VALUES ( 177, 'Michal Cihar' );
+INSERT INTO carnivore_bad_names VALUES ( 179, '"Matthias Kabel"' );
+INSERT INTO carnivore_bad_names VALUES ( 189, 'Tobias Toedter' );
+INSERT INTO carnivore_bad_names VALUES ( 191, '"Steinar H. Gunderson"' );
+INSERT INTO carnivore_bad_names VALUES ( 198, 'Zed Pobre' );
+INSERT INTO carnivore_bad_names VALUES ( 198, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES ( 216, 'Laszlo Boszormenyi' );
+INSERT INTO carnivore_bad_names VALUES ( 222, 'Phil   Brooke' );
+INSERT INTO carnivore_bad_names VALUES ( 222, 'Dr Phil Brooke' );
+INSERT INTO carnivore_bad_names VALUES ( 231, 'Bruno Barrera C.' );
+INSERT INTO carnivore_bad_names VALUES ( 234, 'lantz moore' );
+INSERT INTO carnivore_bad_names VALUES ( 237, 'Frank Lin PIAT' );
+INSERT INTO carnivore_bad_names VALUES ( 240, 'aka cavok' );
+INSERT INTO carnivore_bad_names VALUES ( 244, 'Debian Lustre Packaging team' );
+INSERT INTO carnivore_bad_names VALUES ( 247, 'Stéphane Glondu' );
+INSERT INTO carnivore_bad_names VALUES ( 247, 'Stephane Glondu' );           -- <<----
+INSERT INTO carnivore_bad_names VALUES ( 251, 'Corsac' );
+INSERT INTO carnivore_bad_names VALUES ( 257, 'P.A. Knuutila' );
+INSERT INTO carnivore_bad_names VALUES ( 260, 'John Sullivan' );
+INSERT INTO carnivore_bad_names VALUES ( 260, 'Willam John Sullivan' );
+INSERT INTO carnivore_bad_names VALUES ( 261, 'Anthony Towns  *EXPIRED*' );
+INSERT INTO carnivore_bad_names VALUES ( 262, 'Frederico Munoz' );
+INSERT INTO carnivore_bad_names VALUES ( 265, 'Jorgen ''forcer'' Schaefer' );
+INSERT INTO carnivore_bad_names VALUES ( 265, 'Jorgen Schaefer' );
+INSERT INTO carnivore_bad_names VALUES ( 272, 'Peter ''p2'' De Schrijver' );
+INSERT INTO carnivore_bad_names VALUES ( 277, 'Sam Hocevar' );
+INSERT INTO carnivore_bad_names VALUES ( 283, 'Taku Yasui' );
+INSERT INTO carnivore_bad_names VALUES ( 283, 'TAKU Yasui' );
+INSERT INTO carnivore_bad_names VALUES ( 285, 'Python Applications Packaging Team' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 290 AND name != 'Patrick Schoenfeld';
+INSERT INTO carnivore_bad_names VALUES ( 292, 'Debian freesmartphone.org Team' );
+INSERT INTO carnivore_bad_names VALUES ( 295, 'Simon Cornelis Maria van Smoorenburg' );
+INSERT INTO carnivore_bad_names VALUES ( 295, 'Miquel van Smoornburg' );
+INSERT INTO carnivore_bad_names VALUES ( 307, 'sean finney' );
+INSERT INTO carnivore_bad_names VALUES ( 312, 'caleishm' );
+INSERT INTO carnivore_bad_names VALUES ( 321, 'Samba Debian Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 327, 'Recai Oktas' );
+INSERT INTO carnivore_bad_names VALUES ( 328, 'J.H.M. Dassen' );
+INSERT INTO carnivore_bad_names VALUES ( 349, 'Grave Xavier' );
+INSERT INTO carnivore_bad_names VALUES ( 362, 'David Z Maze' );
+INSERT INTO carnivore_bad_names VALUES ( 363, 'Christopher Morrone' );
+INSERT INTO carnivore_bad_names VALUES ( 380, 'Lu' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 384 AND ( name = 'Nicolas FRANCOIS' OR name LIKE 'Nicolas Fran%ois' ) ;
+INSERT INTO carnivore_bad_names VALUES ( 399, 'Viral' );
+INSERT INTO carnivore_bad_names VALUES ( 400, 'Javier Fernandez-Sanguino Pen~a' );
+INSERT INTO carnivore_bad_names VALUES ( 401, 'Andra''s Bali' );
+INSERT INTO carnivore_bad_names VALUES ( 409, 'MJ Ray' );
+INSERT INTO carnivore_bad_names VALUES ( 413, 'Rogério Brito' );
+INSERT INTO carnivore_bad_names VALUES ( 414, 'Guenter Milde' );
+INSERT INTO carnivore_bad_names VALUES ( 424, 'W. Borgert' );
+INSERT INTO carnivore_bad_names VALUES ( 424, 'W. Martin Borgert' );
+INSERT INTO carnivore_bad_names VALUES ( 437, 'Chad Miller' );
+INSERT INTO carnivore_bad_names VALUES ( 440, 'Agustin Martin Domingo' );
+INSERT INTO carnivore_bad_names VALUES ( 440, 'Agustín   Martín Domingo' );
+INSERT INTO carnivore_bad_names VALUES ( 443, 'Frank Thomas' );
+INSERT INTO carnivore_bad_names VALUES ( 454, 'Debian Edu developers' );
+INSERT INTO carnivore_bad_names VALUES ( 455, 'Pedro   Zorzenon Neto' );
+INSERT INTO carnivore_bad_names VALUES ( 468, 'Andrew Cater' );
+INSERT INTO carnivore_bad_names VALUES ( 472, 'Ph.D.' );
+INSERT INTO carnivore_bad_names VALUES ( 472, 'Joe Reinhardt' );
+INSERT INTO carnivore_bad_names VALUES ( 472, 'Dr. Joseph M. Reinhardt' );
+INSERT INTO carnivore_bad_names VALUES ( 476, 'Mike O''Connor' );
+INSERT INTO carnivore_bad_names VALUES ( 479, 'Ole J. Tetlie' );
+INSERT INTO carnivore_bad_names VALUES ( 488, 'Tapio Lehtonen' );
+INSERT INTO carnivore_bad_names VALUES ( 492, 'Christopher L Cheney' );
+INSERT INTO carnivore_bad_names VALUES ( 504, 'Martin v. Loewis' );
+INSERT INTO carnivore_bad_names VALUES ( 509, 'Samuele Tonon' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 517 AND name != 'Jeremy Lainé' ;
+INSERT INTO carnivore_bad_names VALUES ( 518, 'Matvey Kozhev' );
+INSERT INTO carnivore_bad_names VALUES ( 534, 'Ricky Goldsmith' );
+INSERT INTO carnivore_bad_names VALUES ( 537, 'Mathieu Trudel' );
+INSERT INTO carnivore_bad_names VALUES ( 538, 'OHASHI Akira' );
+INSERT INTO carnivore_bad_names VALUES ( 545, 'Debian Embedded' );
+INSERT INTO carnivore_bad_names VALUES ( 557, 'Yasuhiro Take' );
+INSERT INTO carnivore_bad_names VALUES ( 561, 'Bernd Eckenfels  HSK' );
+INSERT INTO carnivore_bad_names VALUES ( 561, 'Bernd Eckenfels  LSK' );
+INSERT INTO carnivore_bad_names VALUES ( 562, 'Paul Hedderly' );
+INSERT INTO carnivore_bad_names VALUES ( 568, 'Fumitoshi Ukai' );
+INSERT INTO carnivore_bad_names VALUES ( 570, 'ken Nonaka' );
+INSERT INTO carnivore_bad_names VALUES ( 571, 'Vanicat Remi' );
+INSERT INTO carnivore_bad_names VALUES ( 571, 'Vanicat Rémi' );
+INSERT INTO carnivore_bad_names VALUES ( 571, 'Remi Vanicat' );
+INSERT INTO carnivore_bad_names VALUES ( 573, 'Paolo Didone`' );
+INSERT INTO carnivore_bad_names VALUES ( 584, 'Debian multimedia packages maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 584, 'Debian Multimedia Packages Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 586, 'Debian GIS Team' );
+INSERT INTO carnivore_bad_names VALUES ( 588, 'Steve M. Robbins' );
+INSERT INTO carnivore_bad_names VALUES ( 588, 'Steven M. Robbins' );
+INSERT INTO carnivore_bad_names VALUES ( 649, 'Chad Walstrom' );
+INSERT INTO carnivore_bad_names VALUES ( 652, 'Debian JP Board' );
+INSERT INTO carnivore_bad_names VALUES ( 654, 'Debian VoIP Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 654, 'Debian VoIP team' );
+INSERT INTO carnivore_bad_names VALUES ( 668, 'Ryan Golbeck' );
+INSERT INTO carnivore_bad_names VALUES ( 676, 'Ricardo Cardenes' );
+INSERT INTO carnivore_bad_names VALUES ( 680, 'Debian Zope team' );
+INSERT INTO carnivore_bad_names VALUES ( 680, 'Debian/Ubuntu Zope Team' );
+INSERT INTO carnivore_bad_names VALUES ( 680, 'Debian/Ubuntu Zope team' );
+INSERT INTO carnivore_bad_names VALUES ( 686, 'Guilherme de S. Pastore' );
+INSERT INTO carnivore_bad_names VALUES ( 693, 'David Martínez' );
+INSERT INTO carnivore_bad_names VALUES ( 693, 'Ender' );
+INSERT INTO carnivore_bad_names VALUES ( 700, 'KELEMEN Péter' );
+INSERT INTO carnivore_bad_names VALUES ( 700, 'KELEMEN Peter' );
+INSERT INTO carnivore_bad_names VALUES ( 719, 'Steven Dunham' );
+INSERT INTO carnivore_bad_names VALUES ( 719, 'Steve Dunham' );
+INSERT INTO carnivore_bad_names VALUES ( 722, 'Neil Schemenauer' );
+INSERT INTO carnivore_bad_names VALUES ( 723, 'tangke' );
+INSERT INTO carnivore_bad_names VALUES ( 723, 'tang ke' );
+INSERT INTO carnivore_bad_names VALUES ( 731, 'rosea grammostola' );
+INSERT INTO carnivore_bad_names VALUES ( 742, 'Adam Kessel' );
+INSERT INTO carnivore_bad_names VALUES ( 743, 'Ivan E. Moore II' );
+INSERT INTO carnivore_bad_names VALUES ( 745, 'Thomas ''Challenger'' Schmidt' );
+INSERT INTO carnivore_bad_names VALUES ( 754, 'Jorgen Hagg' );
+INSERT INTO carnivore_bad_names VALUES ( 754, 'Joergen Haegg' );
+INSERT INTO carnivore_bad_names VALUES ( 761, 'Chris Taylor' );
+INSERT INTO carnivore_bad_names VALUES ( 762, 'Peter ''Nidd'' Novodvorsky' );
+INSERT INTO carnivore_bad_names VALUES ( 778, 'Tim Retout' );
+INSERT INTO carnivore_bad_names VALUES ( 782, 'TANIGUCHI Takaki' );
+INSERT INTO carnivore_bad_names VALUES ( 801, 'Susan Kleinmann' );
+INSERT INTO carnivore_bad_names VALUES ( 802, 'Guido Guenther' );
+INSERT INTO carnivore_bad_names VALUES ( 811, 'Sam "Eddie" Couter' );
+INSERT INTO carnivore_bad_names VALUES ( 811, 'Sam   Couter' );
+INSERT INTO carnivore_bad_names VALUES ( 815, 'Zhao Wei' );
+INSERT INTO carnivore_bad_names VALUES ( 815, 'zhaoway' );
+INSERT INTO carnivore_bad_names VALUES ( 817, 'KEY VOIDED - Use CECDFDD2 instead.' );
+INSERT INTO carnivore_bad_names VALUES ( 818, 'Erlang Packaging Team' );
+INSERT INTO carnivore_bad_names VALUES ( 823, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES ( 824, 'Nacho Barrientos' );
+INSERT INTO carnivore_bad_names VALUES ( 826, 'Richard A Nelson' );
+INSERT INTO carnivore_bad_names VALUES ( 829, 'Rene Mayorga' );
+INSERT INTO carnivore_bad_names VALUES ( 829, 'René Mayorga' );
+INSERT INTO carnivore_bad_names VALUES ( 831, 'Raul Miller' );
+INSERT INTO carnivore_bad_names VALUES ( 853, 'Francesco   Lovergine' );
+INSERT INTO carnivore_bad_names VALUES ( 853, 'Francesco P. Lovergine' );
+INSERT INTO carnivore_bad_names VALUES ( 856, 'Chuyeon Park' );
+INSERT INTO carnivore_bad_names VALUES ( 864, 'Steffen Moeller' );
+INSERT INTO carnivore_bad_names VALUES ( 865, 'NOSHIRO Shigeo' );
+INSERT INTO carnivore_bad_names VALUES ( 866, 'Ondrej Sury' );
+INSERT INTO carnivore_bad_names VALUES ( 870, 'Erik Andersen' );
+INSERT INTO carnivore_bad_names VALUES ( 873, 'Ricardo Mones' );
+INSERT INTO carnivore_bad_names VALUES ( 886, 'Thomas Goirand' );
+INSERT INTO carnivore_bad_names VALUES ( 890, 'Andreas Bombe' );
+INSERT INTO carnivore_bad_names VALUES ( 895, 'Siggi Langauf' );
+INSERT INTO carnivore_bad_names VALUES ( 898, 'Horde Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 899, 'Ueyama Rui' );
+INSERT INTO carnivore_bad_names VALUES ( 904, 'Hector Oron' );
+INSERT INTO carnivore_bad_names VALUES ( 909, 'James  A. Treacy' );
+INSERT INTO carnivore_bad_names VALUES ( 921, 'Christine Spang' );
+INSERT INTO carnivore_bad_names VALUES ( 922, 'OHURA Makoto' );
+INSERT INTO carnivore_bad_names VALUES ( 931, 'Javier   Gutiérrez' );
+INSERT INTO carnivore_bad_names VALUES ( 931, 'Javier Vi~nuales Guti''errez' );
+INSERT INTO carnivore_bad_names VALUES ( 940, 'Miros/law Baran' );
+INSERT INTO carnivore_bad_names VALUES ( 940, 'BOF2510053411' );
+INSERT INTO carnivore_bad_names VALUES ( 947, 'Bastien ROUCARIÈS' );
+INSERT INTO carnivore_bad_names VALUES ( 949, 'Michel Daenzer' );
+INSERT INTO carnivore_bad_names VALUES ( 953, 'Peter Krefting' );
+INSERT INTO carnivore_bad_names VALUES ( 953, 'peter karlsson' );
+INSERT INTO carnivore_bad_names VALUES ( 959, 'Ievgenii Meshcheriakov' );
+INSERT INTO carnivore_bad_names VALUES ( 959, 'Євгеній Мещеряков' );
+INSERT INTO carnivore_bad_names VALUES ( 966, 'Yauheni Kaliuta' );
+INSERT INTO carnivore_bad_names VALUES ( 967, 'Sven Luther' );
+INSERT INTO carnivore_bad_names VALUES ( 971, 'E S P' );
+INSERT INTO carnivore_bad_names VALUES ( 971, 'Mister Bad' );
+INSERT INTO carnivore_bad_names VALUES ( 972, 'David Coe' );
+INSERT INTO carnivore_bad_names VALUES ( 981, 'Martin Sjogren' );
+INSERT INTO carnivore_bad_names VALUES ( 989, 'Zhengpeng Hou' );
+INSERT INTO carnivore_bad_names VALUES ( 994, 'Debian TeX Task Force' );
+INSERT INTO carnivore_bad_names VALUES ( 994, 'Debian TeX maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 1002, 'Brian Ermovick' );
+INSERT INTO carnivore_bad_names VALUES ( 1006, 'Remi Perrot' );
+INSERT INTO carnivore_bad_names VALUES ( 1010, 'Tamas Szerb' );
+INSERT INTO carnivore_bad_names VALUES ( 1016, 'Brian White' );
+INSERT INTO carnivore_bad_names VALUES ( 1018, 'Radovan Garabik' );
+INSERT INTO carnivore_bad_names VALUES ( 1019, 'dann frazier' );
+INSERT INTO carnivore_bad_names VALUES ( 1021, 'Juan Alvarez' );
+INSERT INTO carnivore_bad_names VALUES ( 1029, 'N Williams' );
+INSERT INTO carnivore_bad_names VALUES ( 1031, 'Swedish personal ID# 790225-3330' );
+INSERT INTO carnivore_bad_names VALUES ( 1044, 'Josue Abarca' );
+INSERT INTO carnivore_bad_names VALUES ( 1044, 'Josué Abarca' );
+INSERT INTO carnivore_bad_names VALUES ( 1047, 'Replacement key for 4EBE56CB0EFECBED2A928D4F7BD15207E95EDDC9' );
+INSERT INTO carnivore_bad_names VALUES ( 1051, 'Henrique M. Holschuh' );
+INSERT INTO carnivore_bad_names VALUES ( 1056, 'Alexander Schmehl' );
+INSERT INTO carnivore_bad_names VALUES ( 1064, 'kolter' );
+INSERT INTO carnivore_bad_names VALUES ( 1075, 'Ola Lundkvist' );
+INSERT INTO carnivore_bad_names VALUES ( 1079, 'Sergio Rua' );
+INSERT INTO carnivore_bad_names VALUES ( 1084, 'Mutsumi' );
+INSERT INTO carnivore_bad_names VALUES ( 1084, 'ISHIKAWA Mutsumi' );
+INSERT INTO carnivore_bad_names VALUES ( 1094, 'Debian Java maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 1094, 'Debian Java maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 1094, 'Debian Orbital Alignment Team' );
+INSERT INTO carnivore_bad_names VALUES ( 1099, 'Niklas Hoglund' );
+INSERT INTO carnivore_bad_names VALUES ( 1101, 'Jordi Mallach' );
+INSERT INTO carnivore_bad_names VALUES ( 1101, 'Jordi' );
+INSERT INTO carnivore_bad_names VALUES ( 1104, 'Rudolf Weber' );
+INSERT INTO carnivore_bad_names VALUES ( 1115, 'Otavio   Salvador' );
+INSERT INTO carnivore_bad_names VALUES ( 1115, 'Otavio Salvador' );
+INSERT INTO carnivore_bad_names VALUES ( 1121, 'Adam Rogoyski' );
+INSERT INTO carnivore_bad_names VALUES ( 1128, 'Adam Klein' );
+INSERT INTO carnivore_bad_names VALUES ( 1130, 'John Travers' );
+INSERT INTO carnivore_bad_names VALUES ( 1135, 'GOTO Masanori' );
+INSERT INTO carnivore_bad_names VALUES ( 1138, 'Kai Wasserbaech' );
+INSERT INTO carnivore_bad_names VALUES ( 1144, 'Joe Nahmias' );
+INSERT INTO carnivore_bad_names VALUES ( 1155, 'Scott Howard' );
+INSERT INTO carnivore_bad_names VALUES ( 1160, 'codeshark' );
+INSERT INTO carnivore_bad_names VALUES ( 1169, 'Debian Policy List' );
+INSERT INTO carnivore_bad_names VALUES ( 1178, 'Heiko Stuebner' );
+INSERT INTO carnivore_bad_names VALUES ( 1182, 'Debian Scientific Computation Team' );
+INSERT INTO carnivore_bad_names VALUES ( 1183, 'Joey Schulze' );
+INSERT INTO carnivore_bad_names VALUES ( 1186, '"Boris D. Beletsky"' );
+INSERT INTO carnivore_bad_names VALUES ( 1186, 'Boris Beletsky' );
+INSERT INTO carnivore_bad_names VALUES ( 1195, 'Python Modules Packaging Team' );
+INSERT INTO carnivore_bad_names VALUES ( 1207, 'Aurélien Gérôme' );
+INSERT INTO carnivore_bad_names VALUES ( 1208, 'Vaidhyanathan Mayilrangam' );
+INSERT INTO carnivore_bad_names VALUES ( 1209, 'Andrew Lenharth' );
+INSERT INTO carnivore_bad_names VALUES ( 1210, 'Bigliardi Luca' );
+INSERT INTO carnivore_bad_names VALUES ( 1223, 'Dr Gordon W. Russell' );
+INSERT INTO carnivore_bad_names VALUES ( 1223, 'Dr Gordon Russell' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1236 AND name != 'Andres Seco Hernandez' ;
+INSERT INTO carnivore_bad_names VALUES ( 1245, 'Jonathon D Nelson' );
+INSERT INTO carnivore_bad_names VALUES ( 1251, 'Maintainers of GStreamer packages' );
+INSERT INTO carnivore_bad_names VALUES ( 1252, 'Szalay Attila' );
+INSERT INTO carnivore_bad_names VALUES ( 1258, 'Eric Schwartz' );
+INSERT INTO carnivore_bad_names VALUES ( 1262, 'Ryszard £ach' );
+INSERT INTO carnivore_bad_names VALUES ( 1267, 'Yiing-Jiunn Liu' );
+INSERT INTO carnivore_bad_names VALUES ( 1267, 'Ying-Jun Liu' );
+INSERT INTO carnivore_bad_names VALUES ( 1267, 'Ying-Chun Liu' );
+INSERT INTO carnivore_bad_names VALUES ( 1269, 'Rudy Godoy' );
+INSERT INTO carnivore_bad_names VALUES ( 1270, '"Roland Marcus Rutschmann"' );
+INSERT INTO carnivore_bad_names VALUES ( 1274, 'Rene van Bevern' );
+INSERT INTO carnivore_bad_names VALUES ( 1284, 'Network Operation Center' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1290 AND name != 'An Thi-Nguyen Le' ;
+INSERT INTO carnivore_bad_names VALUES ( 1293, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES ( 1297, 'Micah Anderson' );
+INSERT INTO carnivore_bad_names VALUES ( 1299, 'Jose Luis Rivas' );
+INSERT INTO carnivore_bad_names VALUES ( 1308, 'Jamie Wilkinson' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1330 AND name != 'Matthijs Kooijman' ;
+INSERT INTO carnivore_bad_names VALUES ( 1332, 'Brian Almeida' );
+INSERT INTO carnivore_bad_names VALUES ( 1363, 'Jeremy Malcolm' );
+INSERT INTO carnivore_bad_names VALUES ( 1363, 'Jeremy   Malcolm' );
+INSERT INTO carnivore_bad_names VALUES ( 1376, 'Debian GNU/kFreeBSD' );
+INSERT INTO carnivore_bad_names VALUES ( 1385, 'Kevin M. Rosenberg' );
+INSERT INTO carnivore_bad_names VALUES ( 1385, 'Kevin Rosenberg' );
+INSERT INTO carnivore_bad_names VALUES ( 1385, 'M.D.' );
+INSERT INTO carnivore_bad_names VALUES ( 1388, 'System V' );
+INSERT INTO carnivore_bad_names VALUES ( 1394, 'David van Leeuwen' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1398 AND name != 'Adam C. Powell' ;
+INSERT INTO carnivore_bad_names VALUES ( 1399, 'Brandon Griffith' );
+INSERT INTO carnivore_bad_names VALUES ( 1400, 'Luciano Bello  (Coordinación de Emergencias en Redes Teleinformáticas)' );
+INSERT INTO carnivore_bad_names VALUES ( 1416, 'Neil Roeth' );
+INSERT INTO carnivore_bad_names VALUES ( 1424, 'Dan Jacobowitz' );
+INSERT INTO carnivore_bad_names VALUES ( 1426, 'Hanska' );
+INSERT INTO carnivore_bad_names VALUES ( 1427, 'Ove Kaaven' );
+INSERT INTO carnivore_bad_names VALUES ( 1430, 'Jerome Marant' );
+INSERT INTO carnivore_bad_names VALUES ( 1432, 'Bartosz Fenski' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1442 AND name != 'Andrea Mennucci' ;
+INSERT INTO carnivore_bad_names VALUES ( 1456, 'Sean ''Shaleh'' Perry' );
+INSERT INTO carnivore_bad_names VALUES ( 1459, 'Dave Swegen' );
+INSERT INTO carnivore_bad_names VALUES ( 1469, 'Dr. Michael Meskes' );
+INSERT INTO carnivore_bad_names VALUES ( 1470, 'Teo Ruiz' );
+INSERT INTO carnivore_bad_names VALUES ( 1470, 'Teófilo   Ruiz Suárez' );
+INSERT INTO carnivore_bad_names VALUES ( 1487, 'Yukiharu Yabuki' );
+INSERT INTO carnivore_bad_names VALUES ( 1492, 'Giacomo Catenazzi' );
+INSERT INTO carnivore_bad_names VALUES ( 1493, 'John Hasler' );
+INSERT INTO carnivore_bad_names VALUES ( 1494, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES ( 1494, 'Jay Kominek' );
+INSERT INTO carnivore_bad_names VALUES ( 1496, 'YAEGASHI Takeshi' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1498 AND name != 'Stefan Völkel' ;
+INSERT INTO carnivore_bad_names VALUES ( 1503, 'Tony Palma' );
+INSERT INTO carnivore_bad_names VALUES ( 1509, 'Arjan Oosting' );
+INSERT INTO carnivore_bad_names VALUES ( 1510, 'BerndSchumacher' );
+INSERT INTO carnivore_bad_names VALUES ( 1514, 'Gustavo   Noronha' );
+INSERT INTO carnivore_bad_names VALUES ( 1515, 'Nicolas Lichtmaier' );
+INSERT INTO carnivore_bad_names VALUES ( 1534, 'Maitland Bottoms' );
+INSERT INTO carnivore_bad_names VALUES ( 1537, 'Giunchedi Filippo' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1538 AND name != 'Adam Di Carlo' ;
+INSERT INTO carnivore_bad_names VALUES ( 1544, 'Boriel' );
+INSERT INTO carnivore_bad_names VALUES ( 1546, 'Nathan handler' );
+INSERT INTO carnivore_bad_names VALUES ( 1549, 'Bob Hilliard' );
+INSERT INTO carnivore_bad_names VALUES ( 1551, 'Carey Evans' );
+INSERT INTO carnivore_bad_names VALUES ( 1553, 'Carlos   Prados' );
+INSERT INTO carnivore_bad_names VALUES ( 1553, 'Carlos Prados' );
+INSERT INTO carnivore_bad_names VALUES ( 1574, 'Allan Anderson' );
+INSERT INTO carnivore_bad_names VALUES ( 1588, 'Stefan Bj|rnelund' );
+INSERT INTO carnivore_bad_names VALUES ( 1588, 'Stefan Bjornelund  [signing]' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1592 AND name != 'Darren Stalder' ;
+INSERT INTO carnivore_bad_names VALUES ( 1594, 'Paul J Thompson' );
+INSERT INTO carnivore_bad_names VALUES ( 1597, 'David.Frey' );
+INSERT INTO carnivore_bad_names VALUES ( 1609, 'Julien Blache' );
+INSERT INTO carnivore_bad_names VALUES ( 1614, 'Michel Lespinasse' );
+INSERT INTO carnivore_bad_names VALUES ( 1617, 'Simon McVittie' );
+INSERT INTO carnivore_bad_names VALUES ( 1621, 'Grub-Devel List' );
+INSERT INTO carnivore_bad_names VALUES ( 1626, 'Johannes Ring' );
+INSERT INTO carnivore_bad_names VALUES ( 1627, 'David Welton' );
+INSERT INTO carnivore_bad_names VALUES ( 1633, 'Mohammed Hassan' );
+INSERT INTO carnivore_bad_names VALUES ( 1640, 'pollux' );
+INSERT INTO carnivore_bad_names VALUES ( 1646, 'Andres Roldan' );
+INSERT INTO carnivore_bad_names VALUES ( 1646, 'Proceso de gestion de operaciones' );
+INSERT INTO carnivore_bad_names VALUES ( 1649, 'Shuzo Hatta' );
+INSERT INTO carnivore_bad_names VALUES ( 1669, '[NZ]Jojo' );
+INSERT INTO carnivore_bad_names VALUES ( 1675, 'ChoJin' );
+INSERT INTO carnivore_bad_names VALUES ( 1677, 'Rene Engelhard' );
+INSERT INTO carnivore_bad_names VALUES ( 1678, 'Petr Rockai' );
+INSERT INTO carnivore_bad_names VALUES ( 1678, 'Peter Rockai' );
+INSERT INTO carnivore_bad_names VALUES ( 1680, 'A.G.J. Simons' );
+INSERT INTO carnivore_bad_names VALUES ( 1682, 'Kame Alfa III' );
+INSERT INTO carnivore_bad_names VALUES ( 1684, 'Alex Pennace' );
+INSERT INTO carnivore_bad_names VALUES ( 1687, 'Jameson Rollins' );
+INSERT INTO carnivore_bad_names VALUES ( 1709, 'Dr. Michael Hummel' );
+INSERT INTO carnivore_bad_names VALUES ( 1709, 'Vee-Eye' );
+INSERT INTO carnivore_bad_names VALUES ( 1713, 'Weasel' );
+INSERT INTO carnivore_bad_names VALUES ( 1714, 'NOKUBI Takatsugu' );
+INSERT INTO carnivore_bad_names VALUES ( 1730, 'Douglas Bates' );
+INSERT INTO carnivore_bad_names VALUES ( 1743, 'David Zendzian' );
+INSERT INTO carnivore_bad_names VALUES ( 1745, 'Steve Baker' );
+INSERT INTO carnivore_bad_names VALUES ( 1745, 'Steven Baker' );
+INSERT INTO carnivore_bad_names VALUES ( 1750, 'Alberto   Gonzalez Iniesta' );
+INSERT INTO carnivore_bad_names VALUES ( 1760, 'Scott M Dier' );
+INSERT INTO carnivore_bad_names VALUES ( 1760, 'Scott Dier' );
+INSERT INTO carnivore_bad_names VALUES ( 1774, 'Oleksandr Moskalenko' );
+INSERT INTO carnivore_bad_names VALUES ( 1775, 'Martin Loschwitz' );
+INSERT INTO carnivore_bad_names VALUES ( 1784, 'Peter S Galbraith' );
+INSERT INTO carnivore_bad_names VALUES ( 1790, 'Maximilian Gass' );
+INSERT INTO carnivore_bad_names VALUES ( 1793, 'Christopher Lawrence' );
+INSERT INTO carnivore_bad_names VALUES ( 1793, 'Chris Lawrence' );
+INSERT INTO carnivore_bad_names VALUES ( 1794, 'Jay Berkenbilt' );
+INSERT INTO carnivore_bad_names VALUES ( 1798, 'Philip Hands' );
+INSERT INTO carnivore_bad_names VALUES ( 1803, 'Stephan Helma' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1804 AND name != 'Simon Richter' ;
+INSERT INTO carnivore_bad_names VALUES ( 1810, 'Guenter   Bechly' );
+INSERT INTO carnivore_bad_names VALUES ( 1810, 'Dr. Guenter Bechly' );
+INSERT INTO carnivore_bad_names VALUES ( 1811, 'Juan Manuel Garcia Molina' );
+INSERT INTO carnivore_bad_names VALUES ( 1812, 'Pascal Giard  (Debian GNU/Linux)' );
+INSERT INTO carnivore_bad_names VALUES ( 1820, 'Debian DRBD Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 1832, 'Jonathon Ross' );
+INSERT INTO carnivore_bad_names VALUES ( 1839, 'Matt Brown' );
+INSERT INTO carnivore_bad_names VALUES ( 1839, 'Matthew Brown' );
+INSERT INTO carnivore_bad_names VALUES ( 1859, 'Takao Kawamura' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 1869 AND name != 'Jochen Röhrig' ;
+INSERT INTO carnivore_bad_names VALUES ( 1880, 'Lazhur' );
+INSERT INTO carnivore_bad_names VALUES ( 1889, 'Brian Ristuccia' );
+INSERT INTO carnivore_bad_names VALUES ( 1891, 'Stephen Moraco' );
+INSERT INTO carnivore_bad_names VALUES ( 1899, 'Dmitry Oboukhov' );
+INSERT INTO carnivore_bad_names VALUES ( 1904, 'Gergely' );
+INSERT INTO carnivore_bad_names VALUES ( 1904, 'RISKO' );
+INSERT INTO carnivore_bad_names VALUES ( 1904, 'Gergely Risko' );
+INSERT INTO carnivore_bad_names VALUES ( 1904, 'Risko Gergely' );
+INSERT INTO carnivore_bad_names VALUES ( 1904, 'RISKO Gergely' );
+INSERT INTO carnivore_bad_names VALUES ( 1913, 'Stu Teasdale' );
+INSERT INTO carnivore_bad_names VALUES ( 1918, 'Mike Mattice' );
+INSERT INTO carnivore_bad_names VALUES ( 1920, 'ExpPsy Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 1923, 'Lars Wirzenius building Debian/Alpha automatically' );
+INSERT INTO carnivore_bad_names VALUES ( 1925, 'Debian kernel team' );
+INSERT INTO carnivore_bad_names VALUES ( 1930, 'Zephyr' );
+
+INSERT INTO carnivore_bad_names VALUES ( 1947, 'Bao   Ha' );
+INSERT INTO carnivore_bad_names VALUES ( 1950, 'GOsa packages mainteners group' );
+INSERT INTO carnivore_bad_names VALUES ( 1954, 'Stephen   Marenka' );
+INSERT INTO carnivore_bad_names VALUES ( 1961, 'Monica Ramirez Arceda' );
+INSERT INTO carnivore_bad_names VALUES ( 1962, 'Prezu' );
+INSERT INTO carnivore_bad_names VALUES ( 1963, 'Paul Bame' );
+INSERT INTO carnivore_bad_names VALUES ( 1964, 'Christophe Prudhomme' );
+INSERT INTO carnivore_bad_names VALUES ( 1968, 'Mark Eichin' );
+INSERT INTO carnivore_bad_names VALUES ( 1972, 'BSG' );
+INSERT INTO carnivore_bad_names VALUES ( 1972, 'Thomas   Bushnell' );
+INSERT INTO carnivore_bad_names VALUES ( 1979, 'alphascorpii' );
+INSERT INTO carnivore_bad_names VALUES ( 1986, 'gregor herrmann' );
+INSERT INTO carnivore_bad_names VALUES ( 1988, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES ( 1995, 'Jacobo Tarrio' );
+INSERT INTO carnivore_bad_names VALUES ( 1997, 'Vanessa Gutierrez' );
+INSERT INTO carnivore_bad_names VALUES ( 1999, 'Sylvain Le Gall' );
+INSERT INTO carnivore_bad_names VALUES ( 2007, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES ( 2007, 'Gregory Stark' );
+INSERT INTO carnivore_bad_names VALUES ( 2012, 'root' );
+INSERT INTO carnivore_bad_names VALUES ( 2012, 'Synergistic Effect' );
+INSERT INTO carnivore_bad_names VALUES ( 2013, 'Barak Pearlmutter' );
+INSERT INTO carnivore_bad_names VALUES ( 2015, 'CrossWire Packages' );
+INSERT INTO carnivore_bad_names VALUES ( 2031, 'Dale E Martin' );
+INSERT INTO carnivore_bad_names VALUES ( 2031, 'Dale Martin' );
+INSERT INTO carnivore_bad_names VALUES ( 2032, 'alice ferrazzi' );
+INSERT INTO carnivore_bad_names VALUES ( 2036, 'akira yamada' );
+INSERT INTO carnivore_bad_names VALUES ( 2042, 'Petr Cech' );
+INSERT INTO carnivore_bad_names VALUES ( 2042, 'Petr CECH' );
+INSERT INTO carnivore_bad_names VALUES ( 2044, 'Tyson Dowd' );
+INSERT INTO carnivore_bad_names VALUES ( 2048, 'Jeremie Corbier' );
+INSERT INTO carnivore_bad_names VALUES ( 2050, 'Calendarserver Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 2061, 'Fabio M. Di Nitto' );
+INSERT INTO carnivore_bad_names VALUES ( 2074, 'Tcl/Tk Debian Packagers' );
+INSERT INTO carnivore_bad_names VALUES ( 2085, 'Gunnar Wolf' );
+INSERT INTO carnivore_bad_names VALUES ( 2088, 'Wilmer' );
+INSERT INTO carnivore_bad_names VALUES ( 2096, 'Raphael Hertzog' );
+INSERT INTO carnivore_bad_names VALUES ( 2013, '"Barak A. Pearlmutter"' );
+INSERT INTO carnivore_bad_names VALUES ( 2013, 'Barak Pearlmutter' );
+INSERT INTO carnivore_bad_names VALUES ( 2100, 'Chrissie Caulfield' );
+INSERT INTO carnivore_bad_names VALUES ( 2100, 'Patrick Caulfield' );
+INSERT INTO carnivore_bad_names VALUES ( 2100, 'Christine Caulfield' );
+INSERT INTO carnivore_bad_names VALUES ( 2112, 'Jan Luebbe' );
+INSERT INTO carnivore_bad_names VALUES ( 2115, 'Matt Palmer' );
+INSERT INTO carnivore_bad_names VALUES ( 2116, 'Dennis Clark' );
+INSERT INTO carnivore_bad_names VALUES ( 2117, 'Thawte Freemail Member' );
+INSERT INTO carnivore_bad_names VALUES ( 2130, 'Francisco Garcia Claramonte' );
+INSERT INTO carnivore_bad_names VALUES ( 2130, 'Francisco Garcia' );
+INSERT INTO carnivore_bad_names VALUES ( 2130, 'Francisco Manuel Garcia Claramonte' );
+INSERT INTO carnivore_bad_names VALUES ( 2131, 'Dr. Frank Jordan' );
+INSERT INTO carnivore_bad_names VALUES ( 2135, 'Alan Bain' );
+INSERT INTO carnivore_bad_names VALUES ( 2140, 'K. Ramm' );
+INSERT INTO carnivore_bad_names VALUES ( 2145, 'Trent Buck' );
+INSERT INTO carnivore_bad_names VALUES ( 2149, 'Lenart Janos' );
+INSERT INTO carnivore_bad_names VALUES ( 2164, 'Susumu Osawa' );
+INSERT INTO carnivore_bad_names VALUES ( 2166, 'Ghe Rivero' );
+INSERT INTO carnivore_bad_names VALUES ( 2169, 'darkewolf' );
+INSERT INTO carnivore_bad_names VALUES ( 2179, 'Gurkan Sengun' );
+INSERT INTO carnivore_bad_names VALUES ( 2189, 'Bjorn Brenander' );
+INSERT INTO carnivore_bad_names VALUES ( 2195, 'Ron Lee' );
+INSERT INTO carnivore_bad_names VALUES ( 2196, 'Javi Merino' );
+INSERT INTO carnivore_bad_names VALUES ( 2198, 'Eagle' );
+INSERT INTO carnivore_bad_names VALUES ( 2203, 'David B Harris' );
+INSERT INTO carnivore_bad_names VALUES ( 2205, 'Jaldhar H Vyas' );
+INSERT INTO carnivore_bad_names VALUES ( 2206, 'Carlo Segre' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 2209 AND name != 'Debian GNOME Maintainers' ;
+INSERT INTO carnivore_bad_names VALUES ( 2211, 'Bradley Bosch' );
+INSERT INTO carnivore_bad_names VALUES ( 2219, 'Richard A Sahlender Jr' );
+INSERT INTO carnivore_bad_names VALUES ( 2219, 'Rich Sahlender' );
+INSERT INTO carnivore_bad_names VALUES ( 2221, 'romosan' );
+INSERT INTO carnivore_bad_names VALUES ( 2237, 'Noel Koethe' );
+INSERT INTO carnivore_bad_names VALUES ( 2245, 'Jeremy   Bouse' );
+INSERT INTO carnivore_bad_names VALUES ( 2256, 'Sebastien Chaumat' );
+INSERT INTO carnivore_bad_names VALUES ( 2260, 'Guido Witmond' );
+INSERT INTO carnivore_bad_names VALUES ( 2264, 'Andre Luis Lopes' );
+INSERT INTO carnivore_bad_names VALUES ( 2264, 'Andre   Luis Lopes' );
+INSERT INTO carnivore_bad_names VALUES ( 2273, 'Li Daobing' );
+INSERT INTO carnivore_bad_names VALUES ( 2330, 'TARUISHI Masato' );
+INSERT INTO carnivore_bad_names VALUES ( 2336, 'Ean Schuessler' );
+INSERT INTO carnivore_bad_names VALUES ( 2338, 'David Smith' );
+INSERT INTO carnivore_bad_names VALUES ( 2346, 'Ben Darnell' );
+INSERT INTO carnivore_bad_names VALUES ( 2360, 'Guanghui Yu' );
+INSERT INTO carnivore_bad_names VALUES ( 2365, 'Al Nikolov' );
+INSERT INTO carnivore_bad_names VALUES ( 2375, 'Misha Nasledov' );
+INSERT INTO carnivore_bad_names VALUES ( 2377, 'Chris Davis' );
+INSERT INTO carnivore_bad_names VALUES ( 2389, 'Jay Bonci  Niko Tyni <ntyni at debian.org>' );
+INSERT INTO carnivore_bad_names VALUES ( 2390, 'Jim Kaplowitz' );
+INSERT INTO carnivore_bad_names VALUES ( 2399, 'Kristoffer Rose' );
+INSERT INTO carnivore_bad_names VALUES ( 2399, 'Kristoffer H Rose' );
+INSERT INTO carnivore_bad_names VALUES ( 2412, 'Leo Antunes' );
+INSERT INTO carnivore_bad_names VALUES ( 2412, 'Leonardo Antunes' );
+INSERT INTO carnivore_bad_names VALUES ( 2414, 'Debian CLI Applications Packaging Team' );
+INSERT INTO carnivore_bad_names VALUES ( 2415, 'andreas' );
+INSERT INTO carnivore_bad_names VALUES ( 2421, 'N.P.Flintham' );
+INSERT INTO carnivore_bad_names VALUES ( 2426, 'Michael holzt' );
+INSERT INTO carnivore_bad_names VALUES ( 2426, 'Michael Holzt -new key-' );
+INSERT INTO carnivore_bad_names VALUES ( 2434, 'Shell Hung' );
+INSERT INTO carnivore_bad_names VALUES ( 2437, 'Bjorn Andersson' );
+INSERT INTO carnivore_bad_names VALUES ( 2438, 'Loic Minier' );
+INSERT INTO carnivore_bad_names VALUES ( 2447, 'Debian-Med Packaging Team' );
+INSERT INTO carnivore_bad_names VALUES ( 2454, 'The Duck' );
+INSERT INTO carnivore_bad_names VALUES ( 2458, 'serge guelton' );
+INSERT INTO carnivore_bad_names VALUES ( 2463, 'Nikita Youshchenko' );
+INSERT INTO carnivore_bad_names VALUES ( 2464, 'Alexander Shinn' );
+INSERT INTO carnivore_bad_names VALUES ( 2465, 'Jason Parker' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 2467 AND name != 'Magosányi Árpád' ;
+INSERT INTO carnivore_bad_names VALUES ( 2506, 'Maintainer: Debian Science Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 2506, 'Debian Science Team' );
+INSERT INTO carnivore_bad_names VALUES ( 2510, 'Neal H Walfield' );
+INSERT INTO carnivore_bad_names VALUES ( 2527, 'Michael Booth' );
+INSERT INTO carnivore_bad_names VALUES ( 2527, 'Michael J. Booth' );
+INSERT INTO carnivore_bad_names VALUES ( 2533, 'michael d. ivey' );
+INSERT INTO carnivore_bad_names VALUES ( 2534, 'bobek' );
+INSERT INTO carnivore_bad_names VALUES ( 2548, 'T. Edward Whalen' );
+INSERT INTO carnivore_bad_names VALUES ( 2548, 'Ted Whalen' );
+INSERT INTO carnivore_bad_names VALUES ( 2550, 'Niv Sardi' );
+INSERT INTO carnivore_bad_names VALUES ( 2550, 'Niv Altivanik' );
+INSERT INTO carnivore_bad_names VALUES ( 2554, 'fabien boucher' );
+INSERT INTO carnivore_bad_names VALUES ( 2570, 'Atsuhito Kohda' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 2572 AND name != 'Robert Jördens' ;
+INSERT INTO carnivore_bad_names VALUES ( 2574, 'FOUSSE Laurent' );
+INSERT INTO carnivore_bad_names VALUES ( 2574, 'Fousse Laurent' );
+INSERT INTO carnivore_bad_names VALUES ( 2577, 'Martin Wuertele' );
+INSERT INTO carnivore_bad_names VALUES ( 2582, 'A Lee' );
+INSERT INTO carnivore_bad_names VALUES ( 2585, 'Vartan Khachaturov' );
+INSERT INTO carnivore_bad_names VALUES ( 2591, 'Frederik Schueler' );
+INSERT INTO carnivore_bad_names VALUES ( 2599, 'Joel Aelwyn' );
+INSERT INTO carnivore_bad_names VALUES ( 2605, 'Hubert Chan' );
+INSERT INTO carnivore_bad_names VALUES ( 2610, 'Scan Plus GmbH' );
+INSERT INTO carnivore_bad_names VALUES ( 2615, 'Oystein Gisnas' );
+INSERT INTO carnivore_bad_names VALUES ( 2620, 'paul cannon' );
+INSERT INTO carnivore_bad_names VALUES ( 2630, 'Debian Krap Maintainers' );
+INSERT INTO carnivore_bad_names VALUES ( 2631, 'Giuliano Procida' );
+INSERT INTO carnivore_bad_names VALUES ( 2633, 'Pabs' );
+INSERT INTO carnivore_bad_names VALUES ( 2640, 'James Penny' );
+INSERT INTO carnivore_bad_names VALUES ( 2640, 'James Penny  (No Comment)' );
+INSERT INTO carnivore_bad_names VALUES ( 2660, 'Daniel Martin' );
+INSERT INTO carnivore_bad_names VALUES ( 2665, 'Florian Hinzman' );
+INSERT INTO carnivore_bad_names VALUES ( 2666, 'ARAKI Yasuhiro' );
+INSERT INTO carnivore_bad_names VALUES ( 2666, 'Araki Yasuhiro' );
+INSERT INTO carnivore_bad_names VALUES ( 2667, 'David Moreno' );
+
+INSERT INTO carnivore_bad_names VALUES ( 2670, 'Laurence Lane' );
+INSERT INTO carnivore_bad_names VALUES ( 2670, 'Laurence J. Lane' );
+INSERT INTO carnivore_bad_names VALUES ( 2689, 'Anthony Fok' );
+INSERT INTO carnivore_bad_names VALUES ( 2696, 'Ana Beatriz Guerrero Lopez' );
+INSERT INTO carnivore_bad_names VALUES ( 2696, 'Ana Guerrero' );
+INSERT INTO carnivore_bad_names VALUES ( 2702, 'C.M. Connelly' );
+INSERT INTO carnivore_bad_names VALUES ( 2713, 'sECuRE' );
+INSERT INTO carnivore_bad_names VALUES ( 2714, 'Evgeni -SargentD- Golov' );
+INSERT INTO carnivore_bad_names VALUES ( 2716, 'Inc.' );
+INSERT INTO carnivore_bad_names VALUES ( 2720, 'Benjamin Hill' );
+INSERT INTO carnivore_bad_names VALUES ( 2721, 'maximilian attems' );
+INSERT INTO carnivore_bad_names VALUES ( 2726, 'Jon Marler' );
+INSERT INTO carnivore_bad_names VALUES ( 2730, 'KiHyeon Seo' );
+INSERT INTO carnivore_bad_names VALUES ( 2733, 'Francois   Menard' );
+INSERT INTO carnivore_bad_names VALUES ( 2736, 'Alejandro Ríos Peña' );
+INSERT INTO carnivore_bad_names VALUES ( 2739, 'Larry Daffy Daffner' );
+INSERT INTO carnivore_bad_names VALUES ( 2749, 'John Robinson' );
+INSERT INTO carnivore_bad_names VALUES ( 2749, 'IV' );
+INSERT INTO carnivore_bad_names VALUES ( 2762, 'Alexander M. List  4402020774 9332554' );
+INSERT INTO carnivore_bad_names VALUES ( 2786, 'Debian Perl Project' );
+INSERT INTO carnivore_bad_names VALUES ( 2788, 'Geiger Guenter' );
+INSERT INTO carnivore_bad_names VALUES ( 2790, 'Julien Lemoine' );
+INSERT INTO carnivore_bad_names VALUES ( 2793, 'Kenneth   Schmidt' );
+INSERT INTO carnivore_bad_names VALUES ( 2807, '"Zephaniah E. Hull"' );
+INSERT INTO carnivore_bad_names VALUES ( 2807, 'Zephaniah Hull' );
+INSERT INTO carnivore_bad_names VALUES ( 2807, 'Hull' );
+INSERT INTO carnivore_bad_names VALUES ( 2807, 'Zephaniah E' );
+INSERT INTO carnivore_bad_names VALUES ( 2811, 'Robert Edmonds' );
+INSERT INTO carnivore_bad_names VALUES ( 2826, 'Marc-Andre Lureau' );
+INSERT INTO carnivore_bad_names VALUES ( 2830, 'Anthony Wong' );
+INSERT INTO carnivore_bad_names VALUES ( 2830, 'Anthony Wong Yin Pong' );
+INSERT INTO carnivore_bad_names VALUES ( 2830, 'Anthony Y. P. Wong' );
+INSERT INTO carnivore_bad_names VALUES ( 2831, 'Cornelius Cook' );
+INSERT INTO carnivore_bad_names VALUES ( 2838, 'Thomas Mueller' );
+INSERT INTO carnivore_bad_names VALUES ( 2846, 'Takuro KITAME' );
+INSERT INTO carnivore_bad_names VALUES ( 2846, 'Takuo Kitame' );
+INSERT INTO carnivore_bad_names VALUES ( 2854, 'COLPART Gregory' );
+INSERT INTO carnivore_bad_names VALUES ( 2859, 'Nathan Sandver' );
+INSERT INTO carnivore_bad_names VALUES ( 2872, 'Erdal Ronahi' );
+INSERT INTO carnivore_bad_names VALUES ( 2874, 'tony mancill' );
+INSERT INTO carnivore_bad_names VALUES ( 2876, 'Debian Hams group' );
+INSERT INTO carnivore_bad_names VALUES ( 2882, 'Leon Breedt' );
+INSERT INTO carnivore_bad_names VALUES ( 2886, 'Mozilla Extension Packaging Team' );
+INSERT INTO carnivore_bad_names VALUES ( 2889, 'Y Giridhar Appaji Nag' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 2892 AND name != 'Esteban Manchado Velázquez' ;
+INSERT INTO carnivore_bad_names VALUES ( 2701, 'Daniel Nurmi' );
+INSERT INTO carnivore_bad_names VALUES ( 2898, 'Danai Sae-Han' );
+INSERT INTO carnivore_bad_names VALUES ( 2899, 'Marcelo Magallon' );
+INSERT INTO carnivore_bad_names VALUES ( 2905, 'Debian Games team' );
+INSERT INTO carnivore_bad_names VALUES ( 2905, 'Debian Games Group' );
+INSERT INTO carnivore_bad_names VALUES ( 2906, 'FAUcc Team' );
+INSERT INTO carnivore_bad_names VALUES ( 2907, 'Luca - De Whiskey''s - De Vitis' );
+INSERT INTO carnivore_bad_names VALUES ( 2909, 'Nathan Hawkins' );
+INSERT INTO carnivore_bad_names VALUES ( 2909, 'Nathan P. Hawkins III' );
+INSERT INTO carnivore_bad_names VALUES ( 2916, 'mffm Matt Flax' );
+INSERT INTO carnivore_bad_names VALUES ( 2917, 'Goedson   Teixeira Paixao' );
+INSERT INTO carnivore_bad_names VALUES ( 2921, 'Scott Kitterman' );
+INSERT INTO carnivore_bad_names VALUES ( 2933, 'Anthony C. Zboralski ACZ3' );
+INSERT INTO carnivore_bad_names VALUES ( 2937, 'Piotr Ozarowski' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 2943 AND name != 'José Carlos García Sogo' ;
+INSERT INTO carnivore_bad_names VALUES ( 2945, 'Colin Telmer' );
+INSERT INTO carnivore_bad_names VALUES ( 2958, 'Jeremiah Foster' );
+INSERT INTO carnivore_bad_names VALUES ( 2967, 'Dr.-Ing. Christian Leutloff' );
+INSERT INTO carnivore_bad_names VALUES ( 2993, 'Richard   Hecker' );
+INSERT INTO carnivore_bad_names VALUES ( 3005, 'Tanguy Ortolo' );
+INSERT INTO carnivore_bad_names VALUES ( 3020, 'Lamont Jones' );
+INSERT INTO carnivore_bad_names VALUES ( 3024, 'Mauro Lizaur' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 3027 AND name != 'Krzysztof Krzyzaniak' ;
+INSERT INTO carnivore_bad_names VALUES ( 3029, 'Rick  Younie' );
+INSERT INTO carnivore_bad_names VALUES ( 3031, 'Grzegorz Prokopski' );
+INSERT INTO carnivore_bad_names VALUES ( 3033, 'Brian Basset' );
+INSERT INTO carnivore_bad_names VALUES ( 3036, 'Pablo  Averbuj' );
+INSERT INTO carnivore_bad_names VALUES ( 3038, 'Morten Werner Olsen' );
+INSERT INTO carnivore_bad_names VALUES ( 3052, 'Stuart Anderson' );
+INSERT INTO carnivore_bad_names VALUES ( 3069, 'Matthew Johnson' );
+INSERT INTO carnivore_bad_names VALUES ( 3074, 'Stephan Sürken' );
+INSERT INTO carnivore_bad_names VALUES ( 3074, 'Stephan Suerken' );
+INSERT INTO carnivore_bad_names VALUES ( 3074, 'oLurdiX Datenbehandlung' );
+INSERT INTO carnivore_bad_names VALUES ( 3074, 'Stephan A Suerken' );
+
+INSERT INTO carnivore_bad_names VALUES ( 3076, 'Enrique Robledo Arnuncio' );
+INSERT INTO carnivore_bad_names VALUES ( 3086, 'Santiago Ruano Rincon' );
+INSERT INTO carnivore_bad_names VALUES ( 3086, 'santiago josé ruano rincón' );
+INSERT INTO carnivore_bad_names VALUES ( 3089, 'Kanru Chen' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 3094 AND name != 'Paweł Więcek' ;
+
+INSERT INTO carnivore_bad_names VALUES ( 3095, 'Phil Blundell' );
+INSERT INTO carnivore_bad_names VALUES ( 3101, 'Jaime   Villate' );
+INSERT INTO carnivore_bad_names VALUES ( 3117, 'Eduardo Diaz Comellas' );
+INSERT INTO carnivore_bad_names VALUES ( 3118, 'Eric Gillespie Jr.' );
+INSERT INTO carnivore_bad_names VALUES ( 3118, 'Jr.' );
+INSERT INTO carnivore_bad_names VALUES ( 3118, 'Eric   Gillespie' );
+INSERT INTO carnivore_bad_names VALUES ( 3119, 'Raphael Pinson' );
+INSERT INTO carnivore_bad_names VALUES ( 3124, 'Thibaut Gridel' );
+
+INSERT INTO carnivore_bad_names VALUES ( 3128, 'joost witteveen' );
+INSERT INTO carnivore_bad_names VALUES ( 3145, 'Thibaut Varene' );
+INSERT INTO carnivore_bad_names SELECT id, name FROM carnivore_names cn WHERE id = 3156 AND name != 'Ahmed El-Said Atef El-Mahmoudy' ;
+INSERT INTO carnivore_bad_names VALUES ( 3158, 'Ed G. Boraas [RSA Compatibility Key]' );
+INSERT INTO carnivore_bad_names VALUES ( 3158, 'Ed G. Boraas [RSA]' );
+INSERT INTO carnivore_bad_names VALUES ( 3169, 'q' );
+INSERT INTO carnivore_bad_names VALUES ( 3211, 'Bruno "Fuddl" Kleinert' );
+INSERT INTO carnivore_bad_names VALUES ( 3215, 'Bradley Smith' );
+INSERT INTO carnivore_bad_names VALUES ( 3219, 'Marc Brockschmidt' );
+INSERT INTO carnivore_bad_names VALUES ( 3220, 'Simon Horman' );
+INSERT INTO carnivore_bad_names VALUES ( 3227, 'picca frederic' );
+INSERT INTO carnivore_bad_names VALUES ( 3231, 'James Morrison' );
+INSERT INTO carnivore_bad_names VALUES ( 3232, 'Sven Mueller' );
+INSERT INTO carnivore_bad_names VALUES ( 3238, 'Eric Cooper' );
+INSERT INTO carnivore_bad_names VALUES ( 3244, 'Thierry Randrianiriana' );
+INSERT INTO carnivore_bad_names VALUES ( 3244, 'Randrianiriana Soloniaina Thierry' );
+INSERT INTO carnivore_bad_names VALUES ( 3254, 'Thawte Freemail Member' );
+
+
+/*
+.,$s/^ \(.\+[^ ]\) \+|.*| \+\([0-9]\+\)/INSERT INTO carnivore_bad_names VALUES ( \2, '\1' );
+*/
+
+/*
+SELECT name, length(name), id from carnivore_names cn
+--   WHERE name not in (SELECT name from carnivore_bad_names)
+     WHERE id IN (SELECT id FROM carnivore_names
+                  WHERE name not in (SELECT name from carnivore_bad_names WHERE id = cn.id)
+                 GROUP BY id HAVING COUNT(*) > 1)
+   ORDER BY id;
+
+-- Find out which name is more frequently used
+SELECT maintainer_name, count(*) from sources where maintainer_name = '...' or maintainer_name = '...' GROUP BY maintainer_name ;
+
+-- Despite the means above we have several 9 'Thawte Freemail Member' names ...
+SELECT DISTINCT ce.id, name, array_agg(email) FROM carnivore_names cn JOIN carnivore_emails ce ON cn.id = ce.id WHERE name = 'Thawte Freemail Member'
+   group by ce.id, name
+   order by id;
+
+-- Other duplicated names?
+SELECT name, cn.id, array_agg(ce.email) from carnivore_names cn
+     JOIN carnivore_emails ce ON cn.id = ce.id
+     WHERE name IN (SELECT name FROM carnivore_names
+                 GROUP BY name HAVING COUNT(*) > 1)
+   GROUP BY name, cn.id
+   ORDER BY name;
+
+-- what names else for those duplicates which are not in bad_names table
+SELECT dup.*, cnx.name FROM (
+   SELECT name, cn.id from carnivore_names cn
+     JOIN carnivore_emails ce ON cn.id = ce.id
+     WHERE name IN (SELECT name FROM carnivore_names
+                 GROUP BY name HAVING COUNT(*) > 1)
+   GROUP BY name, cn.id
+  ) dup
+  JOIN carnivore_names cnx ON cnx.id = dup.id
+  AND cnx.name NOT IN (SELECT name FROM carnivore_bad_names WHERE id = cnx.id )
+   ORDER BY dup.name;
+
+*/
+
+
+-- top 10 maintainers as carnivore ID
+CREATE OR REPLACE FUNCTION active_uploader_ids_of_pkggroup(text,int) RETURNS SETOF RECORD AS $$
+  SELECT ce.id
+         , COUNT(*)::int
+    FROM (SELECT source, changed_by_email FROM upload_history) uh
+    JOIN carnivore_emails ce ON ce.email = uh.changed_by_email
+   WHERE source IN (           -- source packages that are maintained by the team
+       SELECT DISTINCT source FROM upload_history
+        WHERE maintainer_email = $1
+      )
+    AND changed_by_email IN ( -- email of uploaders who at least once uploaded on behalf of the team
+       SELECT DISTINCT ce.email FROM upload_history uh
+         JOIN carnivore_emails ce ON ce.email = uh.changed_by_email
+        WHERE maintainer_email = $1
+   )
+   GROUP BY ce.id
+   ORDER BY count DESC
+   LIMIT $2
+$$ LANGUAGE 'SQL';
+
+-- top 10 maintainers with acticity per year
+-- Remark: There is no need to transform carnivore IDs into names because the calling functions needs to
+--         recreate table header anyway
+CREATE OR REPLACE FUNCTION active_uploader_per_year_of_pkggroup(text,int) RETURNS SETOF RECORD AS $$
+  SELECT cn.name, uh.year, COUNT(*)::int FROM
+    (SELECT source, EXTRACT(year FROM date)::int AS year, changed_by_email
+       FROM upload_history
+    ) uh
+    JOIN carnivore_emails ce ON ce.email = uh.changed_by_email
+    JOIN (SELECT * FROM carnivore_names
+           WHERE id IN (SELECT idupl FROM active_uploader_ids_of_pkggroup($1, $2) AS (idupl int, count int))
+    )  cn ON ce.id    = cn.id
+   WHERE source IN (           -- source packages that are maintained by the team
+      SELECT DISTINCT source FROM upload_history
+      WHERE maintainer_email = $1
+     )
+     AND changed_by_email IN ( -- email of uploaders who at least once uploaded on behalf of the team
+      SELECT DISTINCT ce.email FROM upload_history uh
+        JOIN carnivore_emails ce ON ce.email = uh.changed_by_email
+       WHERE maintainer_email = $1
+     )
+     AND cn.name NOT IN (SELECT name FROM carnivore_bad_names WHERE id = cn.id )
+   GROUP BY cn.name, uh.year
+   ORDER BY year, count DESC, cn.name
+$$ LANGUAGE 'SQL';
+
+-- top 10 maintainers as (hopefully!!!) unique name
+CREATE OR REPLACE FUNCTION active_uploader_names_of_pkggroup(text, int) RETURNS SETOF RECORD AS $$
+  SELECT (SELECT name FROM carnivore_names WHERE name NOT IN (SELECT name FROM carnivore_bad_names WHERE id = idupl ) AND id = idupl) AS name
+    FROM active_uploader_ids_of_pkggroup($1, $2) AS (idupl int, count int)
+$$ LANGUAGE 'SQL';

Added: blends/trunk/team_analysis_tools/get-archive-pages
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/get-archive-pages?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/get-archive-pages (added)
+++ blends/trunk/team_analysis_tools/get-archive-pages Wed Jan 26 11:00:24 2011
@@ -1,0 +1,595 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use LWP::UserAgent;
+use URI;
+use Cwd;
+use DBI;
+
+# on dedibox PostgreSQL is running on port 5441 to test UDD
+my $port=5441;
+# my $port=5432;
+
+my $BASEURL  = "http://lists.debian.org/debian" ;
+my @PROJECTS = (
+		'accessibility' ,
+                'amd64',
+                'arm',
+                'blends', 'custom', # Keep both, they are turned into 'blends' both!
+                'boot',
+                'ctte',
+                'curiosa',
+		'derivatives',
+		'desktop',
+                'devel',
+                'devel-announce',
+                'devel-games',
+		'edu',
+    		'embedded',
+		'enterprise',
+                'firewall',
+                'gis',
+                'i18n',
+                'isp',
+		'jr',
+                'kde',
+                'kernel',
+                'qa',
+                'l10n-german',
+                'laptop',
+                'legal',
+		'lex',
+        	'live',
+		'med', 
+                'mentors',
+    		'mips',
+                'multimedia',
+                'newmaint',
+                'ocaml-maint',
+                'openoffice',
+                'perl',
+                'policy',
+                'project',
+                'python',
+                'qa',
+                'release',
+    		'russian',
+                'science',
+                'security',
+                'testing',
+                'user',
+                'user-french',
+                'user-german',
+                'user-portuguese',
+		'user-spanish',
+                'vote',
+    		'women',
+                'www',
+		'x',
+) ;
+# List closed                'nonprofit' ) ; 
+
+# news* lists have a yearly and no monthly structure and thus do
+# not work with this script
+# @PROJECTS = ( ) ;
+
+# Well, there is also interest in alioth lists ...
+my $BASEALIOTH = 'http://lists.alioth.debian.org/pipermail/';
+my @ALIOTHPRJ  = ('blends-commit',
+                  'debian-med-commit',
+                  'debian-med-packaging',
+                  'debian-science-commits',
+                  'debian-science-maintainers',
+                  'debichem-commits',
+                  'debichem-devel',
+                  'debtags-devel',
+                  'pkg-grass-devel',
+                  'pkg-java-maintainers',
+                  'pkg-multimedia-commits',
+                  'pkg-multimedia-maintainers',
+                  'pkg-samba-maint',
+                  'pkg-scicomp-commits',
+                  'pkg-scicomp-devel',
+ ) ;
+#                  'pkg-grass-general',
+
+# @ALIOTHPRJ = (  ) ;
+
+## http://lists.alioth.debian.org/pipermail/debichem-devel/2008-August/thread.html
+## http://lists.alioth.debian.org/pipermail/pkg-grass-general/2008-July/thread.html
+
+my %monthdict= ('01' => 'January',
+                '02' => 'February',
+                '03' => 'March',
+                '04' => 'April',
+		'05' => 'May',
+		'06' => 'June',
+		'07' => 'July',
+		'08' => 'August',
+		'09' => 'September',
+		'10' => 'October',
+		'11' => 'November',
+		'12' => 'December');
+
+my @MONTHES  = ('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
+my @ROBOTS   = ('Debian Installer', 'bugzilla-skolelinux', 'Archive Administrator', 'hostmaster',
+                'Debian-med-request', 'Debian testing watch', 'Debian Bug Tracking System',
+                'Skolelinux archive Installer', 'Debian Wiki', 'gentoo-\w+\+help',
+                'Debichem-commits', 'Weekly infolist of updatable packages for the debichem project',
+                'bts-link-upstream at lists.alioth.debian.org', 'DDPOMail robot',
+                'samba-bugs at samba.org', 'Cron Daemon', 'BugScan reporter', 'wnpp',
+                'Debian Package Tracking System', '[Dd]ebian[- ][Bb]oot CVS',
+                'X Strike Force SVN.*Admin', 'Debian Openoffice CVS', 'Master of CVS',
+                'Debian Policy CVS', 'bts-link-upstream', '.*anti.*virus.*', 'debbts', 'bts',
+                'Debian BTS', 'debian-bts', 'Debian External Health System',
+                'spam_filter', 'spam', 'NO.*SPAM', '.*Anti-Spam Center',
+                'drift', 'Mail Delivery .*', 'Debian Archive Maintenance', 'Mini-Dinstall',
+                'akavanagh',   # strange "spammer" on Debian-med-packaging mailing list Subject: "ImageJ ports on kasilas" in February 2020
+                'NM Front Desk', 'DebianGis CVS Commit', 'Debian FTP Masters',
+                'Debian Pure Blends Subversion' # Older Mails all from same sender, this is fixed manually later
+                );
+
+## TODO: just consider mails containing these strings as SPAM
+##       This has to be implemented in the code below
+my @SPAMAUTHORS  = ('Pls check this new site', 'Tim.com.br');
+my @SPAMSUBJECTS = ('File blocked - ScanMail for Lotus Notes',
+                    '^u?n?subscribe\s+.?$');
+
+# if != 0 then extract of mailing list archives is stored in files in dirs
+# The prefered method is to use only the database
+my $storefiles = 0;
+
+# Debian-Devel starts in 1995
+my $YEARSTART = 1995;
+
+my ($sec,$min,$hour,$day,$MONTHEND,$YEAREND,$wday,$yday,$isdst) = localtime(time);
+$MONTHEND++;
+$YEAREND +=1900;
+# $day++;
+my $today = "$YEAREND-$MONTHEND-$day";
+
+my $dbname = 'listarchives';
+my $dbh    = DBI->connect("dbi:Pg:dbname=$dbname;port=$port");
+
+my $ua = LWP::UserAgent->new( agent => 'varbot');
+$ua->env_proxy;
+
+my $cdw = getcwd;
+my $project;
+my $insert = "INSERT INTO listarchive (project, yearmonth, author, subject, url, ts) VALUES (?, ?, ?, ?, ?, '$today')";
+my $datain = $dbh->prepare_cached($insert);
+my ( $robot, $robotflag );
+
+my %ALLPROJECTS;
+
+my $spamurls = "spamurls.txt" ;
+unless ( open(SPAMURLS, ">$spamurls") ) { die("Unable to open $spamurls"); }
+
+foreach $project (@PROJECTS) {
+    $ALLPROJECTS{$project} = { 'url'     => "${BASEURL}-${project}",
+			       'type'    => 0, # == lists.debian.org
+    };
+}
+
+foreach $project (@ALIOTHPRJ) {
+    $ALLPROJECTS{$project} = { 'url'     => "${BASEALIOTH}/${project}",
+			       'type'    => 1 # == lists.alioth.debian.org
+    };
+}
+
+my $SEPARATOR='<!-- -->';
+# different mailing list systems use different separators between message URL, subject and author
+my @SEP1 = ( '<li><strong>.*href="', '\s*' );
+my @SEP2 = ( '">',                   "\\s*<!-- -->\\s*" );
+my @SEP3 = ( '</a></strong>\s*<em>', '\s*<I>\s*');
+my @SEP4 = ( '</em>',                '\s*');
+
+#foreach $project (keys %ALLPROJECTS) {
+#    print "$project: $ALLPROJECTS{$project}{'url'}, $ALLPROJECTS{$project}{'type'}\n"
+#}
+
+my ($query, $daten);
+
+my $regard_utf8_spam = 1;
+
+foreach $project (keys %ALLPROJECTS) {
+    if ( $project =~ /russian/ ) {
+	$regard_utf8_spam = 0;
+    } else {
+	$regard_utf8_spam = 1;
+    }
+    # Remove database entries for this project
+    $query = "DELETE FROM listarchive WHERE project = '$project'";
+    $daten = $dbh->prepare_cached($query);
+    $daten->execute() ;
+    $daten->finish() ;
+
+    if ( $storefiles ) {
+	mkdir($project,0777);
+	chdir($project);
+    }
+    my $URL="$ALLPROJECTS{$project}{'url'}";
+    my ( $year, $month, $url, @data, @lines ) ;
+    my ($content, $msgurl, $subject, $author, $messages, $pages, $page, $line) ;
+    my $type = $ALLPROJECTS{$project}{'type'};
+    for ( $year = $YEARSTART ; $year <= $YEAREND; $year++ ) {
+	foreach $month (@MONTHES) {
+	    if ( $year == $YEAREND && $month == $MONTHEND ) {
+		last;
+	    }
+	    if ( $type == 0 ) {
+		$url = "${URL}/${year}/${month}/";
+	    } else {
+		$url = "${URL}/${year}-$monthdict{$month}/";
+	    }
+	    my $datafile = "${year}-${month}" ;
+	    if ( $storefiles ) {
+		unless ( open(HTMLSNIP, ">$datafile") ) { die("Unable to open $datafile"); }
+	    }
+	    my $messagelines = 0;
+	    my $spamlines    = 0;
+	    my $robotlines   = 0;
+	    while ( $url =~ /.+/ ) { # if only one page $url is set to ''
+		# print "DEBUG: $year-$month: $url\n";
+		my $uri = URI->new($url);
+		my $indexpage = $ua->get($url, Host => $uri->host );
+		unless ( $indexpage->is_success ) { # some mailing lists startet later ...
+		    $url = '';
+		    if ( $storefiles ) { close HTMLSNIP ; }
+		    # remove empty file
+		    unlink($datafile);
+		    next;
+		} ; 
+		if ( $type == 1 ) {
+		    # make sure the loop will end in case of Alioth lists.  Seems these list do
+		    # not feature more than one page per Month so there is no point in looping over them
+		    $url = '';
+		}
+		if ( $type == 0 ) {
+		    @data = $indexpage->content =~ m#.*<!--TNAVEND-->\n(.+)<hr>.*<!--BNAVSTART-->.*#gs;
+		} else {
+
+#          <b>Ending:</b> <i>Tue Feb 28 08:06:40 CEST 2006</i><br>
+#      <a name="end"><b>Last message date:</b></a> 
+		    my @tmpdata = $indexpage->content =~ m#.*<b>Ending:</b>\s*<i>[ \w]+ [ \d:]+ [A-Z]+ [\d]+</i><br>\n(.+)<a name="end"><b>Last message date:</b></a>.*#gs;
+		    my $tmpdata = '';
+                    my $tmpline = '';
+		    foreach $content (@tmpdata) {
+			@lines = split(/(\n)/, $content);
+			foreach $line (@lines) {
+			    $_ = $line;
+			    s/\s+/ /g;
+			    if ( $_ =~ /^\s*$/   || $_ =~ /^<!--\d+ /      ||
+				 $_ =~ /^<\/I>$/ || $_ =~ /^\s*<\/?p>\s*$/ ||
+                                 $_ =~ /^\s*<\/?UL>\s*$/i ||
+				 $_ =~ /^<\/A><A NAME="\d+">&nbsp;<\/A>$/ ) { next ; }
+			    if ( ($msgurl, $subject) = $_ =~ /^\s*<LI><A HREF="(\d+.html)">(.+)$/ ) {
+				$_ = $subject ;
+				s/^\s*\[[-\w]+\]\s*// ; # Remove list name in [] if exists
+				s/^\s*Re:\s*//i ;       # Remove Re:
+				s/^\s*//i ;             # Remove blanks
+				$tmpline = $msgurl . $SEPARATOR . $subject ;
+			    } else {
+				if ( $_ =~ /<I>/ || $_ =~ /<b>Messages:<\/b>/ ) {
+				    $tmpline = "$_\n"  ;
+				} else {
+				    $tmpline = "$_"  ;
+				}
+			    }
+			    $tmpdata = $tmpdata . $tmpline;
+			}
+		    }
+		    @data = ($tmpdata);
+		}
+		$messages = 0;
+		foreach $content (@data) {
+		    @lines = split(/(\n)/, $content);
+		    my $linestart = '';
+		    foreach $line (@lines) {
+			if ( $line =~ /^\s*$/) { next ; }
+			if ( $linestart =~ /.+/ && $type == 0 ) {
+			    if ( $line =~ /^\s*<\/?ul>\s*$/ || 
+				 $line =~ /^\s*<\/?li>\s*$/ ) {
+				# fix broken formatting if there is a useless EOL and next line is <ul> or </li>
+				$line = $linestart;
+			    } else {
+				# Append next line
+				$line = $linestart . $line;
+			    }
+			    $linestart = '';
+			}
+			if ( $line =~ /^\s*<\/?ul>\s*$/ || 
+			     $line =~ /^\s*<\/?li>\s*$/ ||
+			     $line =~ /^\s*<li>[^<]+<\/li>\s*$/ ||
+			     $line =~ /^\s*<li><em>Message not available<\/em>/ ||
+			     $line =~ /<em>\(continued\)<\/em>\s*$/ ||
+			     $line =~ /^\s*$/) { next ; }
+			if ( $storefiles ) {
+			    print HTMLSNIP "$line\n";
+			}
+			if ( ($msgurl, $subject, $author) = 
+                              $line =~ m#$SEP1[$type]([msg]*\d+\.html)$SEP2[$type](.+)$SEP3[$type](.+)$SEP4[$type]#gs ) {
+			    $_ = $subject ;
+			    $_ =~ s/^Re:\s*//i ;       # Remove Re:
+			    $_ =~ s/^\[[^\]]+\]\s*([^\s]+)/$1/ ; # Remove other list markers (but only if something is following)
+			    $_ =~ s/\s*\(fwd\)\s*//i ; # Remove (fwd)
+			    $subject = $_ ;
+			    if ( $subject =~ /^[-&#x\d;\sA-F\?:,]+$/ ) {
+				# print "Potential SPAM line - strange subject: $project $year-$month: $subject\n";
+				print SPAMURLS "${URL}/${year}/${month}/$msgurl\n" if ( $regard_utf8_spam );
+				$spamlines++ ;
+			    } else {
+			        # Certain authors are just spammers
+			        my $spamauthor;
+			        my $numspamauthors = 0;
+				foreach $spamauthor (@SPAMAUTHORS) {
+				    if ( $author =~ /$spamauthor/ ) {
+					$numspamauthors = 1;
+					last;
+				    }
+				}
+				# authors with strange names also provide spam
+			        my $countstrangechars = 0;
+			        while ($author =~ /;\s*&#x[\dA-F][\dA-F][\dA-F]/g) { $countstrangechars++ }
+			        
+				if ( $author =~ /^[-&#x\d;\sA-F\?:,]+$/ || $countstrangechars > 7 || $numspamauthors > 0 ) {
+                                    # $author =~ /info/i ) { # never had a non-spam message from an author whos name contains info
+                                    # This is not reliable: We have for instance
+                                    #   http://lists.debian.org/debian-security/2003/07/msg00054.html
+                                    # with From: Luis Gomez - InfoEmergencias <lgomez at infoemergencias.com>
+				    # print "Potential SPAM line - strange author: $project $year-$month: $author\n";
+				    print SPAMURLS "${URL}/${year}/${month}/$msgurl\n" if ( $regard_utf8_spam );
+				    $spamlines++ ;
+				} else {
+				    if ( $author =~ /^Tille, Andreas$/ )    { $author = 'Andreas Tille'; }
+				    if ( $author =~ /Steffen M&#xF6;ller/ ) { $author = 'Steffen Moeller'; }
+				    $_ = $author;
+				    $_ = s/&#xF6;/ö/g ; 
+				    $_ = s/&#xFC;/ü/g ; 
+				    $robotflag = 0;
+				    foreach $robot (@ROBOTS) {
+					if ( $author =~ /$robot/i ) { # we are not interested in automatic mails
+					    $robotlines++ ;
+					    $robotflag = 1 ;
+					    last;
+					}
+				    }
+				    if ( $robotflag == 0 ) {
+					if ( $storefiles ) {
+					    print HTMLSNIP "$subject ; $author\n";
+					}
+					$_ = $author;     # remove ' at .* from email addresses
+					s/^(.+) at .*/$1/;
+					s/'/_/g;          # ' in names disturbs SQL query ...
+					$author = $_ ;
+					# $subject = trim($subject);
+					$subject =~ s/^\s+//;
+					$subject =~ s/\s+$//;
+					if ( ! $datain->execute($project, "$year-$month-01", 
+                                                         HTMLcode2UTF8($author), HTMLcode2UTF8($subject),
+							 "${URL}/${year}/${month}/$msgurl") ) {
+					   if ( $DBI::err == 7 ) {
+					      if ( $DBI::errstr =~ /UTF8/ ) {
+					         # print "Potential SPAM with broken encoding $project $year/$month in ${URL}/${year}/${month}/$msgurl .\n";
+					         print SPAMURLS "${URL}/${year}/${month}/$msgurl\n" if ( $regard_utf8_spam );
+					      } else {
+					         print "DBI::err == 7, but errstr does not contain 'UTF8'.\n";
+					         exit;
+					      }
+					   } else {
+					      print "Subject = '$subject'\n" ;
+					      print "Problems inserting: $project, $year-$month-01, HTMLcode2UTF8($author), HTMLcode2UTF8($subject), ${URL}/${year}/${month}/$msgurl\n\n";
+					      print "DBI::err=" . $DBI::err . ", DBI::errstr=" . $DBI::errstr . "\n";
+					      exit;
+					   }
+					}
+					$messagelines++ ;
+				    }
+				}
+			    }
+			} else {
+			    if ( $type == 0 ) {
+				if ( ($messages, $page, $pages) = $line 
+				     =~ m#The last update .* There are (\d+) messages. Page (\d+) of (\d+).<br>#gs ) {
+				    if ( $page != $pages ) { # handle following pages
+					print "Warning: Page $page of $pages in $year/$month of $project\n";
+					$page++;
+					$url = "${URL}/${year}/${month}/thrd${page}.html";
+				    } else {
+					$url = '';
+				    }
+				    if ( $storefiles ) {
+					print HTMLSNIP "$messages Messages ($messagelines real messages, $spamlines SPAM, $robotlines messages by robots)\n";
+				    }
+				    if ( $messages != $messagelines + $spamlines + $robotlines ) {
+					print "Warning: $project $year/$month counted $messagelines Messages, $spamlines SPAM and $robotlines robots but page says $messages\n";
+				    }
+				} else {
+				    unless ( $line =~ /<\/em>\s*<\/li>\s*$/ ) { # sometimes there are continued lines ...
+					$linestart = $line;
+					##next ; ##### ??????? if this line is missing line we get $linestart$linestart ...
+				    } else {
+					# if ( $line =~ /<em>\s*<\/em>\s*<\/li>\s*$/ ) { # sometimes SPAM has no sender ...
+					# ... but parse the line for msgurl and subject anyway to enable printing SPAM urls
+                       			if ( ($msgurl, $subject) =
+		                            $line =~ m#$SEP1[$type]([msg]*\d+\.html)$SEP2[$type](.+)$SEP3[$type]\s*$SEP4[$type]#gs ) {
+					    print "Potential SPAM line - no author: $project $year-$month $msgurl / $subject \n";
+					    print SPAMURLS "${URL}/${year}/${month}/$msgurl\n";
+					    $spamlines++ ;
+					} else {
+					    print "Warning: unknown Line: $line\n";
+					    print "DEBUG: $SEP1[$type]([msg]*\\d+\.html)$SEP2[$type](.+)$SEP3[$type]\\s*$SEP4[$type]\n";
+					}
+				    }
+				}
+			    } else {
+				if ( $messages == 0 ) {
+				    if ( ($messages) = $line =~ m#^\s*<b>Messages:</b>\s*(\d+)<p>#gs ) {
+					if ( $storefiles ) {
+					    print HTMLSNIP "$messages Messages ($messagelines real messages, $spamlines SPAM, $robotlines messages by robots)\n";
+					}
+				    }
+				}
+			    }
+			}
+		    }
+		}
+	    }
+	    if ( $storefiles ) { close HTMLSNIP ; }
+	}
+    }
+    if ( $storefiles ) { chdir($cdw); }
+}
+
+$datain->finish;
+# Insert old data from blends-commit list which had a badly configured SVN hook so that the parsing algorithm above did not worked
+# FIXME: Should use rather PWD to obtain directory
+$datain = $dbh->prepare_cached("COPY listarchive FROM '/home/tille/debian-maintain/liststats/blends-commit_old.dat' ;");
+$datain->execute();
+$datain->finish;
+
+# It turned out that several people are posting under different names
+# This is fixed for active posters to keep the stats clean
+
+$query = "UPDATE listarchive SET author = 'Ralf Gesellensetter' WHERE project = 'edu' AND author LIKE 'Ralf%setter';" ;
+$query = $query . "UPDATE listarchive SET author = 'Vagrant Cascadian'      WHERE author LIKE '%vagrant%';" ;
+$query = $query . "UPDATE listarchive SET author = 'Francesco P. Lovergine' WHERE author LIKE 'Francesco%Lovergine' OR author = 'frankie';" ;
+$query = $query . "UPDATE listarchive SET author = 'Christian Perrier'      WHERE author = 'bubulle' OR author = 'Christian PERRIER';" ;
+$query = $query . "UPDATE listarchive SET author = 'Steve Langasek'         WHERE author = 'vorlon';" ;
+$query = $query . "UPDATE listarchive SET author = 'Adrian von Bidder'      WHERE author like 'Adrian % von Bidder';" ;
+$query = $query . "UPDATE listarchive SET author = 'Thomas Bushnell BSG'    WHERE author like 'Thomas Bushnell%BSG';" ;
+$query = $query . "UPDATE listarchive SET author = 'Martin-Éric Racine'     WHERE author like 'Martin-%ric% Racine';" ;
+$query = $query . "UPDATE listarchive SET author = 'Eddy Petrisor'          WHERE author like 'Eddy Petri%or';" ;
+$query = $query . "UPDATE listarchive SET author = 'Linas Zvirblis'         WHERE author like 'Linas %virblis';" ;
+$query = $query . "UPDATE listarchive SET author = 'Nicolas Évrard'         WHERE author like 'Nicolas %vrard';" ;
+$query = $query . "UPDATE listarchive SET author = 'Piotr Ozarowski'        WHERE author like 'Piotr O%arowski';" ;
+$query = $query . "UPDATE listarchive SET author = 'Charles Plessy'         WHERE author like 'charles-debian-nospam' OR author = 'plessy';" ;
+$query = $query . "UPDATE listarchive SET author = 'Jean Luc COULON'        WHERE author like 'Jean-Luc Coulon%';" ;
+$query = $query . "UPDATE listarchive SET author = 'Jérôme Warnier'         WHERE author like 'Jerome Warnier';" ;
+$query = $query . "UPDATE listarchive SET author = 'Sven LUTHER'            WHERE project = 'ocaml-maint' AND author = 'Sven';" ;
+$query = $query . "UPDATE listarchive SET author = 'Sven LUTHER'            WHERE author = 'Sven Luther';" ;
+$query = $query . "UPDATE listarchive SET author = 'Steffen Möller'         WHERE author = 'smoe-guest'  OR author = 'moeller' OR author = 'Steffen Moeller';" ;
+$query = $query . "UPDATE listarchive SET author = 'Steve M. Robbins'       WHERE author = 'smr' or author = 'Steve M . Robbins' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Charles Plessy'        WHERE author = 'plessy' OR author = 'charles-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'David Paleino'         WHERE author = 'hanska-guest';" ;
+$query = $query . "UPDATE listarchive SET author = 'Nelson A. de Oliveira' WHERE author = 'naoliv';" ;
+$query = $query . "UPDATE listarchive SET author = 'Andreas Tille'         WHERE author = 'tille' OR author = 'tillea' OR author = 'TilleA';" ;
+$query = $query . "UPDATE listarchive SET author = 'Thijs Kinkhorst'       WHERE author = 'thijs';" ;
+$query = $query . "UPDATE listarchive SET author = 'Mathieu Malaterre'     WHERE author = 'malat-guest';" ;
+$query = $query . "UPDATE listarchive SET author = 'Morten Kjeldgaard'     WHERE author = 'mok0-guest';" ;
+$query = $query . "UPDATE listarchive SET author = 'Tobias Quathamer'      WHERE author = 'Tobias Toedter';" ;
+$query = $query . "UPDATE listarchive SET author = 'J.H.M. Dassen'         WHERE author = 'J.H.M.Dassen';" ;
+$query = $query . "UPDATE listarchive SET author = 'L. V. Gandhi'          WHERE author = 'L . V . Gandhi' OR author = 'L.V.Gandhi';" ;
+$query = $query . "UPDATE listarchive SET author = 'Jelmer Vernooij'       WHERE author = 'ctrlsoft-guest' OR author = 'jelmer';" ;
+$query = $query . "UPDATE listarchive SET author = 'Mathieu Parent'        WHERE author = 'mparent-guest' OR author = 'Mathieu PARENT' or author = 'sathieu';" ;
+$query = $query . "UPDATE listarchive SET author = 'Noèl Köthe'            WHERE author = 'Noel Koethe' OR author = 'noel';" ;
+$query = $query . "UPDATE listarchive SET author = 'Dominique Belhachemi'  WHERE author = 'domibel-guest';" ;
+$query = $query . "UPDATE listarchive SET author = 'Philipp Benner'        WHERE author = 'pbenner-guest';" ;
+$query = $query . "UPDATE listarchive SET author = 'Sylvestre Ledru'       WHERE author = 'sylvestre-guest' OR author = 'sylvestre' OR author = 'sylvestre.ledru' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Christophe Prud_homme' WHERE author = 'prudhomm' OR author = 'prudhomm-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Torsten Werner'        WHERE author = 'twerner';" ;
+$query = $query . "UPDATE listarchive SET author = 'Jan Beyer'             WHERE author = 'beathovn-guest' OR author = 'jan\@beathovn.de';" ;
+$query = $query . "UPDATE listarchive SET author = 'Filippo Rusconi'       WHERE author = 'Filippo Rusconi (Debian Maintainer)' OR author = 'rusconi';" ;
+$query = $query . "UPDATE listarchive SET author = 'Daniel Leidert'        WHERE author = 'Daniel Leidert (dale)' OR author = 'dleidert-guest';" ;
+$query = $query . "UPDATE listarchive SET author = 'Michael Banck'         WHERE author = 'mbanck';" ;
+$query = $query . "UPDATE listarchive SET author = 'Guido Günther'         WHERE author = 'Guido G&#252;nther' OR author = 'Guido Guenther';" ;
+$query = $query . "UPDATE listarchive SET author = 'Ahmed El-Mahmoudy'     WHERE author like '%Ahmed El-Mahmoudy%' OR author = 'aelmahmoudy-guest';" ;
+$query = $query . "UPDATE listarchive SET author = 'Branden Robinson'      WHERE author like 'Branden Robinson%' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'LI Daobing'            WHERE author = 'lidaobing-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Nicholas Breen'        WHERE author = 'nbreen-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Egon Willighagen'      WHERE author = 'egonw-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Jordan Mantha'         WHERE author = 'laserjock-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Eric Sharkey'          WHERE author = 'sharkey' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Fabio Tranchitella'    WHERE author = 'kobold' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Petter Reinholdtsen'   WHERE author = 'pere' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Andreas Putzo'         WHERE author = 'nd-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Giovanni Mascellani'   WHERE author = 'gmascellani-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Paul Wise'             WHERE author = 'pabs' OR author = 'pabs-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Alan Boudreault'       WHERE author = 'aboudreault-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Reinhard Tartler'      WHERE author = 'siretart' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Alessio Treglia'       WHERE author = 'quadrispro-guest' OR author = 'alessio';" ;
+$query = $query . "UPDATE listarchive SET author = 'M. Christophe Mutricy' WHERE author = 'xtophe-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Jonas Smedegaard'      WHERE author = 'js' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Jaromír Mikeš'         WHERE author = 'mira-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Adrian Knoth'          WHERE author = 'adiknoth-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Andres Mejia'          WHERE author = 'ceros-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Fabian Greffrath'      WHERE author = 'fabian-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Loïc Minier'           WHERE author = 'lool-guest' OR author = 'lool' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Benjamin Drung'        WHERE author = 'bdrung-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Yaroslav Halchenko'    WHERE author = 'yoh-guest' OR author = 'yoh' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Samuel Thibault'       WHERE author = 'sthibaul-guest' OR author = 'sthibault';" ;
+$query = $query . "UPDATE listarchive SET author = 'Andrew Lee'            WHERE author = 'ajqlee' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'David Bremner'         WHERE author = 'bremner-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Christian Kastner'     WHERE author = 'chrisk' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Christopher Walker'    WHERE author = 'cjw1006-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Michael Hanke'         WHERE author = 'mhanke-guest' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Alastair McKinstry'    WHERE author = 'mckinstry' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Otavio Salvador'       WHERE author = 'otavio' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Frederic Lehobey'      WHERE author = 'fdl-guest' or author = 'Frederic Daniel Luc Lehobey' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Sylvain Le Gall'       WHERE author = 'Sylvain LE GALL' ;" ;
+$query = $query . "UPDATE listarchive SET author = 'Hans-Christoph Steiner' WHERE author = 'eighthave-guest' ;" ;
+
+# stupid spammers at project = 'pkg-grass-devel' 
+$query = $query . "DELETE FROM listarchive WHERE author = 'info' AND project = 'pkg-grass-devel' ;" ;
+
+# delete known spammers
+$query = $query . "DELETE FROM listarchive WHERE project = 'pkg-java-maintainers' AND author = 'info' ;" ;
+
+# Debian custom list was renamed to blends
+$query = $query . "UPDATE listarchive SET project = 'blends' WHERE project = 'custom' ;";
+
+$daten = $dbh->prepare_cached($query);
+$daten->execute() ;
+$daten->finish() ;
+
+
+# Just do the graphing of all lists we got
+foreach $project (keys %ALLPROJECTS) {
+    if ( $project =~ /custom/ ) {
+	# debian-custom was renamed to debian-blends
+	next;
+    }
+    system("./author_stats $project") ;
+}
+
+sub HTMLcode2UTF8 {
+
+  $_ = $_[0]  ;
+
+  s/&#xE4;/ä/g;
+  s/&#xE1;/á/g;
+  s/&#xE3;/ã/g;
+  s/&#xE5;/Ã¥/g;
+  s/&#xC1;/Á/g;
+  s/&#xE7;/ç/g;
+  s/&#x10C;/C/g; # C with v on top, but cut-n-paste does not work
+  s/&#xE9;/é/g;
+  s/&#xEB;/ë/g;
+  s/&#xE8;/è/g;
+  s/&#232;/è/g;  # this is alioths way to express the same character
+  s/&#xC9;/É/g;
+  s/&#xEF;/ï/g;
+  s/&#xED;/í/g;  
+  s/&#xF6;/ö/g;
+  s/&#246;/ö/g;  # this is alioths way to express the same character
+  s/&#xF4;/ô/g;
+  s/&#xF1;/ñ/g;
+  s/&#xF3;/ó/g;
+  s/&#x159;/r/g; # r with v on top but cut-n-paste does not work
+  s/&#x219;/s/g; # s with something below - but cut-n-paste does not work :-(
+  s/&#xDF;/ß/g;
+  s/&#223;/ß/g;  # this is alioths way to express the same character
+  s/&#xFC;/ü/g;
+  s/&#xFA;/ú/g;
+  s/&#xAE;/®/g;
+  s/&#x15F;/ÅŸ/g;
+  s/&#xF8;/ø/g;
+  s/&#x17C;/z/g;
+  s/&#x17D;/Z/g; # Z with v on top
+  s/&#x61001;//g; # character is not even displayed correctly in my browser
+  s/&#237;/í/g;
+  s/&#353;/Å¡/g;
+  s/&#239;/ï/g;
+
+  return ($_);
+}

Propchange: blends/trunk/team_analysis_tools/get-archive-pages
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/render-all-graphs
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/render-all-graphs?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/render-all-graphs (added)
+++ blends/trunk/team_analysis_tools/render-all-graphs Wed Jan 26 11:00:24 2011
@@ -1,0 +1,6 @@
+#!/bin/sh
+
+projects=`psql -t listarchives -c 'SELECT project from listarchive group by project ;'`
+for proj in $projects ; do
+    ./author_stats $proj
+done

Propchange: blends/trunk/team_analysis_tools/render-all-graphs
------------------------------------------------------------------------------
    svn:executable = *

Added: blends/trunk/team_analysis_tools/upload_history.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/upload_history.py?rev=2621&op=file
==============================================================================
--- blends/trunk/team_analysis_tools/upload_history.py (added)
+++ blends/trunk/team_analysis_tools/upload_history.py Wed Jan 26 11:00:24 2011
@@ -1,0 +1,111 @@
+#!/usr/bin/python
+# Copyright 2011: Andreas Tille <tille at debian.org>
+# License: GPL
+
+teams = { 
+          'debian-med' :       ('debian-med-packaging at lists.alioth.debian.org',       10),
+          'debian-science':    ('debian-science-maintainers at lists.alioth.debian.org', 10),
+          'debichem':          ('debichem-devel at lists.alioth.debian.org',              8),
+          'debian-gis':        ('pkg-grass-devel at lists.alioth.debian.org',            10),
+          'pkg-multimedia':    ('pkg-multimedia-maintainers at lists.alioth.debian.org', 10),
+          'pkg-java':          ('pkg-java-maintainers at lists.alioth.debian.org',       10),
+###          'debian-live':       ('debian-live at lists.debian.org',                        2), # that's no real team but one very active person
+          'pkg-perl':          ('pkg-perl-maintainers at lists.alioth.debian.org',       10),
+###          'python-maint':      ('pkg-python-debian-maint at lists.alioth.debian.org',     4), # that's also no real team
+          'python-modules':    ('python-modules-team at lists.alioth.debian.org',        10),
+###          'debian-python':     ('debian-python at lists.debian.org',                      1), # that's only one person
+          'python-apps':       ('python-apps-team at lists.alioth.debian.org',           10),
+          'pkg-phototools':    ('pkg-phototools-devel at lists.alioth.debian.org',        8),
+          'pkg-scicomp':       ('pkg-scicomp-devel at lists.alioth.debian.org',          10),
+        }
+
+#teams = {
+#          'debian-med' :       ('debian-med-packaging at lists.alioth.debian.org',       20),
+#          'debian-science':    ('debian-science-maintainers at lists.alioth.debian.org', 35),
+#        }
+
+PORT=5441
+DEFAULTPORT=5432
+
+from sys import stderr, exit
+from os import system
+import psycopg2
+from re import sub
+
+try:
+    conn = psycopg2.connect(host="localhost",port=PORT,user="guest",database="udd")
+except psycopg2.OperationalError:
+    try:
+        conn = psycopg2.connect(host="localhost",port=DEFAULTPORT,user="guest",database="udd")
+    except psycopg2.OperationalError:
+	conn = psycopg2.connect(host="127.0.0.1",port=DEFAULTPORT,user="guest",database="udd")
+
+curs = conn.cursor()
+
+
+
+def RowDictionaries(cursor):
+    """Return a list of dictionaries which specify the values by their column names"""
+
+    description = cursor.description
+    if not description:
+        # even if there are no data sets to return the description should contain the table structure.  If not something went
+        # wrong and we return NULL as to represent a problem
+        return NULL
+    if cursor.rowcount <= 0:
+        # if there are no rows in the cursor we return an empty list
+        return []
+
+    data = cursor.fetchall()
+    result = []
+
+    for row in data:
+        resultrow = {}
+        i = 0
+        for dd in description:
+            resultrow[dd[0]] = row[i]
+            i += 1
+        result.append(resultrow)
+    return result
+
+for team in teams.keys():
+    datafile='uploaders_'+team+'.txt'
+    out = open(datafile, 'w')
+    query = """SELECT replace(uploader,' ','_') AS uploader
+  FROM active_uploader_names_of_pkggroup('%s', %i) AS (uploader text);
+""" % (teams[team][0], teams[team][1])
+    curs.execute(query)
+
+    print >>out, ' year',
+    for row in curs.fetchall():
+        print >>out, '\t' + sub('^(.*_\w)[^_]*$', '\\1', row[0]),
+    print >>out, ''
+
+    typestring = 'year text'
+    for i in range(teams[team][1]):
+        typestring = typestring + ', upl' + str(i+1) + ' int'
+    query = """SELECT *
+	FROM 
+	crosstab(
+	     'SELECT year AS row_name, name AS bucket, count AS value
+                     FROM active_uploader_per_year_of_pkggroup(''%s'', %i) AS (name text, year int, count int)',
+             'SELECT * FROM active_uploader_names_of_pkggroup(''%s'', %i) AS (category text)'
+        ) As (%s)
+""" % (teams[team][0], teams[team][1], teams[team][0], teams[team][1], typestring)
+
+    try:
+        curs.execute(query)
+    except psycopg2.ProgrammingError, err:
+        print >>stderr, "Zu wenig Uploader im %s team.\n%s" % (team, err)
+	exit
+    for row in curs.fetchall():
+        print >>out, ' ' + row[0] ,
+        for v in row[1:]:
+            if v:
+                print >>out, '\t' + str(v),
+            else:
+                print >>out, '\t0',
+        print >>out, ''
+    out.close()
+    system('./author_stats_create_graph ' + datafile + ' ' + str(teams[team][1]) + ' "Uploaders of ' + team + ' team"')
+

Propchange: blends/trunk/team_analysis_tools/upload_history.py
------------------------------------------------------------------------------
    svn:executable = *




More information about the Blends-commit mailing list