Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
  • Loading branch information
IntinteDAO committed Dec 18, 2019
1 parent 913001b commit f775af9
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Bitcoin Gource

Bitcoin Gource is a project showing the development of Bitcoin in the form of short animations.

Compared to Crypto Gource (https://github.com/0xelion/crypto-gource), our project focuses on Bitcoin and is being developed at the same time.

# FAQ:

- My computer is too weak to create a recording, what to do?
I suggest to run preview.sh script and record it with an external program.
46 changes: 46 additions & 0 deletions lib/avatar.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/perl
#fetch Gravatars

use strict;
use warnings;

use LWP::Simple;
use Digest::MD5 qw(md5_hex);

my $size = 90;
my $output_dir = '.git/avatar';

die("no .git/ directory found in current path\n") unless -d '.git';

mkdir($output_dir) unless -d $output_dir;

open(GITLOG, q/git log --pretty=format:"%ae|%an" |/) or die("failed to read git-log: $!\n");

my %processed_authors;

while(<GITLOG>) {
chomp;
my($email, $author) = split(/\|/, $_);

next if $processed_authors{$author}++;

my $author_image_file = $output_dir . '/' . $author . '.png';

#skip images we have
next if -e $author_image_file;

#try and fetch image

my $grav_url = "http://www.gravatar.com/avatar/".md5_hex(lc $email)."?d=404&size=".$size;

warn "fetching image for '$author' $email ($grav_url)...\n";

my $rc = getstore($grav_url, $author_image_file);

if($rc != 200) {
unlink($author_image_file);
next;
}
}

close GITLOG;
Binary file added manual-fix/avatar/Martti Malmi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added manual-fix/avatar/Satoshi Nakamoto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f775af9

Please sign in to comment.