mtgox trade history data from bitcoin talk

also removed unnecessary other directories from backup script, added desktop to
exclude list (rationale: ~/Desktop is roughly as important as ~/tmp, which is
excluded)
This commit is contained in:
Jeffrey Paul
2011-08-23 00:24:08 +02:00
parent 3c4fb51a97
commit 847ad2ac80
5 changed files with 468818 additions and 23 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/perl
use warnings qw( all );
use strict;
use DateTime;
use Data::Dumper;
main();
sub main {
my $days;
while(<>) {
chomp;
my @parts = split(/\,/);
my $dt = DateTime->from_epoch( epoch => $parts[0] );
$dt = dt2ymd($dt);
print STDERR "setting $dt to " . $parts[1] . "\n";
$days->{$dt} = $parts[1] + 0;
}
foreach (sort(keys(%$days))) {
print "$_," . $days->{$_} . "\n";
}
}
sub dt2ymd {
my $dt = shift;
return $dt->ymd('-');
}