Convert MavensMate Code Coverage Report to CSV

Occasionally I feel the need to get an overview of the current code coverage of a Salesforce org. I usually just stored that report on disk and then ran this Perl one-liner to convert the report to a CSV file:

perl -ne “if (m/-\s(.*?\.(cls|trigger))\:/) { print qq[$1,]; } if (m/-\scoverage\:.*?\((\d*?)\/(\d*?)\)/) { print qq[ $1, $2\n] }” < “Apex Code Coverage.yaml”

But with advancing age, my memory is not the best anymore and I simply can’t remember these few characters by heart. So I decided to write a Python script to do the same task:

import re
import sys

classname = re.compile(r"-\s(.*?\.(cls|trigger))\:")
coverage = re.compile(r"-\scoverage\:.*?\((\d*?)\/(\d*?)\)")

for line in sys.stdin:
    line = line.rstrip()

    match =
    if match:
        print ("{0}, ".format(, end="")

    match =
    if match:
        print ("{0}, {1}".format(,

It’s written for Python 3 but can be easily adapted to earlier versions by modifying the print statements accordingly. Input is taken from stdin, the result is written to stdout.



Problems with SEOQuake Toolbar

Austrian SEO Oliver Hauser has blogged about a problem with the SEO Quake toolbar (article written in German) on Firefox 18 which was not existing in prior versions of Firefox.

He noticed that some of the buttons he added to the toolbar, such as those that link to the Sistrix toolbox, no longer worked after upgrading to version 18 of FF. But this problem is not limited to buttons he added to the toolbar, some of the default buttons like the Twitter and Facebook buttons also do not work. They simply do nothing.

He raised the issue with the SEOQuake team but they said they couldn’t reproduce the issue. This made me think that it could be a problem with non-English systems / browsers. So I fired up a fresh VM with Xubuntu I had recently installed and added the SEUQuake add-on to Firefox – which was still at version 16 at that time. Sure enough everything worked as expected – until I upgraded Firefox to version 18. So I am facing the same issue as Oliver on an English install of Ubuntu and Firefox 18.

When clicking on one of the faulty buttons, I get a message in the Javascript console saying:


Did anyone else notice this issue? Or even better, has a solution?

Update (14/Jan/2013):

Today I received a reply to my bug report from a Technical Specialist at SEOQuake:

Thank you for using Seoquake.
Unfortunately, at the present moment we have temporary problems with Seoquake version for Mozilla Firefox 18.0.
I apologize. It’s been brought up to our developers and they’re in the process of fixing it. Meantime, I’d like to advice you to use either earlier version of FF or Google Chrome.

Thank you for your patience and understanding.

So I guess chances are good that a fix will be available soon.



The missing iOS6 referrer data

While online marketers in all Google-dominated countries are still struggling with all those “(not provided)” keywords, Apple has made changes to iOS6 that cause visits coming from their devices through Google search count as “Direct Traffic”.

blindfolded typewriting

Blindfolded Typing Competition – Photo by Foxtongue

What happened?

  • In an effort to ‘make search more secure‘, Google has enabled the https protocol for its search engine if a user is logged in to Google.
  • To make browsing more secure with Google Chrome they introduced a hard-coded list of sites which should always be opened using the https protocol into the browser. Among them which resulted in a loss of referrer data from Google Plus. This was later fixed by using as an intermediate URL.
  • Mozilla switched the standard search provider of its flagship browser Firefox to Google’s encrypted search with the launch of version 14.
  • Google wants to make the web faster, this is particularly true for mobile devices which are prone to use higher-latency connections.
  • Apple switched its mobile Safari browser to use encrypted Google search by default starting with iOS6. Continue Reading →


12 Useful Unix/Linux command line tools – also for Windows or Macs

Tools for the command line seem to be a relict of the past. Who wants to deal with various commands having cumbersome options and syntax when you can acheive the same using a specialized tool with an elegant GUI? Or maybe even Excel.

Reasons to master basic command line tools are manyfold

  • They are available for most platforms. No need to learn a different set when switching from one operating system to another.
  • Each of them is quite specialized but they can be easily combined to perform relatively complex tasks.
  • Easy to integrate into scheduled tasks

Continue Reading →



Java tool to download search query data

As Python is not really my mother tongue I decided to create a Java 6 version of the download tool for the search data in Google’s Webmaster Tools.

To run it follow these steps:

  1. Unzip the archive into a directory of your choice
  2. Modify config/ to match your needs
  3. Run either (you’ll need to make it executable) or run.bat

Using the -m or –lastmonth command line option the tool will only export the data for the last calendar month. I use this switch in my cronjob which is scheduled to run every month on the 5th day of the month.

The files will be downloaded to the directory you defined in the properties file. By default it will download all types of search query data. If you want to reduce the amount of files being downloaded, change the list of download types in and recompile.

I tested it on Ubuntu 11.10 and Windows 7.




Downloading data from Google Webmaster Tools

Today, Google has published some Python scripts which allow an automated download of data from the Google Webmaster Tools, namely the Search Query data.

UPDATE: I created a Java version of the Search Query downloader. Any feedback would be great.

The two examples included provide a simple script to download search query data for the last month into a CSV file and another to create a Google Docs spreadsheet containing that data.

The required steps to run the scripts are documented in the Project Wiki, assuming you’ve got Python running already. The ‘selected_downloads’ variable may be extended to include the TOP_PAGES alongside the TOP_QUERIES in the download:

selected_downloads = ['TOP_QUERIES', 'TOP_PAGES']

Continue Reading →



Best Practice for tagging Global Multilingual Web Sites

New way to mark multilingual content

directing global search traffic

© Doug Wheller

Google recently announced a new way to tag content on multilingual / multi-regional web sites using the hreflang attribute in a rel=”alternate” link tag. A classic example for this would be Spanish language content for the US, Mexico and Spain. Assuming each of these geographical regions would have a separate site we might have similar content on, and

Ideally, a Spanish speaking searcher in Spain would see search results only from while someone in Mexico should see results from In reality the SERPs will contain a mix of results from both if not all three sites. One way to show only one of these results in the results is the use of the canonical tag, so in our example we could define the version on to be the one and only version so this will be the only one of our Spanish-language sites showing up in the SERPs while simultaneously collecting all the link juice.

Continue Reading →



More news on Google Chrome and the HTTP Referrer

Late last night (CET), I was informed by SEOMoz that they published my recent guest post about Google Chrome not sending referrer data from Google Plus. As it turned out, the lost referral data was caused by a change to Google Chrome to enforce the use of SSL encryption on Google+.

Today I read a notice on the Google Chrome releases blog about a new development release of Chrome 17. One of the changes caught my eye:

Support for <meta name=”referrer”>

A “referrer” meta tag? And look! It’s spelled correctly! This is amazing, but what does it do?

Continue Reading →