From patchwork Fri Apr 24 10:22:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Dekker X-Patchwork-Id: 19209 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id E736E44AA89 for ; Fri, 24 Apr 2020 13:22:51 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C7F0968C0DE; Fri, 24 Apr 2020 13:22:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC02968B92B for ; Fri, 24 Apr 2020 13:22:44 +0300 (EEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 75E84875; Fri, 24 Apr 2020 06:22:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 24 Apr 2020 06:22:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itanimul.li; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=tYDBR+YiAPOmqwvCOOhQbKRN+d mduAyeBU4OaJANQaY=; b=Xbe0bOy26Gubv2tsoA59nEhfdyeZHBwEW8k5w80rur o6tqIAYBWVyKxo/YnWxl9ghXHS3zn7Bnt9HrN8Gl6twvISjgVTMI/MtOkY9WjfXG +CTk2JClVpUDalpih8chwC8ojYATaLRPOZ9SaRUu1T6lqcZ8IyS9IaA6jH8+1wn4 Q9cstwaLbro1xAxLFaKDHSuIUb2FOq6mb3mNlznsShXLodUUZoL8Q7inHkS8h7Nt 8JesGnMZQpODVeNM4sXmRMangXK6ZWwMQhq6T7qbVS2Nz1/VSKyRpqywdbFwzJgo Mzo1h7KhUW8mczENKZpbpP1klGOBccjHfo2G1DwAb+Jw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=tYDBR+YiAPOmqwvCO OhQbKRN+dmduAyeBU4OaJANQaY=; b=BhQj3xS+6fgFz2QT9olLf00+Shb5eaL1K 7kDjmFUgPHoAt0P4lCvre3TYz9xixQTw0yPYrzSSRCVYWUSrSe1RK85esnwpyy9N RtXk0LGdynmLSzT9ZiluBkYZd8wx/DfBuX6QQYd/RLCigf4L/UA3xurbqNmeoTUK MwtX35c6YMmKnMyxH5iFeGyAjZi+Tm+GAdtU8CkggjJHympqStnQ6q4JrxLP6Eq4 qEOXdr0SlS23j6PpqB7vL3Q1vsdGYxCLO/POXMyaQ67oalZ2aDth+EDeSKYLWMFQ MtyuFI5qzjx7KktFMEJHgWWxeqvJO3pHU+2Y/mLC1nEunDRvzs8TQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrhedugddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomheplfhoshhhucguvgcu mfhotghkuceojhhoshhhsehithgrnhhimhhulhdrlhhiqeenucffohhmrghinheptghomh hmihhtvggvshdrthhoohhlshenucfkphepkedurddutdegrdejkedrudehudenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhshhesihhtrg hnihhmuhhlrdhlih X-ME-Proxy: Received: from localhost.localdomain (cpc107625-sotn16-2-0-cust150.15-1.cable.virginm.net [81.104.78.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 27C573065D82; Fri, 24 Apr 2020 06:22:40 -0400 (EDT) From: Josh de Kock To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Apr 2020 11:22:32 +0100 Message-Id: <20200424102232.45851-1-josh@itanimul.li> X-Mailer: git-send-email 2.24.1 (Apple Git-126) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] Add general_assembly_bootstrap.pl X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Jean-Baptiste Kempf Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This script aims to extract contributors who are eligible for the general assembly. Signed-off-by: Josh de Kock --- Better late than never, this patch will continue to put in place the voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020. There is probably a better way to do this, but the aim is just to 'bootstrap' and kickstart the process and commitees. tools/general_assembly_bootstrap.pl | 48 +++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 tools/general_assembly_bootstrap.pl diff --git a/tools/general_assembly_bootstrap.pl b/tools/general_assembly_bootstrap.pl new file mode 100755 index 0000000000..320fe76992 --- /dev/null +++ b/tools/general_assembly_bootstrap.pl @@ -0,0 +1,48 @@ +#!/usr/bin/env perl + +use warnings; +use strict; + +use Encode qw(decode); +use List::MoreUtils qw(uniq); +# cpan List::MoreUtils +use JSON::MaybeXS; +# cpan JSON::MaybeXS + +use Data::Dumper; + +sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s }; + +my @shortlog = split /\n/, decode('UTF-8', `git shortlog -sne --since="last 36 months"`, Encode::FB_CROAK); + +my %assembly = (); + +foreach my $line (@shortlog) { + my ($count, $name, $email) = $line =~ m/^ *(\d+) *(.*?) <(.*?)>/; + + if ($count < 20) { + next; + } + + # make sure name is trimmed + $name = trim $name; + + # assume people with 50 commits have at least 20 source commits + if ($count < 50) { + my $true = 0; + my @commits = split /(^|\n)commit [a-z0-9]{40}(\n|$)/, decode('UTF-8', `git log --name-only --use-mailmap --author="$email" --since="last 36 months"`, Encode::FB_CROAK); + foreach my $commit (@commits) { + if ($commit =~ /\n[\w\/]+\.(c|h|S|asm)/) { + $true++; + } + } + + if ($true < 20) { + next; + } + } + + $assembly{$name} = $email; +} + +print encode_json(\%assembly);