Google Reader and OPML

I am a big fan of indeed.com and its job search aggregation functions.  I usually keep RSS links in my Google reader profile.  I like to search based on geography and I use a number of keyword searches.  Once you get to more than a couple of jobs links, updating them can be a bit tedious.  But luckily Google has a nice way to Import and Export through  OPML formatted files.  I am no expert on OPML, but using an export of my current RSS feeds I was able to piece together a quick and dirty little PERL script to generate a batch of update RSS feeds.  This script is really basic, I just hard coded the input strings and locations, but for 5 minutes it did the job fine.
I merged the output of this script to the downloaded OPML file from Google Reader and then reimported.

Due to how the blog interprets stuff, I had to add some backslashes, which need to be removed before this will actually work.
Basically you need to s/<\\/

--------CODE BEGIN-----
#!/usr/bin/perl -w

my @SearchStrings = qw(network+architect network+engineer senior+network senior+linux senior+unix senior+firewall);
my @NamesLocDist = qw(Prosper-75078-15 WestPlano-75024-10 CentralPlano-75075-10 McKinney-75069-15 SpringHill-34609-30);

## print header
print "<\?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
print "<\opml version=\"1.0\">\n";
print "    <\head>\n";
print "        <\title>MK subscriptions in Google Reader<\/title>\n";
print "    <\/head>\n";
print "    <\body>\n";
print "        <\outline title=\"jobs\" text=\"jobs\">\n";


foreach $Place (@NamesLocDist)
{
 ($Town,$Zip,$Dist) = split (/-/,$Place);
 foreach $Search (@SearchStrings)
 {
  print "            <\outline text=\"$Town - $Search\"\n";
  print "                title=\"$Town - $Search\" type=\"rss\"\n";
  print "                xmlUrl=\"http://rss.indeed.com/rss?q=$Search&l=$Zip&radius=$Dist&jt=fulltime&sr=directhire\"\n";
  print "                htmlUrl=\"http://www.indeed.com/jobs?q=$Search&l=$Zip&radius=$Dist&jt=fulltime&sr=directhire\"/>\n";
 }
}


# print footer
print "        <\/outline>\n";
print "    <\/body>\n";
print "<\/opml>\n";


--------CODE END -----

Comments

Popular posts from this blog

Xubuntu Home Server on Dell XPS 13 9370

Cygwin + syslog-ng

Installing Fedora 21 on a (late 2014) Mac Mini