Pinging FeedPress from Pelican

geek

Back in April, I wrote about how to ping URI.LV from Octopress. Since I am now using Pelican, and URI.LV has updated its domain to FeedPress.it, I thought I would post an update about how to do the same thing if you are using Pelican to generate your site.

Just for kicks, I decided to re-write it in Python to practice, because there’s nothing like solving real-world problems to get to grips with a programming language. However, you could re-write this script in whatever language you liked since Pelican is built using a Makefile. All you need to be able to do is to call the script from the Makefile, so that when you have uploaded your site, the ping script is executed.

Once again, you need to be a Premium FeedPress subscriber to be able to use the API, and you need to generate a key and token via the FeedPress website and store those values. I put them in a ‘.secrets’ file on my local hard drive, then source the file in my shell to store them as environment variables. I have written more detailed instructions here.

Here’s the script — it’s a bit rough and ready, but it seems to work. There’s an optional section that also pings the Pubsubhubbub hubs if you are using those.

comments powered by Disqus