cdamian, 8 months ago Has anyone figured out a way to make bookmarks on #Mastodon show up in #Pocket ? #FediHelp
Has anyone figured out a way to make bookmarks on #Mastodon show up in #Pocket ?
#FediHelp
zimpenfish, 8 months ago @cdamian toot has a “fetch bookmarks” subcommand that you can probably feed into Pocket easily. I’ll whip up a script in a bit if you like.
@cdamian toot has a “fetch bookmarks” subcommand that you can probably feed into Pocket easily. I’ll whip up a script in a bit if you like.
toot
cdamian, 8 months ago @zimpenfish Oh, cool. I already thought I had to write a python thing.
@zimpenfish Oh, cool. I already thought I had to write a python thing.
zimpenfish, 8 months ago @cdamian #! /usr/bin/env bash # # Needs: toot, httpie, Pocket tokens POCKET_ACCESS_TOKEN="..." POCKET_CONSUMER_KEY="..." # Set this directly or via an env var INSTANCE=${INSTANCE-https://a.mastodon.host} toot bookmarks | sed -Ene 's/^ID ([^ ]*) .*$/1/p' | while read i; do url="$INSTANCE/statuses/$i" http --ignore-stdin -j <a href="https://getpocket.com/v3/add" rel="ugc">https://getpocket.com/v3/add</a> url="$url" consumer_key="$POCKET_CONSUMER_KEY" access_token="$POCKET_ACCESS_TOKEN" done
@cdamian
#! /usr/bin/env bash # # Needs: toot, httpie, Pocket tokens POCKET_ACCESS_TOKEN="..." POCKET_CONSUMER_KEY="..." # Set this directly or via an env var INSTANCE=${INSTANCE-https://a.mastodon.host} toot bookmarks | sed -Ene 's/^ID ([^ ]*) .*$/1/p' | while read i; do url="$INSTANCE/statuses/$i" http --ignore-stdin -j <a href="https://getpocket.com/v3/add" rel="ugc">https://getpocket.com/v3/add</a> url="$url" consumer_key="$POCKET_CONSUMER_KEY" access_token="$POCKET_ACCESS_TOKEN" done
zimpenfish, 8 months ago @cdamian Ultra-quick and dirty but it'll do the job, I think.
@cdamian Ultra-quick and dirty but it'll do the job, I think.
cdamian, 8 months ago @zimpenfish Nice, I'll give it a try once they fix our internet.
@zimpenfish Nice, I'll give it a try once they fix our internet.
zimpenfish, 8 months ago @cdamian I'll lash up a better solution at some point because I was going to start archiving my favourites into Pocket and might as well include bookmarks whilst I'm there.
@cdamian I'll lash up a better solution at some point because I was going to start archiving my favourites into Pocket and might as well include bookmarks whilst I'm there.
cdamian, 8 months ago @zimpenfish I'm maybe a bit too active with my favourites :-) I also have a script for starred pocketcast to pocket, also useful.
@zimpenfish I'm maybe a bit too active with my favourites :-) I also have a script for starred pocketcast to pocket, also useful.
Add comment