RFE: Make the Pocket integration report the number of saves

I’ve been using the Pocket Autodata Integration to great effect. When minding a backlog, an important aspect is tuning the slope. I.e. is the backlog growing or shrinking with the current slope.

It would help if the auto-entered Pocket datapoints included the number of items in “saves” (formerly “my list”) in the comment, maybe something like this:

A Brief Introduction to Icon [243 saves; auto-entered by Pocket]

That would make it abundantly clear how the backlog is progressing and would make it easy to locally post-process the datapoints if one wanted a historical graph of the backlog size.

2 Likes

It turned out to be pretty easy to automate this, using dance.pl + WWW::Pocket.

$handler{'ianminds/pocket'} = sub {
       my $comment = param('comment');
       my $id      = param('id');
       my $pocket  = 'auto-entered via Pocket';
       if ($comment =~ /\[$pocket\]$/i) {
               # get the number of saves
               my @saves = qx/ pocket list /;
               my $n = @saves;
               $comment =~ s/\[$pocket\]$/[$n saves; $pocket]/i;
               system( "curl -k --silent -X PUT \"https://www.beeminder.com/api/v1/users/ianminds/goals/pocket/datapoints/${id}.json\" -H 'Content-Type: application/json' -d '{
		       \"auth_token\": \"$TOKEN\",
		       \"comment\": \"$comment\"
	       }'" );
       }
};

Still would be nice to have this built-in. Like the first post if you agree :slight_smile:.

As a secondary RFE: I also have a lot of datapoints where Pocket failed to extract a useful title. These show up as [Auto-entered via Pocket] (with initial space). It would be nice if there were a fallback to using the URL, like https://blog.beeminder.com/indulge/ [Auto-entered via Pocket].

1 Like