Tweet
file: build.pl 35: sub potd_tweet { 36: my %tweeted; 37: my $index_file = file($blio->output_dir->file('tweeted.index')); 38: if (-e $index_file) { 39: %tweeted = map { chomp; $_ =>1 } $index_file->slurp; 40: } 41: my @to_tweet; 42: 43: while (my ($url, $node) = each %{$blio->nodes_by_url}) { 44: next unless $url =~ /^potd\//; 45: next if $tweeted{$url}; 46: if (my $tweet = $node->stash->{tweet}) { 47: push(@to_tweet, $node); 48: } 49: }
tweeted.index is a simple file listing the posts I've already tweeted