The Geek Feminism blog’s Linkspam tradition started back in August 2009, in the very early days of the blog and by September it had occurred to us to take submissions through bookmarking services. From shortly after that point there were a sequence of scripts that pulled links out of RSS feeds. Last year, I began cleaning up my script and turning it into the one link-hoovering script to rule them all. It sucks links out of bookmarking sites, Twitter and WordPress sites and bundles them all up into an email that is sent to the linkspamming team there for curation, pre-formatted in HTML and with title and suggestion descriptions for each link. It even attempts to filter out links already posted in previous linkspams.
The Geek Feminism linkspammers aren’t the only link compilers in town, and it’s possible we’re not the only group who would find my script useful. I’ve therefore finished generalising it, and I’ve released it as Spam All the Links on Gitlab. It’s a Python 3 script that should run on most standard Python environments.
Spam All the Links
Spam All the Links is a command line script that fetches URL suggestions from
several sources and assembles them into one email. That email can in turn be
pasted into a blog entry or otherwise used to share the list of links.
Spam All the Links was written to assist in producing the Geek Feminism linkspam posts. It was developed to check WordPress comments, bookmarking websites such as Pinboard, and Twitter, for links tagged “geekfeminism”, assemble them into one email, and email them to an editor who could use the email as the basis for a blog post.
The script has been generalised to allow searches of RSS/Atom feeds, Twitter, and WordPress blog comments as specified by a configuration file.
The email output of the script has three components:
- a plain text email with the list of links
- a HTML email with the list of links
- an attachment with the HTML formatted links but no surrounding text so as to be easily copy and pasted
All three parts of the email can be templated with Jinja2.
Sources of links
Spam All the Links currently can be configured to check multiple sources of links, in these forms:
- RSS/Atom feeds, such as those produced by the bookmarking sites Pinboard or Diigo, where the link, title and description of the link can be derived from the equivalent fields in the RSS/Atom. (
bookmarkfeedin the configuration file)
- RSS/Atom feeds where links can be found in the ‘body’ of a post (
postfeedin the configuration file)
- Twitter searches (
- comments on WordPress blog entries (
wpcommentsfeedin the configuration file)
More info, and the code, is available at the Spam All the Links repository at Gitlab. It is available under the MIT free software licence.
2 Replies to “Code release: Spam All the Links”
Thanks for open-sourcing this and writing about it! I don’t have an immediate use but it’s good to know it’s there.
Comments are closed.