A script that deletes things tagged with whatever you like, on Pocket.
Using the terminal on MacOS, given you have Python and Git (should come with MacOS).
Clone this project:
git clone https://github.com/david-mears/pocket-tag-delete.git
Change into the newly created directory:
cd pocket-tag-delete
Make sure geckodriver is intalled. (Might be fiddly for MacOS Catalina, the geckodriver devs are working on it. The below works on 21st December 2019.)
curl -OL https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-macos.tar.gz
tar -xvf geckodriver-v0.26.0-macos.tar.gz
Put geckodriver on PATH. That means: take the filepath to the directory containing geckodriver, and add it to the environment variable called PATH. If the filepath to the directory containing geckodriver is /Users/david/random_directory, then:
export PATH=$PATH:/Users/david/random_directory
Also make sure Firefox is installed.
Still/back in the directory pocket-tag-delete, create and activate the virtual environment:
python3 -m venv env
(That's assuming you have Python 3.)
source env/bin/activate
Then:
pip install -r requirements.txt
Create a file called '.env' in the root directory:
touch .env
and open it:
open .env
Put in your pocket username and password, e.g., and save the file:
[email protected]
POCKET_PASSWORD=secret_password
By default, this script deletes everything tagged 'hacker news'. To change this, just change the variable called tag
in script.py before running it (line 12 at time of writing). Pocket turns whitespaces in the tags into hyphens for the purposes of this url.
To run, you'll have installed, and activated the virtual environment:
python script.py
If it errors, try it again. Will probably fail for the last few of a tag, which you'll need to do manually.