diff --git a/lobstertoot.pl b/lobstertoot.pl index af5c98f..30a639f 100644 --- a/lobstertoot.pl +++ b/lobstertoot.pl @@ -30,4 +30,11 @@ for my $story (@{$stories}) { } $masto->post_status($toot); + + push @{ $s->{lobsters}->{storiesdone} }, $story->{short_id}; + shift @{ $s->{lobsters}->{storiesdone} } if scalar(@{ $s->{lobsters}->{storiesdone} }) > 500; } + +open my $fh, ">state.json" or die $!; +print $fh encode_json($s); +close $fh;