From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C425247F8C for ; Mon, 6 Nov 2023 23:53:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AB9F968CAC6; Tue, 7 Nov 2023 01:53:23 +0200 (EET) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1C94A68C97C for ; Tue, 7 Nov 2023 01:53:17 +0200 (EET) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-544455a4b56so4377596a12.1 for ; Mon, 06 Nov 2023 15:53:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699314796; x=1699919596; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=GLWPfhEWscKrE7qiu1r8ROSggXLcWTEM2E9BZJJk69s=; b=nf8kJnaeZkpFpx0nrK0zY79Wsp20sZiiCnxTTIBYRvI4n8qw6Ja/yde+mvJp5MKLgB JtVfxLrOpyddNh8HGFcAVqO67HBlhweJteyqjpkoI5LB28ZKjO48BE63ee8b1UM+wmlP WjX/YH1ltjBAmCdE6cLJs85QlGIRGFiaq7DwmjlI2O6bBs8oPIEmzMU6Ik7fXj8byBmP tO9FPGrWzY3XpGoAX7Wx2bPeBVJ85ClYdkOGylrxaAB7xjgNmP/bhrMcvQdS3JXvui1V mpnI/OLj7+BjLEAvJ+m0xhZGjjbUJibvHfDzTJu0k+CIsm8Ym25Jc1mhs7x3Sz/yNxV6 Hbiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699314796; x=1699919596; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GLWPfhEWscKrE7qiu1r8ROSggXLcWTEM2E9BZJJk69s=; b=ryTDZ5WCYKVl2cGndc6h5vvt7XEjGF/Z3e51tKhJVYXxslyLurnYieN7ERxd3/PX8z zTCf2IqDovS4P7avFpNvouql6sOE+Tj9n8RcSnFFpDzMRaItte77y0QpfGHzztzZng2H doFBKq0vfb/yQtpFFGiZGTsoS5FV4Aayloa+piQ/6WLyCh5dLE/sRcwUQuKHEsA6ORyc tFNv7GTqaBBHvNzA6Dtb3ZTcyh+RMcm4tfxc1K4ym8BImhP4w3uiVegCxBN9HJ9r75KM uCL7F8/h2veTDuh+ljShpIAUI39LPd0of9mVj1qepkSLraW5iOUKkY46/A5srorIom39 yLmg== X-Gm-Message-State: AOJu0YyhRkcS4nsflQmS9wfYawxdgt14oEL/vxytz6F8iar86DcFaFj4 KSvkw0Fa2GVIncqshXITrK4= X-Google-Smtp-Source: AGHT+IHCo74/nVxDEpSKEoLRqwtwmvkE0vKJkFLhnpXcufLNxYL5z/hOSnB0uEP9EphisfzD2Fyx9w== X-Received: by 2002:a17:907:987:b0:9e0:4910:1665 with SMTP id bf7-20020a170907098700b009e049101665mr4124455ejc.29.1699314796158; Mon, 06 Nov 2023 15:53:16 -0800 (PST) Received: from mariano (dynamic-adsl-84-220-189-10.clienti.tiscali.it. [84.220.189.10]) by smtp.gmail.com with ESMTPSA id i8-20020a170906698800b00992b8d56f3asm374461ejr.105.2023.11.06.15.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 15:53:15 -0800 (PST) Received: by mariano (Postfix, from userid 1000) id A8AE8BFCDA; Tue, 7 Nov 2023 00:53:14 +0100 (CET) Date: Tue, 7 Nov 2023 00:53:14 +0100 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , Cosmin Stejerean References: <20231106184141.30439-1-cosmin@cosmin.at> <20231106184141.30439-2-cosmin@cosmin.at> <0101018ba5f0f72f-9adc382e-3e73-4fa1-9b7e-8d18dd1a1a50-000000@us-west-2.amazonses.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0101018ba5f0f72f-9adc382e-3e73-4fa1-9b7e-8d18dd1a1a50-000000@us-west-2.amazonses.com> User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] tools/general_assembly.pl - add options to print names, emails or both X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Cosmin Stejerean Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On date Monday 2023-11-06 18:41:54 +0000, ffmpeg-devel Mailing List wrote: > Signed-off-by: Cosmin Stejerean > --- > tools/general_assembly.pl | 43 +++++++++++++++++++++++++++++++++++++-- > 1 file changed, 41 insertions(+), 2 deletions(-) > > diff --git a/tools/general_assembly.pl b/tools/general_assembly.pl > index 898a6262ef..8204d89794 100644 > --- a/tools/general_assembly.pl > +++ b/tools/general_assembly.pl > @@ -6,9 +6,41 @@ use strict; > use POSIX qw(strftime); > use Encode qw(decode); > use Data::Dumper; > +use Getopt::Long; > + > +binmode(STDOUT, ":utf8"); > > sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s }; > > +sub print_help { > + print "Usage: $0 [options]\n"; > + print "Options:\n"; > + print " --names Print only the names\n"; > + print " --emails Print only the email addresses\n"; > + print " --full Print both names and email addresses (default)\n"; > + print " -h, --help Show this help message\n"; > + exit; while at it: use Pod::Usage; ... Getopt::Long::Configure ("bundling"); ... 'help|usage|h' => sub { pod2usage( -verbose => 1, -exitval => 0) }, > +} > + > +my $print_full = 1; > +my $print_names = 0; > +my $print_emails = 0; > +my $help = 0; > + > +GetOptions( > + "full" => \$print_full, > + "names" => \$print_names, > + "emails" => \$print_emails, > + "help" => \$help, > + "h" => \$help, > +); > + > +print_help() if $help; > + > +if ($print_names || $print_emails) { > + $print_full = 0; > +} > + > my @shortlog = split /\n/, decode('UTF-8', `git log --pretty=format:"%aN <%aE>" --since="last 36 months" | sort | uniq -c | sort -r`, Encode::FB_CROAK); > my %assembly = (); > > @@ -35,6 +67,13 @@ foreach my $line (@shortlog) { > } > > printf("# %s %s", strftime("%Y-%m-%d", localtime), decode('UTF-8', `git rev-parse HEAD`, Encode::FB_CROAK)); > -foreach my $email (sort values %assembly) { > - printf("%s\n", $email); > +foreach my $name (sort keys %assembly) { > + my $email = $assembly{$name}; > + if ($print_full) { > + printf("%s <%s>\n", $name, $email); > + } elsif ($print_names) { > + printf("%s\n", $name); > + } elsif ($print_emails) { > + printf("%s\n", $email); > + } LGTM anyway. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".