I've had a Python script that makes an HTML Bookmarks file for LaunchBar.
Now that I use Alfred 2, I modified it to make XML for Alfred.
This allows me to search my bookmarks with GREP SPEED!
First, add your token (from pinboard.in/settings/password) to ~/.netrc
machine pinboard.in
password username:T0K3N11111111111
Then:
- Get pinboard-xml (I've also attached it to the gist in case I change something in my dotfiles repo)
- Put in the folder where you keep your scripts (eg.
~/bin
) chmod +x
it- Add to crontab (eg.
*/30 * * * * ~/bin/pinboard-xml
) - Make a workflow in Alfred 2 with the following Script Filter (using
/bin/bash
) to Open URL:
echo "<?xml version=\"1.0\"?>"
echo "<items>"
cat $HOME/.bookmarks.xml | grep "{query}"
echo "</items>"
Enjoy!
Thank you so much for this little tool! I really like it!
However, whenever there is a & (ampersand) in the URL or the description, the grep command return couldn't be correctly parsed by Alfred, therefore this particular item won't show up in the search result.
Also, it was working fine until today. When I run
these are the error messages:
I may have updated some python packages today. Did that somehow broke the script? I'd greatly appreciate if you can help me fix this. Many thanks!