Wikipedia talk:List of Wikipedians by number of edits/Instructions

How to Generate This List

  1. If you have Toolserver access
    • Run this query:
      SET @counter:=0; SELECT @counter:=@counter+1 AS rank, user_name, user_editcount
      FROM user
      WHERE user_id NOT IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bot')
      ORDER BY user_editcount DESC LIMIT 4000;
      
    • Wait 10–20 minutes for it to finish.
  2. Otherwise
    1. Download and install Perl. For Windows, try ActivePerl.
    2. Save the following code as wbe.pl:
      while (<>){if(/<(username|ip)>(.*)<.(username|ip)>/){$hash{$2}++;}}
      my @list = sort byedits keys our %hash;
      foreach $item (@list) {print "# $item $hash{$item}\n";}
      sub byedits {our %hash; $hash{$b} <=> $hash{$a};}
      
    3. Download a database dump from download.wikimedia.org/enwiki; you want the latest available file with a name similar to "WIKINAME-DATE-stub-meta-history.xml."
    4. At the command line, run "perl wbe.pl WIKINAME-DATE-stub-meta-history.xml >> results.txt"
    5. Crop the resulting list to approximately 5000 edits.
  3. Remove the bots, IP addresses and replace the anonymous editors with Place holder, and format the list, maybe by running it through a regex filter to link/format all of the names. The following regex filter is for C#:
    string regexStr = @"# (?<name>.*[A-Za-z0-9æ²先生!@\(\)\-,\.\:\?]) (?<count>[0-9]*)$";
    string replacement = @"# [[User:${name}|${name}]] ${count}";
    
  4. Upload!

Start a discussion