<commit_before>#!/usr/bin/env perl

use strict;
use warnings;

use FindBin;
use local::lib "$FindBin::Bin/local";

use Data::Dumper;
use DateTime;
use Digest::MD5 qw(md5_hex);
use Getopt::Long;
use Git::Repository::Log::Iterator;
use Git::Repository;
use LWP::Simple;

my $repositories;

print Dumper($@);

GetOptions(
  'repository' => \$repositories
);

print "repositories: " . Dumper($repositories);

my $avatar_size       = 90;
my $avatar_output_dir = '.gravatars';
my $outfile = 'gource.mp4';
#my $RESOLUTION = '1024x768';
my $RESOLUTION = '640x480';
my $target_length_seconds = 60;
my $total_days = 14;

mkdir($avatar_output_dir) unless -d $avatar_output_dir;

# TODO: Dynamicize
my $repo_name = 'auth_engine_aggregator';
my $since = '14.days';

my %processed_authors;
my @combined_log;

foreach my $repo_name ($repositories) {
  my $repo = Git::Repository->new( git_dir => "/home/mhenkel/src/rp/$repo_name/.git" );

  my $repo_log_iterator = Git::Repository::Log::Iterator->new($repo, "--name-status", "--since=${since}");

  while (my $log = $repo_log_iterator->next) {
    unless ($processed_authors{$log->author_name}++) {
<commit_msg>Addeding local::lib and option parsing.<commit_after>#!/usr/bin/env perl

use strict;
use warnings;

use FindBin qw ($RealBin);
use local::lib "$RealBin/local";

use Data::Dumper;
use DateTime;
use Digest::MD5 qw(md5_hex);
use Getopt::Long;
use Git::Repository::Log::Iterator;
use Git::Repository;
use LWP::Simple;

my @repositories;
my $repo_glob;

GetOptions(
  'r|repository=s' => \@repositories,
  'g|glob=s'       => \$repo_glob
);

push(@repositories, glob($repo_glob)) if defined $repo_glob;

my $avatar_size       = 90;
my $avatar_output_dir = '.gravatars';
my $outfile = 'gource.mp4';
my $RESOLUTION = '1024x768';
#my $RESOLUTION = '640x480';
my $target_length_seconds = 60;
my $total_days = 14;

mkdir($avatar_output_dir) unless -d $avatar_output_dir;

# TODO: Dynamicize
my $repo_name = 'auth_engine_aggregator';
my $since = '14.days';

my %processed_authors;
my @combined_log;

foreach my $repo_name (@repositories) {
  my $repo = Git::Repository->new( git_dir => "/home/mhenkel/src/rp/$repo_name/.git" );

  my $repo_log_iterator = Git::Repository::Log::Iterator->new($repo, "--name-status", "--since=${since}");

  while (my $log = $repo_log_iterator->next) {
    unless ($processed_authors{$log->author_name}++) {

{'fraction_non_alphanumeric': 0.17221052631578948, 'fraction_numerical': 0.020210526315789474, 'mean_word_length': 5.527472527472527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3767225', 'n_tokens_mistral': 940, 'n_tokens_neox': 872, 'n_words': 196}